Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMáté Végh
25,607 PointsScout does not like BEM mixins?
I am using the Scout compiler and when I want to include BEM mixins, I get the following error message:
error bem_mixins.scss (Line 2: Invalid CSS after " &": expected "{", was "__#{$element} {"
"__#{$element" may only be used at the beginning of a selector.)
Here is my code:
@mixin e($element) {
&__#{$element} {
@content;
}
}
@mixin m($modifier) {
&--#{$modifier} {
@content;
}
}
.block {
foo: bar;
@include e(element) {
bar: baz;
@include m(modifier) {
baz: foo;
}
}
}
I don't see any problem within my code. I also checked it on sassmeister.com and it worked. Has anyone else had the same issue?
Máté Végh
25,607 PointsMáté Végh
25,607 PointsHey Chris,
Thanks for the information!