Created
September 6, 2011 17:01
-
-
Save freshyill/1198179 to your computer and use it in GitHub Desktop.
CSS3 vendor prefix mixin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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