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 trialAurelian Spodarec
10,801 PointsWhat file would you place this to? - Sass
So, where would you put this code?
I put it in _helpers.scss
.is-displayed-mobile {
@include mq(small) {
display: block;
@at-root (with: media) {
.is-hidden-mobile {
display: none;
}
}
}
@include mq(medium) {
display: none;
}
}
1 Answer
Daniel Gonzalez
22,105 PointsI tend to include %place-holders in my helpers.scss files and or mixins. I would also recommend looking into using bourbon.io & their grid structure neat. They have a great mixin sass library you can include in your style sheet and will prevent you from recreating the same mixins for each no project you work for. Bourbon also tends to include most browser prefixes :).
Aurelian Spodarec
10,801 PointsAurelian Spodarec
10,801 PointsAt the moment I'm still getting my head around this, Sass. So i need to understand it before using a library, so I'm trying to figure out stuff etc..
Not that i know what is % yet lol but id look into that soon, thanks.