Reputation: 1112
I'm developing some project on bootstrap, where I encountered some problem with one class.
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
can you give me some link where I can find some information about this class^/*. It gets my code messy and you know how it's hard to google with those symbols and class keywoard )
Upvotes: 0
Views: 64
Reputation: 53929
This is called a CSS attribute selector. You can read all about them here: https://developer.mozilla.org/en-US/docs/CSS/Attribute_selectors
In your case [class^="icon-"]
matchs elements whose class attribute starts with icon-
followed by whatever. And [class*=" icon-"]
matches elements who have icon-
anywhere in the class
attribute (mind the space at the beginning).
Upvotes: 2