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 trialUnsubscribed User
11,601 PointsWhy is he using underscore for is $base__font-size and not hyphen like that "base--font-size" at 08:41 minutes, Thanks
Is there any particular reason ?
2 Answers
David Moorhead
18,005 PointsHello, maxime daraize,
Yes, there is a particular reason: The two underscores, as well as two hyphens, are part of BEM methodology. The syntax would look like this:
.BLOCK{__ELEMENT[--MODIFIER]}
BEM stands for Block-Element-Modifier and is designed to help modularise frontend development by breaking everything into blocks containing elements, then using modifiers to tweak them.
If you wish to read a whole lot more about it, here's the page.
Hope that answers your "Why" question.
David
Dylan Bailey
Front End Web Development Techdegree Graduate 17,232 Points@davidmoorhead is correct! Unfortunately the link he posted is broken.
Here's an updated link on BEM.