Created
April 27, 2012 07:30
-
-
Save rpearce/2506941 to your computer and use it in GitHub Desktop.
SASS interpolation, list, mixin, and @each
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
// List | |
$box-shadow-properties: -webkit-box-shadow, -moz-box-shadow, box-shadow; | |
// Mixin waiting to be included | |
@mixin box-shadow-with-inset($box-shadow-params, $inset-params) { | |
// Iterates over each element in the list | |
@each $property in $box-shadow-properties { | |
// Uses interpolation to have the compiler then list out the properties listed above | |
#{$property}: $box-shadow-params, $inset-params; } | |
} | |
.logobar-inner { | |
@include box-shadow-with-inset(0px 1px 3px rgba(0, 0, 0, 0.25), inset 0px -1px 0px rgba(0, 0, 0, 0.1)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment