I suspect that some trig calculations could make this very general.
Created
May 6, 2011 09:10
-
-
Save chriseppstein/958668 to your computer and use it in GitHub Desktop.
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
@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, &:after { | |
content: ""; | |
position: absolute; | |
bottom: 2px; | |
width: $width / 2; | |
height: 10px; | |
z-index: -1; | |
@include box-shadow(0 10px 10px 1px $color); | |
} | |
&:before { | |
left: 10px; | |
@include rotate(-$angle); | |
} | |
&:after { | |
right: 10px; | |
@include rotate($angle); | |
} | |
} |
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
#photo-widget { | |
.no-boxshadow &, .no-csstransforms & { | |
.viewport { | |
padding-bottom: image-height('local/provider/photo-shadow-left.png') + 1px; | |
background: transparent image-url('local/provider/photo-shadow-left.png') no-repeat bottom left; | |
} | |
.shadow { | |
background: transparent image-url('local/provider/photo-shadow-right.png') no-repeat bottom right; | |
height: image-height('local/provider/photo-shadow-right.png'); | |
width: image-width('local/provider/photo-shadow-right.png'); | |
position: absolute; | |
bottom: 0; | |
right: 0; | |
} | |
} | |
.boxshadow.csstransforms & { | |
.viewport { | |
@include bendy-shadow(250px); | |
} | |
.shadow { | |
display: none; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is sexy. Thanks for sharing boss!