Kris Hollenbeck Kris Hollenbeck - 2 months ago 4
Sass (Sass) Question

SASS, What is the correct way to call a mixin?

I just started using SASS and I am trying to figure out how to create a box shadow mixin...

I copied this mixin from another stack overflow post..

@mixin box-shadow($top, $left, $blur, $color, $inset:"") {

-webkit-box-shadow:$top $left $blur $color #{$inset};
-moz-box-shadow:$top $left $blur $color #{$inset};
box-shadow:$top $left $blur $color #{$inset};

However I am not sure exactly how to format my

This is what I have so far for my @include

@include box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);

And this is my output error...

error(Line 1003: Invalid CSS after "...lude box-shadow": expected "}", was ": inset 0 1px 1...")


Bad syntax.

Use @include box-shadow(0, 1px, 1px, rgba(0, 0, 0, 0.075), inset);

(Edited in 2014 to include changes to Sass' syntax made in the last few years)