Tagged: css compression, google font
-
AuthorPosts
-
September 24, 2019 at 11:17 am #1141341
Hello
I’ve got a problem with activating > performance > CSS Compression
I set “montserrat” font in enfold settings (title & text).
But I needed the “montserrat” font in bold and black. So I put this Css in my child theme :@import url('https://fonts.googleapis.com/css?family=Montserrat:700,800&display=swap'); strong { font-weight: 700; }
With no CSS compression, all is good, my bold is bold (the inspector shows : “Montserrat Bold”).
But with Css compression, it is not displaying the “bold” type. (the inspector shows : “Montserrat Regular”).
The enfold police crush the one I load ?
Any idea ? thanks !September 24, 2019 at 5:45 pm #1141478Hey romano2,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaSeptember 25, 2019 at 11:17 am #1141749Yes of course, many thanks !
https://www.jeuneetrose.com/teleteton/#av_section_3
Title H2 : “TOUS LES RENDEZ-VOUS”
I turned CSS compression Off, so my bold is bold (the inspector shows : “Montserrat Bold”).
How could I turn CSS compression On without losing the real bold ?
Thanks !September 27, 2019 at 2:00 am #1142525Hi,
Thank you for the update.
Try to add this css code in the Quick CSS field before enabling the compression.
h1, h2, h3, h4{ font-weight: 800; }
Best regards,
IsmaelSeptember 27, 2019 at 9:52 am #1142627Thanks.
It doesn’t work. And this CSS is already in my child theme (style.css ).
After enabling compression, the font Monserrat Bold disappear.But I found the solution.
- In Enfold Settings – fonts, I set ‘Arial’ for all
- after in my custom CSS, I import all Monserrat styles like that :
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700,800&display=swap');
- and finally, in my custom CSS, I define the new font-family :
html body#top {font-family: 'Montserrat', sans-serif;}
After compression, there is no more conflict with same font loaded form theme and loaded from custom css.
All the weights are now loaded from one source.Thanks for your great theme and support anyway.
- This reply was modified 5 years, 1 month ago by romano2.
September 27, 2019 at 11:02 am #1142673Hi romano2,
Glad you got it working for you! :)
There could have been an error in the css somewhere and it was just breaking. You might want to validate it.
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.