Created
March 23, 2011 08:55
-
-
Save wereHamster/882809 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
/* Stupid compass box-shadow mixin doesn't support multiple shadows... */ | |
@mixin box-shadow-2($first, $second) { | |
$full: $first, $second; | |
@include experimental(box-shadow, $full, -moz, -webkit, -o, not -ms, not -khtml, official); | |
} | |
@mixin curl-effect-shadow($corner) { | |
z-index: -1; | |
position: absolute; | |
background: transparent; | |
width: 40%; | |
height: 40%; | |
content: ''; | |
bottom: 0; | |
#{$corner}: 0; | |
$mul: +1; | |
@if $corner == left { $mul: -1; } | |
@include apply-origin($corner bottom); | |
@include transform(1, $mul * 10deg, 0, 0, $mul * 20deg); | |
@include box-shadow(rgba(0, 0, 0, 0.3), 0, 8px, 16px); | |
} | |
@mixin curl-effect($background: #ffffff) { | |
position: relative; | |
background: $background; | |
border: 1px solid lighten($background, 10%); | |
@include box-shadow-2( | |
0 1px 4px rgba(0, 0, 0, 0.27), | |
0 0 60px rgba(0, 0, 0, 0.10) inset | |
); | |
&:before { | |
@include curl-effect-shadow(left); | |
} | |
&:after { | |
@include curl-effect-shadow(right); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment