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 trialjames white
78,399 PointsReview: Modular Media Queries, 5 questions...picky, Picky, PICKY..
Link to Challenge:
I think these questions come up in semi-random order, but
this one usually comes up first:
The ______________ directive lets us pass custom styles to a mixin when including it.
Here's the reference I found (after some non-trivial amount of time spent searching):
http://sass-lang.com/documentation/file.SASS_REFERENCE.html#mixin-content
..which (if you can read the SASS docs "technical-ese"),
clearly indicates the answer to this fill-in-the-blanks should be:
@content
With SMACSS, element state selectors are usually prefixed with _______
You'd be forgive if you tried "is-"
But it's not! (Ha! Ha! Fooled you!)
The answer will not pass without a dot (period) at the front of the prefix:
.is-
The ________ directive lets us nest a Sass rule without nesting the output.
Of course I tried: '@root'
Utterly and completely wrong!!
The answer actually involves '@at' (pronounced "ĂŠt ĂŠt"),
(not to be confused with the "at at" walkers of star wars):
http://starwars.wikia.com/wiki/All_Terrain_Armored_Transport
One of the Google results if you search for (without quotes):
directive nest a Sass rule without nesting the output
..is this page:
http://unakravets.tumblr.com/post/64113156740/sass-3-3-at-root-bem
..where the answer is obviously:
@at-root
The final question that comes up...
Write a condition that will output the media query if the value passed for $break is equal to "med".
_______________ {
@media (min-width: 769px) {
@content;
}
}
Of course I knew the answer right away:
---
Wrong!
(Did I mention how much I hate fill-in-the-blank questions...)
No, like just about everything in SASS you've got to throw an '@' symbol in:
---
Don't even ask me how much of a day I wasted on these five questions.
Hopefully these will help someone out there from getting stuck.
Remember you only need to get 4 out of 5 questions right to pass.
2 Answers
Guil Hernandez
Treehouse TeacherHi james white,
Without the @
in the directives, your Sass will return errors. That's why we ask you to include it in the fill-in-the-blank answers. I've also edited the "element state selectors" question to accept an answer without the .
Thanks!
Sarika Rani
11,214 Points@if $break == "med" { @media (min-width: 769px) { @content; } }