Multiple matching substring selectors

css, css-selectors

Solution

This works:

.btn[class*="icon-"]

So will,

[class*="icon-"][class~="btn"]

Check out my fiddle: http://jsfiddle.net/VaACP/1/

Problem

I'm trying to create a rule to match all classes beginning with `icon-` which also have the `btn` class. `[class^="icon-"] {` matches the first condition, but how do I add "that also have the .btn class?

Original source