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 Grid System Building the Grid Container

Semantic Grid Layout

I have been trying to make the grid layout semantic so that I do not have to use class names like .grid__col--2 in the html markup. I have tried @include .grid__col--2 but this does not work. Help would be appreciated muchly.

Code below...

http://codepen.io/summers1981/pen/JdZGom?editors=110

3 Answers

First up, it would be .grid__col--2 (two underscores between grid and col in the class name), but you can only include mixins, etc.

If you want to use the same styles as an existing rule in the SASS, use extend.

Here's another article that explains the concept well: The Extend Concept

Or if you want to use a framework of some sort, do a search for 'semantic framework'. There's tons of them, and surely one that would suit your needs.

Why not use twitters bootstrap? http://getbootstrap.com

Thanks Guys. I played about with this last night and created @mixins that now work for this.

C

Don't forget to mark an answer as 'Best Answer' to effectively close off this question.