I have the following:
[class^="fa-icon-"], [class*=" fa-icon-"] {
I know that class^ means starts with but what does class* mean?
That simply means select any element whose class
attribute contains a substring of fa-icon-
So, as I've shared a demo with you, there am selecting any p
element having a substring of fa-icon-
(Note: The space matters there)
So it will select element say
<p class=" fa-icon-">Hello</p>
The above selector will also select something like
<p class=" fa-icon-blah">Hello</p>
Represents an element with the class attribute whose value contains at least one instance of the substring " fa-icon-".
From the w3c spec:
[att*=val]
Represents an element with the att attribute whose value contains at least one instance of the substring "val". If "val" is the empty string then the selector does not represent anything.