I have a workaround, a solution and some reasoning why this is happening...
Workaround: just use any `fa-style on your page.
Example:
https://jsfiddle.net/mbaas/zLapqy3u/
Solution: declare font-face
Add the font-face
-declaration from FA's CSS:
@font-face
{
font-family: 'FontAwesome';
font-style: normal;
font-weight: normal;
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.1') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');
src: url('../fonts/fontawesome-webfont.eot?v=4.6.1');
}
Note that you this code refers to some font-files which you will need to provide as well.
Actually...it would recommend to not call this font FontAwesome
, because that could overlap with FA and cause unintended side-effects. Better use a unique name. To be clear:
@font-face
{
font-family: 'FontAwesome_Dilip';
font-style: normal;
font-weight: normal;
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.1') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');
src: url('../fonts/fontawesome-webfont.eot?v=4.6.1');
}
and
select {
font-family: '
FontAwesome_Dilip', 'open sans'
}
Also I want to suggest using a specific style for this font-family in preference to applying it to all select
-controls.
Possible explanation
It might be some sort of optimization where FF does not bother processing the @font-face-declation
from FA-CSS, because it is not used (none of the actual styles from the CSS is referenced.). So then my simple <i class="fa fa-check"></i>
fixed it...
Bonus: another advantage of the "private" font-face
As long as you only use yes
or no
in the select, everything is fine. Try adding the word Key
to your options just to see what's possible (this is an effect which wasn't generally reproducible, but using Chrome I had this very problem. But I'm also using FontAwesome-Font in my Windows-System and I suspect this caused the effect.): you may end up seeing the smybol twice, because "key" is used as a ligature in the font-definition to generate the same symbol. So the advantage of declaring a font-face specifically for that usage is that you can add font-variant-ligatures: none;
to the CSS-Style for select
to disable ligatures.