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 trialLuciano Oyarzabal
4,983 PointsNesting Media queries outputs different CSS compared to nesting selectors.
So, when you nest a media querie.
.intro { @media (min-width: 992px) { width: 45&; } }
It outputs this on the CSS
@media (min-width: 992px) { . intro { width: 45%; } }
Why It doesn't outputs the code the same way like when you nest selectors? something like this:
intro @media () {
}
It's a ''special'' thing that SASS do only with the media queries or Im missing something?
1 Answer
Timo Koskinen
Full Stack JavaScript Techdegree Graduate 24,972 PointsHello Luciano.
Yes it is a Sass feature to keep the queries local when the .intro selector is modified already.