Looking at other SO questions, I've learnt that *=
means "contains" and ^=
means "starts with". I noticed [class^="icon-"], [class*=" icon-"] {/* CSS Here */}
in some third-party CSS code. This strikes me as redundant; I am unclear why [class*=" icon-"] {/* CSS Here */}
would not have been sufficient.
Does the redundant use of the ^=
selector serve any purpose (e.g., readability, older browser support, etc.)?
Question reference:
What is caret symbol ^ used for in css when selecting elements?
What does an asterisk before an equal sign mean (*=) ? What about the exclamation mark?