Last active
December 10, 2015 20:08
-
-
Save tsi/4486153 to your computer and use it in GitHub Desktop.
Extending the standard compass CSS3 mixins with CSS3PIE
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
/////////////////////////////////////////////////////////////////// | |
// Extending the standard compass CSS3 mixins with CSS3PIE | |
/////////////////////////////////////////////////////////////////// | |
$pie: url('/RELATIVE/PATH/TO/PIE.htc'); | |
$pie-approach: relative; | |
@import "compass/css3"; | |
@mixin pie-border-radius($radius, $position: $pie-approach) { | |
@include border-radius($radius); | |
@if $position { | |
position: $position; | |
behavior: $pie; | |
} | |
} | |
@mixin pie-box-shadow($shadow, $position: $pie-approach) { | |
@include box-shadow($shadow); | |
@if $position { | |
position: $position; | |
behavior: $pie; | |
} | |
} | |
@mixin pie-gradient($start, $stop, $direction: top, $position: $pie-approach) { | |
background-color: $start; | |
@include background-image(linear-gradient($direction, $start, $stop)); | |
-pie-background: linear-gradient($direction, $start, $stop); | |
@if $position { | |
position: $position; | |
behavior: $pie; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment