We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
We want to wrap blocks in container classes but we have some issues with nested elements.
Source:
@import "node_modules/sass-bem/_bem"; @mixin component_a { @include block('a') { content: 'a'; @include element('b') { content: 'b'; @include element('c') { content: 'c'; @include at('e') { content: 'e'; } } @include at('f') { content: 'f'; } } } } @include component_a(); .d { @include component_a(); }
Expected result:
.a { content: 'a'; } .a__b { content: 'b'; } .a__b .a__c { content: 'c'; } .a--e .a__b .a__c { content: 'e'; } .a--f .a__b { content: 'f'; } .d .a { content: 'a'; } .d .a__b { content: 'b'; } .d .a__b .a__c { content: 'c'; } .d .a--e .a__b .a__c { content: 'e'; } .d .a--f .a__b { content: 'f'; }
What we got:
.a { content: 'a'; } .a__b { content: 'b'; } .a__b .a__c { content: 'c'; } .a--e .a__b .a__c { content: 'e'; } .a--f .a__b { content: 'f'; } .d .a { content: 'a'; } .d .a__b { content: 'b'; } .d .a__b .d .a__c { content: 'c'; } .d .a--e .d .a__b .d .a__c { content: 'e'; } .d .a--f .d .a__b { content: 'f'; }
As you can see in the wrapped component the .d class appears multiple times between nested elements.
The text was updated successfully, but these errors were encountered:
zgabievi
No branches or pull requests
Hello!
We want to wrap blocks in container classes but we have some issues with nested elements.
Source:
Expected result:
What we got:
As you can see in the wrapped component the .d class appears multiple times between nested elements.
The text was updated successfully, but these errors were encountered: