Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Modular CSS with Sass Sass and BEM Styling the Headlines

Naming conventions?


I'm wondering if the names Guil is using are industry standard. Being new to this, I don't see these names as being descriptive and wouldn't understand what they mean just by looking at it.

In these videos Guil uses names such as %hdln-prim for primary headline or $hdln-sec for secondary headline. In an earlier video p-el was used for a pseudo element mixin. Reading p-el one could very easily think the p is for a paragraph element.

Are these standard naming conventions? Are these names part of BEM? Is there a website that someone could point me that indicates a glossary of the short-form names?

1 Answer

Steven Parker
Steven Parker
221,070 Points

BEM has its own naming conventions.

Perhaps this page on the BEM website will be helpful.

Steven Parker, I understand the BEM naming conventions, I'm wondering about the logic behind some of the other names that were defined.

Steven Parker
Steven Parker
221,070 Points

If they aren't in the documentation, I might guess they were "BEM-inspired". I"m not a BEM developer myself, and I've not seen names like that elsewhere.

Thanks, I was curious. This helps!