Skip to content

Instantly share code, notes, and snippets.

@tsi
Last active December 10, 2015 20:08
Show Gist options
  • Save tsi/4486153 to your computer and use it in GitHub Desktop.
Save tsi/4486153 to your computer and use it in GitHub Desktop.
Extending the standard compass CSS3 mixins with CSS3PIE
///////////////////////////////////////////////////////////////////
// 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