Skip to content

Instantly share code, notes, and snippets.

@freshyill
Created September 6, 2011 17:01
Show Gist options
  • Save freshyill/1198179 to your computer and use it in GitHub Desktop.
Save freshyill/1198179 to your computer and use it in GitHub Desktop.
CSS3 vendor prefix mixin
// Example variable
$realistic-drop: 1px 1px 5px #000, 1px 1px 1px #000;
// Example mixin
@mixin box-shadow ($box-shadow) {
-webkit-box-shadow: $box-shadow;
-moz-box-shadow: $box-shadow;
-ms-box-shadow: $box-shadow;
-o-box-shadow: $box-shadow;
box-shadow: $box-shadow;
}
// Call mixin with property values
div {
@include box-shadow(1px 1px 5px #000);
}
// Call mixin with variable
div {
@include box-shadow($realistic-drop);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment