Skip to content

Instantly share code, notes, and snippets.

@abachuk
Created July 15, 2012 20:15
Show Gist options
  • Save abachuk/3118467 to your computer and use it in GitHub Desktop.
Save abachuk/3118467 to your computer and use it in GitHub Desktop.
SASS Mixins
@mixin box-shadow($shadow) {
-moz-box-shadow: $shadow;
-webkit-box-shadow: $shadow;
box-shadow: $shadow
}
@mixin transition($trans) {
-webkit-transition:$trans;
-moz-transition:$trans;
-o-transition:$trans;
transition:$trans;
}
@mixin border-radius($radius) {
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
@mixin gradient($start, $end, $default_color) {
background: $default_color;
background: -moz-linear-gradient(top, $start 0%, $end 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$start), color-stop(100%,$end));
background: -webkit-linear-gradient(top, $start 0%,$end 100%);
background: -o-linear-gradient(top, $start 0%,$end 100%);
background: -ms-linear-gradient(top, $start 0%,$end 100%);
background: linear-gradient(top, $start 0%,$end 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$start', endColorstr='$end',GradientType=0 );
}
@mixin box-sizing() {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment