geddski / csstyle

MOVED TO https://github.com/csstyle/csstyle a modern approach for crafting beautifully maintainable stylesheets
http://csstyle.io
Other
851 stars 34 forks source link

BEM Comparison #59

Open SevereOverfl0w opened 9 years ago

SevereOverfl0w commented 9 years ago

I think a comparison with BEM would be really great in the FAQ. A why of csstyle.

The biggest change I've noticed is the modifier, and I think there's some potential for issues where components overlap. See: https://en.bem.info/faq/#why-include-the-block-name-in-names-of-modifier-and-element particularly the part about ambiguity of what a modifier belongs to[1]. and potential for modifier overlap. I was interested in your considerations & solutions around this sort of problem?

[1] For clarity, I mean this line:

This kind of HTML markup leaves it unclear as to whether the modifier relates to the menu item (menu__item.active) or the button (button.active). Specifying the block name (button_active) indicates the BEM entity to which the modifier will be applied.

geddski commented 8 years ago

usually you'd only apply one component to an element at time, so the modifiers aren't vague. I can see it being confusing though if you use multiple.