airbnb / css

A mostly reasonable approach to CSS and Sass.
MIT License
6.95k stars 1.42k forks source link

PascalCase on Block selectors for React #28

Closed tylersloan closed 8 years ago

tylersloan commented 8 years ago

I like the idea of this. I know we don't want to conform SO much to React because we may not use it forever. I think this makes sense though when it is necessary to use a React class as a namespace in CSS and it is easy enough to edit down the road. Just want to make sure this is cool with everyone to move forward using PascalCase on block elements (using BEM)

lencioni commented 8 years ago

Yes, this is detailed in this style guide under the OOCSS and BEM section.

We recommend a variant of BEM with PascalCased “blocks”, which works particularly well when combined with components (e.g. React). Underscores and dashes are still used for modifiers and children.

ljharb commented 8 years ago

This seems like it was intended for a fork, similar to #27.