Last active
August 29, 2015 13:58
-
-
Save christabor/9995346 to your computer and use it in GitHub Desktop.
Some old mixins from automotron.com
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
// MIT LICENSE - use for whatever! | |
@mixin transition($property, $time, $easing) { | |
-moz-transition: $property $time $easing; | |
-webkit-transition: $property $time $easing; | |
-o-transition: $property $time $easing; | |
transition: $property $time $easing; | |
} | |
@mixin column-count($gap, $count) { | |
-moz-column-count: $count; | |
-webkit-column-count: $count; | |
column-count: $count; | |
-moz-column-gap: $gap; /* Firefox */ | |
-webkit-column-gap: $gap; /* Safari and Chrome */ | |
column-gap: $gap; | |
} | |
@mixin tri-gradient($top, $middle, $bottom) { | |
background: $top; /* Old browsers */ | |
background: -moz-linear-gradient(top, $top 0%, $middle 50%, $bottom 100%); /* FF3.6+ */ | |
background: -webkit-linear-gradient(top, $top 0%, $middle 50%, $bottom 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, $top 0%, $middle 50%, $bottom 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, $top 0%, $middle 50%, $bottom 100%); /* IE10+ */ | |
background: linear-gradient(top, $top 0%, $middle 50%, $bottom 100%); /* W3C */ | |
border: none; | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$top', endColorstr='$bottom',GradientType=0 ); /* IE6-9 */ | |
} | |
@mixin tri-h-gradient($top, $middle, $bottom) { | |
background: $top; /* Old browsers */ | |
background: -moz-linear-gradient(left, $top 0%, $middle 50%, $bottom 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, right top, color-stop(0%,$top), color-stop(50%, $middle), color-stop(100%, $bottom)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(left, $top 0%, $middle 50%, $bottom 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(left, $top 0%, $middle 50%, $bottom 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(left, $top 0%, $middle 50%, $bottom 100%); /* IE10+ */ | |
background: linear-gradient(top right, $top 0%, $middle 50%, $bottom 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#$top', endColorstr='$bottom',GradientType=1 ); /* IE6-9 */ | |
} | |
@mixin radial-gradient($inner, $outer) { | |
background: $outer; /* Old browsers */ | |
background: -moz-radial-gradient(center, ellipse cover, $outer 60%, $inner 100%); /* FF3.6+ */ | |
background: -webkit-gradient(radial, center center, 0, center center, 100%, color-stop(60%,$outer), color-stop(100%,$inner)); /* Chrome,Safari4+ */ | |
background: -webkit-radial-gradient(center, ellipse cover, $outer 60%,$inner 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-radial-gradient(center, ellipse cover, $outer 60%,$inner 100%); /* Opera 12+ */ | |
background: -ms-radial-gradient(center, ellipse cover, $outer 60%,$inner 100%); /* IE10+ */ | |
background: radial-gradient(ellipse at center, $outer 60%,$inner 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$inner', endColorstr='$outer',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ | |
} | |
@mixin scale($x, $y) { | |
transform: scale($x, $x); | |
-webkit-transform: scale($x, $x); | |
-moz-transform: scale($x, $x); | |
-o-transform: scale($x, $x); | |
-ms-transform: scale($x, $x); | |
} | |
@mixin box-shadow($is_inset, $x, $y, $blur, $color) { | |
@if($is_inset) { | |
-webkit-box-shadow: inset $x $y $blur $color; | |
-moz-box-shadow: inset $x $y $blur $color; | |
box-shadow: inset $x $y $blur $color; | |
} @else { | |
-webkit-box-shadow: $x $y $blur $color; | |
-moz-box-shadow: $x $y $blur $color; | |
box-shadow: $x $y $blur $color; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment