Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SCSS: 3d shadow
// 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
You can’t perform that action at this time.