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 trialLianne Dewar
898 PointsSemantic 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...
3 Answers
Iain Simmons
Treehouse Moderator 32,305 PointsFirst 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
Robert Araujo
Courses Plus Student 2,222 PointsWhy not use twitters bootstrap? http://getbootstrap.com
Lianne Dewar
898 PointsThanks Guys. I played about with this last night and created @mixins that now work for this.
C
Iain Simmons
Treehouse Moderator 32,305 PointsDon't forget to mark an answer as 'Best Answer' to effectively close off this question.
Iain Simmons
Treehouse Moderator 32,305 PointsIain Simmons
Treehouse Moderator 32,305 PointsOr 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.