bemlinter icon indicating copy to clipboard operation
bemlinter copied to clipboard

new rule: allow to style a block according to a page context

Open tzi opened this issue 7 years ago • 0 comments

For every module, you should be able to define a root block. This will allow to define every component according to a root block state.

Example :

.app--loading .component {
    background: lightgray;
}

The best practice is to not use cascade to style a component. This rule is made to insure component isolation. But a root element is always present, so this exception allow us to style according to a page context. Most of all, this exception doesn't break reusability.

tzi avatar Aug 24 '17 13:08 tzi