3 ms·
Thank you for pointing to the interesting BEM article. As to this specific case, though, I was surprised to see your "this will not work" comment and tested it
by brlewis 12y ago
Thank you for pointing to the interesting BEM article.
As to this specific case, though, I was surprised to see your "this will not work" comment and tested it. It worked: http://jsfiddle.net/brlewis/p0Locwgp/ http://jsfiddle.net/brlewis/p0Locwgp/
- drinchev 12y agoYeah, sorry for the mistake. Yes, you are right in this case bad code would look like : <ul class='collection'> <li> Is red <ul class='collection'> <li class='collection-special'>Should be blue</li> </ul> </li> </ul> .collection > li { color: red; } .collection-special { color: blue; } http://jsbin.com/tulenoxutu/1/edit?html,css,output http://jsbin.com/tulenoxutu/1/edit?html,css,output