Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nowadays I don't do much professional webdev, so I don't deal with as big projects.

But I used to use a poor man's BEM, because my team didn't like the aesthetics of the whole double-underscore thing:

Every component (usually tied to a $WhicheverFramework counterpart, matching case and all) has a class for it, elements that are part of that component get a class like $Component-$part, and states ("modifiers" in BEM) do not need a prefix.

That, and striving to keep the tree small, moving decorations to pseudo-elements when possible, and using CSS grid instead of element-based ones like Bootstrap, means you might get some long CSS rule lists, but the actual amount of selectors is pretty manageable.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: