getbem.github.io icon indicating copy to clipboard operation
getbem.github.io copied to clipboard

Does BEM extend to ids?

Open glennsimon opened this issue 9 years ago • 3 comments

What is the recommendation for id naming? I would assume that an id (#) would have the same rules as a block, but is BEM intended only for class naming and not ids?

glennsimon avatar Mar 20 '16 15:03 glennsimon

BEM recommends to avoid id usage as much as possible

iamstarkov avatar Mar 20 '16 16:03 iamstarkov

Thank you @iamstarkov. Why does bem recommend avoiding using IDs?

glennsimon avatar Mar 23 '16 15:03 glennsimon

because of very high specificity http://cssguidelin.es/#specificity http://csswizardry.com/2011/09/when-using-ids-can-be-a-pain-in-the-class/

iamstarkov avatar Mar 23 '16 15:03 iamstarkov