CSS3 substring matching

This sounds really interesting: there’s are some new attribute selectors in CSS3 which give you the power to select attributes for the patterns „begins with“, „ends with“ and „contains“.  For example you could use this technique to easily style a link list (internal links, mailto-links, external links…) with different icons.
I do not know something about the performance of these selectors but i assume you should be careful while using them. However, the Browser-Support is surprisingly good.

[att^=val] – „begins with“ attribute selector
[att$=val] – „ends with“ attribute selector
[att*=val] – „contains“ attribute selector

I recommend reading the whole article written by css3.info which you can find here: http://www.css3.info/preview/attribute-selectors/

Schreibe einen Kommentar