-
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
Restore font-family to :before selector. #2131
Conversation
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
I'm really against this one, people using that framework should fix by themselves. I have to close this one because pull requests should have be done against With the new 4.0.0 syntax, the fix should be .reveal .fa-icon {
font-family: 'FontAwesome';
} @davegandy @robmadole thoughts ? PS: CSS is automatically generated from LESS (that is automatically generated by jekyll 😆). In other words, source files are in https://github.com/FortAwesome/Font-Awesome/blob/4.0.0-wip/src/assets/font-awesome/less/ and their |
@tagliala I have no problem with this pull-request being closed. It was more a candid feedback than anything else:
I will now have a closer look at reveal.js use of |
the problem is that To fix the current version add to your stylesheets: .reveal [class^="icon-"],
.reveal [class*=" icon-"] {
font-family: 'FontAwesome';
} |
@tagliala Thank you very much. It seems to work fine, both with fa 3.2.1 and wip-4.0.0: I included:
And try (with FA 4.0.0) a:
It works well, without having to modify anything in hakimel/reveal.js That kind of setting would be interesting to know when reading the "Not using Bootstrap?" of the Get Started page |
@VonC you're welcome btw in fa 4.0.0 the proper usage is |
I read better your css. It's "wrong", please fix with: .reveal .fa-icon,
.reveal [class^="icon-"],
.reveal [class*=" icon-"] {
font-family: 'FontAwesome';
} Then add |
@tagliala Ok, I have fixed my fa-icon css and usage: it does work fine 😄 Again, it will be useful to read about that kind of setting in the Get Started page, both for 3.2.x and the upcoming 4.0.0. |
When using Font-Awesome without Bootstrap, it can be useful to check out external resources: - the Troubleshooting wiki page - the Stack Overflow questions That follows FortAwesome#2131, which lead to FortAwesome#2136.
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 #1716