2 * Corner folded with pure CSS
4 * Known support: Firefox 3.5+, Chrome 4+, Safari 4+, Opera 10+, IE 9+.
5 * IE8 is not supported because it not render properly box-shadow and
6 * pseudo element should be selected with ::element and not :element
8 * @thanks Nicolas Gallagher @necolas
9 * @link http://nicolasgallagher.com/pure-css-folded-corner-effect/demo/
12 @import "recipes/shared/pseudo-element";
14 @mixin folded-corner (
17 $background-color: #fff,
20 $box-shadow: rgba(0, 0, 0, .3) 0 0 .6em)
27 @include pseudo-element;
30 @include box-shadow($box-shadow);
32 @if ($position == 'top-right')
36 border-width: 0 $width $width 0;
37 border-color: $color $background-color;
38 @include border-radius(0 0 0 $border-radius);
40 @elseif ($position == 'top-left')
44 border-width: $width $width 0 0;
45 border-color: $background-color $color;
46 @include border-radius(0 0 $border-radius 0);
48 @elseif ($position == 'bottom-right')
52 border-width: 0 0 $width $width;
53 border-color: $background-color $color;
54 @include border-radius($border-radius 0 0 0);
56 @elseif ($position == 'bottom-left')
60 border-width: $width 0 0 $width;
61 border-color: $color $background-color;
62 @include border-radius(0 $border-radius 0 0);