_mixins.scss
1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// MIXINS
@mixin border-radius($radius) {
border-radius: $radius;
background-clip: padding-box; /* stops bg color from leaking outside the border: */
}
@mixin checkbox-mark($width, $height, $top, $left, $bg, $border, $content: "", $cursor: pointer, $position: absolute) {
width: $width;
height: $height;
cursor: $cursor;
position: $position;
left: $left;
top: $top;
background: $bg;
content: $content;
border: $border;
}
@mixin opacity($opacity) {
/* Netscape */
-moz-opacity: $opacity;
/* Safari 1.x */
-khtml-opacity: $opacity;
/* Good browsers */
opacity: $opacity;
}
@mixin transition($args...) {
$duration: 300ms;
$keys: keywords($args);
@if map-has-key($keys, duration) {
$duration: map-get($keys, duration);
}
-webkit-transition: $args;
-o-transition: $args;
transition: $args;
-webkit-transition-duration: $duration;
transition-duration: $duration;
}
@mixin outline($style: none, $width: 0px) {
&:focus {
outline-style: $style;
outline-width: $width;
}
}