Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Compass Replacement_Drop-ins
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
border-radius: $radius;
background-clip: padding-box; /* stops bg color from leaking outside the border: */
}
@mixin box-sizing($box-model) {
-webkit-box-sizing: $box-model; // Safari <= 5
-moz-box-sizing: $box-model; // Firefox <= 19
box-sizing: $box-model;
}
@mixin appearance($value) {
-webkit-appearance: $value;
-moz-appearance: $value;
}
@mixin animation($animate...) {
$max: length($animate);
$animations: '';
@for $i from 1 through $max {
$animations: #{$animations + nth($animate, $i)};
@if $i < $max {
$animations: #{$animations + ", "};
}
}
-webkit-animation: $animations;
-moz-animation: $animations;
-o-animation: $animations;
animation: $animations;
}
@mixin keyframes($animationName) {
@-webkit-keyframes #{$animationName} {
@content;
}
@-moz-keyframes #{$animationName} {
@content;
}
@-o-keyframes #{$animationName} {
@content;
}
@keyframes #{$animationName} {
@content;
}
}
@mixin animation-delay($val) {
-moz-animation-delay: $val;
-webkit-animation-delay: $val;
animation-delay: $val;
}
@mixin border-bottom-radius($radius) {
-webkit-border-bottom-right-radius: $radius;
border-bottom-right-radius: $radius;
-webkit-border-bottom-left-radius: $radius;
border-bottom-left-radius: $radius;
background-clip: padding-box;
}
@mixin user-select($none) {
-moz-user-select: -moz-none;
-ms-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@mixin animation-name($name) {
-moz-animation-name: $name;
-webkit-animation-name: $name;
animation-name: $name;
}
@mixin animation-duration($duration) {
-moz-animation-duration: $duration;
-webkit-animation-duration: $duration;
animation-duration: $duration;
}
@mixin animation-iteration-count($count) {
-moz-animation-iteration-count: $count;
-webkit-animation-iteration-count: $count;
animation-iteration-count: $count;
}
@mixin animation-direction($direction) {
-moz-animation-direction: $direction;
-webkit-animation-direction: $direction;
animation-direction: $direction;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.