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 trial

CSS Modular CSS with Sass Sass and BEM Headline Modifiers

Soumya Gupta
Soumya Gupta
6,565 Points

I keep getting a "You may only @extend selectors within the same directive. From @extend %hdln-prim" ?

I don't know what I am doing wrong per-say but I keep getting this error. My code is as below: .headline { &-primary {

@inlcude m(grouped){
 @extend %hdln-prim;
 margin-bottom:0;
}

@extend %hdln-prim;
margin-bottom: em(70px, 42px);

}

&-secondary { @inlcude m(grouped){ @extend %hdln-sec; margin-top: 10px ; margin-bottom: 54px;

}

@extend %hdln-sec;
margin-bottom: em(22px, 24px);

} }

Nick van der Sangen
Nick van der Sangen
11,516 Points

You've got a typo: inlcude instead of include!