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.
Sass and camelCasing
Why is it bad practice to use camelCasing in SASS? I already use it for JS and jQuery. Wouldn't it be easier for me to keep the same style of coding across as many different languages as possible so I don't trip myself up?
Thanks in advance
Rich Salvucci16,716 Points
The reason that it is suggested you use hyphenated name is because that this what is in the SASS style guide, as well as many others, such as Air BNB for example https://github.com/airbnb/css#syntax. The code you wrote with camelCase would compile fine, but would be less readable for other developers when they go to look at it, because that is not the accepted best practice for the language. It is also more in line with other naming conventions for CSS such as BEM http://getbem.com/introduction/