bemlinter
bemlinter copied to clipboard
new rule: allow to style a block according to a page context
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.