-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The font is not displayed if I use a reset rule: body * { font-family: sans-serif !important; } #1716
Comments
Let's think what your However sometimes one doesn't want to code beautifully, one wants to get the job done no matter what, not caring about code beauty. Then you might try modifying Font Awesome's css to say |
I agree, I used this rule because I used an external theme and I made custom changes that needed to force and override all theme rules. But, why not leave the |
That's an interesting question. I quickly looked through change logs and Github Milestones but found nothing. I guess there was a reason to get rid of My guesses would be to do with wide animation support, or some other compatibility issue. Maybe someone knows :) Did you try modifying Font Awesome's css? |
Without an other option I added the old rule to my CSS (not Font Awesome's CSS): |
When Font-Awesome is used with other third-party css framework, like https://github.com/hakimel/reveal.js, said css framework can define (wrongly or rightly) global rule like https://github.com/hakimel/reveal.js/blob/master/css/reveal.css#L16 that end up overriding font-awesome.css rules. And that, even if font-awesome.css is declared _after_ all other css. Restoring that font-family in the :before selector ensure that rule is present in the final css rules applied to an html element. Similar to FortAwesome#1716
Closing here, please use custom css if you have a similar issue |
In previous version (I don't know which, because the version number is missing in the css) - the
font-family
rule was applied more specific, on the:before
selector :[class^="icon-"]:before,[class*=" icon-"]:before { font-family: 'FontAwesome';
But now it's applied on the class selector:
class^="icon-"],[class*=" icon-"] { font-family: FontAwesome;
and cause a conflict with global reset rules that override the less specific rules.
The text was updated successfully, but these errors were encountered: