css - Font awesome selector color -


i wondering if possible change selector color of font awesome icon

i know possible change of except font awesome using code

::selection{     background: #ffb7b7 !important; /* safari */ } ::-moz-selection {     background: #ffb7b7; /* firefox */ } 

example

i tested following:

.icon-2x::selection {     background: #ffb7b7 !important;      } i::selection {     background: #ffb7b7 !important;      } 

the problem appears font-awesome css injects icon using ::before pseudo-element, , browsers seem fail select that. note if there line-break before icon , select previous line too, works (sort of).

a workaround add character directly on markup (in case, it's ). demo.

if course work on elements font-family: fontawesome (the font awesome css adds elements class icon-[something]).


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -