grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

BUG: Changing the font inside top panel is disturbing the font-awesome icons

Open jayeshmotwani opened this issue 6 years ago • 2 comments

Hello, I am using Montserrat google font. Ater trying so many things, finally I was able to set the font using following way:

.gjs-pn-buttons > span{ font-family: "Montserrat", sans-serif; }

But when I do this, the font is changed but the font-awesome icons are not working.

Please refer the following screenshot for more details. This is how it looks after I changed the font. Grapesjs Font change issue

Thanks for your help.

jayeshmotwani avatar Aug 03 '20 06:08 jayeshmotwani

Hi @jayeshmotwani !

Font Awesome relies on the font-family attribute for its icons, & since your selector also targets these icons in addition to the text, Font Awesome's font-family gets overridden by yours, which breaks its icons.

I'd recommend using a different selector that would only target the text you're interested in modifying the font of & not GJS' icons.

Cheers !

mcottret avatar Aug 24 '20 13:08 mcottret

@mcottret Thanks for your reply.

I fixed this by adding the label text inside a tag and given my custom font to that particular tag only, instead of entire of button.

Cheers!

jayeshmotwani avatar Aug 25 '20 05:08 jayeshmotwani