• Resolved lnpgaceta

    (@lnpgaceta)


    I feel like I’m making a really elementary mistake somewhere. All of the TablePress tables on my site are showing the same font weight throughout, including where I’ve applied strong tags.

    As an example, here’s the code for the purple table that’s first up on the page I’ve linked:

    .tablepress-comp tbody td {
    	font-family: Fira Sans;
    	font-size: 18px;
    	font-weight: 400 !important;
    	text-align: center;
    	vertical-align: middle;
    	color: #000000;
    }
    
    .tablepress-comp thead th {
    	font-family: Fira Sans;
    	font-size: 24px;
    	font-weight: 700 !important;
    	background-color: #383545;
    	color: #ffffff;
    	text-align: center;
    }
    
    .tablepress-comp .column-1 {
    	font-weight: 700 !important;
    	text-align: center !important;
    }
    
    .tablepress-comp .odd td {
    	background-color: #777292;
    }
    
    .tablepress-comp .even td {
    	background-color: #908CA6;
    }
    
    .tablepress-comp {
    	border: 4px solid;
    	border-color: #000000;
    }
    
    .tablepress-comp tr,
    .tablepress-comp tbody td,
    .tablepress-comp thead th,
    .tablepress-comp tfoot th {
    	border: none;
    }

    If you look at the table on the page, however, it doesn’t show different weights there. I feel like I recently solved this problem, maybe for a different thing on the site, but I can’t remember how. Any help would be great.

    • This topic was modified 2 years, 12 months ago by lnpgaceta.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    My feeling is that your selected font “Fira Sans” does not offer all these font weights. Are you actually even loading/embedding it from Google Fonts?
    If I change the font to e.g. Arial in the CSS, the font weight is different, in my tests.

    Regards,
    Tobias

    Thread Starter lnpgaceta

    (@lnpgaceta)

    Tobias,

    Thanks for the extraordinarily quick response.

    That explains both why I felt I was making a really elementary mistake—I changed it to Fira Sans Condensed, which I know I have loaded, and it worked—and both why I couldn’t remember how I solved this problem the last time, because I haven’t actually had it before. I will get the regular Fira Sans family loaded.

    EDIT: Huh. Actually, curiouser and curiouser: I looked at the CSS and, supposedly, both my theme and the BoldGrid Post/Page Builder should have the Fira Sans library loaded onto them. (Come to think of it, my headings are Fira Sans, and they work okay.) Is there any way to make it load again specifically for TablePress?

    Thanks!

    • This reply was modified 2 years, 12 months ago by lnpgaceta.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    from what I can see, the font is properly assigned to TablePress table cells as well, but I’m not sure if all font weights or versions of the type face are loaded. In the loaded CSS file from Google fonts, https://fonts.googleapis.com/css?family=Fira+Sans%3A800%7CIBM+Plex+Sans&ver=5.9.2 it looks like, only 800 font weight is loaded.

    Regards,
    Tobias

    Thread Starter lnpgaceta

    (@lnpgaceta)

    Tobias,

    With that in mind, my question would be: is there a way for me to ensure that the different weights are loaded?

    I went ahead and put in an email to the BoldGrid team, since my Google Fonts access is supposed to be through their plugins and, therefore, I assume the problem can best be solved through them, but I wonder if there’s a way for me to fix it before I do that.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    the 800 font weight is in the Google Fonts URL, so I guess you’d have to modify that somehow.

    Regards,
    Tobias

    Thread Starter lnpgaceta

    (@lnpgaceta)

    Tobias,

    I referred it to BoldGrid and they’re working on it–turns out there’s been some changes to the “structure of the Google Fonts JSON file used to fetch the font files” and they’ll need to patch it up. Thanks for the help isolating the problem.

    Regards,

    LNP

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘CSS for different weights not working’ is closed to new replies.