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 - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -