0

When writing CSS, is there any reason to prefer shorter, more elegant selectors over longer, more comprehensible ones? I'm looking for technical, not personnel, reasons – processor hits and whatnot. There are often many ways to select the same element(s), and I'm unclear what, if anything, might be best practice.

closed as off-topic by dan Apr 23 '18 at 1:08

  • This question does not appear to be about webmastering within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

1

You may want to have a look at the Block Element Modifier methodology http://getbem.com/

No matter what methodology you choose to use in your projects, you will benefit from the advantages of more structured CSS and UI. Some styles are less strict and more flexible, while others are easier to understand and adapt in a team.

Not the answer you're looking for? Browse other questions tagged or ask your own question.