Created
May 27, 2012 15:09
-
-
Save paprikka/2814630 to your computer and use it in GitHub Desktop.
SCSS: 3d shadow
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
// usage text-shadow / box-shadow : shadow-3d($color, $length); | |
// adds pseudo-3d vertical shadow | |
@function shadow-3d($col, $h){ | |
$str : ""; | |
$shadow-col : darken($col, 5%); | |
@for $i from 1 through $h{ | |
$str : "#{$str} 0 #{$i}px 0 #{$shadow-col},"; | |
} | |
$str : "#{$str} 0 #{$h}px 10px rgba(0,0,0,.6), 0 #{$h}px 4px rgba(0,0,0,.4)" ; | |
@return unquote($str); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment