_mixins.scss
1.79 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// MIXINS
@mixin border-radius($radius) {
border-radius: $radius;
background-clip: padding-box; /* stops bg color from leaking outside the border: */
}
@mixin box-shadow($args...) {
-webkit-box-shadow: $args;
-moz-box-shadow: $args;
box-shadow: $args;
}
@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;
}
}
@mixin not-select() {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Chrome/Safari/Opera */
-khtml-user-select: none; /* Konqueror */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
not supported by any browser */
}
@mixin keyframes($animation-name) {
@-webkit-keyframes #{$animation-name} {
@content;
}
@-moz-keyframes #{$animation-name} {
@content;
}
@-ms-keyframes #{$animation-name} {
@content;
}
@-o-keyframes #{$animation-name} {
@content;
}
@keyframes #{$animation-name} {
@content;
}
}