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 trial

CSS

Problem with media query mixins

Hello, when I use this variable and mixin and save: $bp-tablet: (min-width: 769px);

@mixin bp($device) { @if $device == tablet { @media #{$bp-tablet} { @content; } } @else { @error("There is no such breakpoint") } }

I got an error in console:

error scss/utilities/_mixins.scss (Line 4: (min-width: 769px) isn't a valid CSS value.)

What am I doing wrong?

I know there is other ways to write that mixing and variable, but want to understand what is wrong here:)