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 Sass Basics Improve Your Workflow with Sass Introducing Mixins

Jeffry Jimenez
Jeffry Jimenez
5,693 Points

Why is Sass saying "Undefined Mixin"?

I'm writing this mixin and the command says " Undefined mixin skewed' "when I use the mixin like this: @include skewed;

@mixin skewed {
  content: '';
  display: block;
  width: 100%;
  height: 50px;
  position: absolute;
  transform: skewY(-2deg);
}

3 Answers

Jeffry Jimenez
Jeffry Jimenez
5,693 Points

Yeah I realize later, I was pausing the video when it didn't run lol. Thank you and great content

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi there,

I wonder if it's as simple as adding the @include directive after the mixin declaration. If you put the @include above the Mixin Sass won't recognise it as it hasn't yet been defined in the code.

Good luck! :-)

Jeffry Jimenez
Jeffry Jimenez
5,693 Points

You were right sir. I just put it at the top and it worked. Interesting because on the video that did not affect it. Thank you for helping

Never mind, SASS says that quite a lot...