mirror of https://github.com/twbs/ratchet.git
Build mobile apps with simple HTML, CSS, and JS components.
http://goratchet.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
3.3 KiB
94 lines
3.3 KiB
11 years ago
|
//
|
||
|
// Mixins
|
||
|
// --------------------------------------------------
|
||
|
|
||
11 years ago
|
|
||
|
// General
|
||
|
// --------------------------------------------------
|
||
|
|
||
11 years ago
|
// Box shadow
|
||
|
@mixin box-shadow($shadow...) {
|
||
|
-webkit-box-shadow: $shadow;
|
||
|
box-shadow: $shadow;
|
||
|
}
|
||
|
|
||
11 years ago
|
// Gradients
|
||
|
@mixin gradient($color-form, $color-to) {
|
||
|
background: $color-form; // Old browsers
|
||
|
background: -moz-linear-gradient(top, $color-form 0%, $color-to 100%); // FF3.6+
|
||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$color-form), color-stop(100%,$color-to)); // Chrome,Safari4+
|
||
|
background: -webkit-linear-gradient(top, $color-form 0%, $color-to 100%); // Chrome10+,Safari5.1+
|
||
|
background: -o-linear-gradient(top, $color-form 0%, $color-to 100%); // Opera 11.10+
|
||
|
background: -ms-linear-gradient(top, $color-form 0%, $color-to 100%); // IE10+
|
||
|
background: linear-gradient(to bottom, $color-form 0%, $color-to 100%); // W3C
|
||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$color-form', endColorstr='$color-to',GradientType=0 ); // IE6-9
|
||
|
|
||
|
}
|
||
|
|
||
11 years ago
|
// Transforms
|
||
|
// --------------------------------------------------
|
||
|
@mixin transform($transform) {
|
||
|
-webkit-transform: $transform;
|
||
11 years ago
|
-ms-transform: $transform;
|
||
11 years ago
|
transform: $transform;
|
||
|
}
|
||
|
|
||
|
|
||
11 years ago
|
// Transitions
|
||
11 years ago
|
// --------------------------------------------------
|
||
|
@mixin transition($transition...) {
|
||
|
-webkit-transition: $transition;
|
||
11 years ago
|
-moz-transition: $transition;
|
||
11 years ago
|
transition: $transition;
|
||
|
}
|
||
|
@mixin transition-property($property...) {
|
||
|
-webkit-transition-property: $property;
|
||
11 years ago
|
-moz-transition-property: $property;
|
||
11 years ago
|
transition-property: $property;
|
||
|
}
|
||
|
@mixin transition-duration($duration...) {
|
||
|
-webkit-transition-duration: $duration;
|
||
11 years ago
|
-moz-transition-duration: $duration;
|
||
11 years ago
|
transition-duration: $duration;
|
||
|
}
|
||
|
@mixin transition-timing-function($function...) {
|
||
|
-webkit-transition-timing-function: $function;
|
||
11 years ago
|
-moz-transition-timing-function: $function;
|
||
11 years ago
|
transition-timing-function: $function;
|
||
|
}
|
||
|
|
||
11 years ago
|
|
||
|
// Animations
|
||
|
// --------------------------------------------------
|
||
11 years ago
|
@mixin animation-name($name) {
|
||
|
-webkit-animation-name: $name;
|
||
11 years ago
|
-moz-animation-name: $name;
|
||
11 years ago
|
animation-name: $name;
|
||
|
}
|
||
|
@mixin animation-duration($duration) {
|
||
|
-webkit-animation-duration: $duration;
|
||
11 years ago
|
-moz-animation-duration: $duration;
|
||
11 years ago
|
animation-duration: $duration;
|
||
|
}
|
||
|
@mixin animation-direction($direction) {
|
||
|
-webkit-animation-direction: $direction;
|
||
11 years ago
|
-moz-animation-direction: $direction;
|
||
11 years ago
|
animation-direction: $direction;
|
||
11 years ago
|
}
|
||
|
|
||
|
|
||
|
// Misc
|
||
|
// --------------------------------------------------
|
||
11 years ago
|
@mixin hairline($type, $color, $offset) {
|
||
11 years ago
|
@if $type == single {
|
||
11 years ago
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='1'><rect fill='#{$color}' x='0' y='0' width='100%' height='0.5'/></svg>");
|
||
11 years ago
|
background-position: $offset 100%;
|
||
|
|
||
|
} @else if $type == double {
|
||
11 years ago
|
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='1'><rect fill='#{$color}' x='0' y='0' width='100%' height='0.5'/></svg>"),
|
||
|
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='1'><rect fill='#{$color}' x='0' y='0' width='100%' height='0.5'/></svg>");
|
||
11 years ago
|
background-position: $offset 100%, $offset 0%;
|
||
|
}
|
||
|
background-repeat: no-repeat;
|
||
|
}
|