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 trialLyric Abbott
35,595 Pointshelp
Use a parent selector reference to output the BEM class .menu__link. Set the color to blue and the padding to .5em.
i dont know what im doing
http://teamtreehouse.com/library/modular-css-with-sass/sass-and-bem/bem-challenge
3 Answers
Adam Womble
10,437 PointsLyric,
Here's the full context:
.menu {
margin: 1em 0;
&__link {
color: blue;
padding: .5em;
}
}
In this case, when you nest the ampersand (&), it represents the parent in which the item is currently placed. So,
&__link {
β¦some codeβ¦
}
equates to
.menu__link {
β¦some codeβ¦
}
in the output css that Sass generates.
Hope that helps and best of luck,
Adam Womble
Adam Womble
10,437 PointsThe parent selector is the ampersand:
&
It would seem you are attempting to style the element level of the BEM naming convention selector. In this context, I think they may be requesting:
&__link {
color: blue;
padding: .5em;
}
If you could provide some more context with the full code block, it would be easier to help you out! You might check the "Tips for asking questions" section, typically found to the right of the forum area. Providing all of the code is necessary to allow others to answer contextually... which is incredibly important with pretty well all code.
Hope that helps!
james white
78,399 PointsFor the second part of the challenge this thread might be helpful:
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Lyric,
If this is from a code challenge then it would be helpful to post a link to the challenge.
Alternatively, if you click "Ask a Question" from within a video, code challenge, or quiz then that piece of content should be automatically attached to your question saving you the time of providing a link.