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 trialNoah Smith
Front End Web Development Techdegree Student 9,788 PointsMy @media "{}" are broken
@mixin mq($break) {
@if $break == 'xs' {
@media (max-width: $break-xs) {
@content;
}
}
@else $break == 'sm' {
@media (min-width: $break-s) {
@content;
}
}
@else $break == 'med' {
@media (min-width: $break-m) {
@content;
}
}
@else $break == 'lg' {
@media (min-width: $break-l) {
@content;
}
}
}
This is the code that I have and it seems to not be working, from what I could see, it was how Guil had it. I'm not sure what I am doing wrong.
1 Answer
Noah Smith
Front End Web Development Techdegree Student 9,788 PointsI figured it out....... I forgot to write "else if" I only had else! Boy do I feel dumb!