Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other On Specificity: What's the difference? Reply To: On Specificity: What's the difference?

#185008
__
Participant

CSS has child/descendent selectors because that’s often the best way to find an element.

On second thought, I should clarify this:

  • using child/descendent selectors to find an element is wrong. In this case, BEM is the right approach (whether to use those multipart--with--dashes--classnames----------------- is a decision I leave to you —but keep in mind that, if the hierarchy really is irrelevant, then there’s no reason to describe it in the class name).
  • using child/descendent selectors to describe an element is absolutely correct. This is where BEM fails.

edit

And of course: cssguidelin.es

I’ve read that before. All good points, and yet somehow, only tedious/ awkward/ obnoxious style rules fall out the other end. Seriously, I would hate working with him.