I suspect that some trig calculations could make this very general.
-
-
Save jmwhittaker/958675 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@mixin bendy-shadow($width, $angle: 5deg, $color: rgba(#333, 0.5)) { | |
position: relative; | |
z-index: 1; | |
@include box-shadow(0 10px 5px -5px $color); | |
&:before { | |
content: ""; | |
position: absolute; | |
bottom: 2px; | |
left: 10px; | |
width: $width / 2; | |
height: 10px; | |
z-index: -1; | |
@include box-shadow(0 10px 10px 1px $color); | |
@include rotate(-$angle); | |
} | |
&:after { | |
content: ""; | |
position: absolute; | |
bottom: 2px; | |
right: 10px; | |
width: $width / 2; | |
height: 10px; | |
z-index: -1; | |
@include box-shadow(0 10px 10px 1px $color); | |
@include rotate($angle); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment