forked from jsundra/controlkit.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mixins.scss
77 lines (64 loc) · 1.87 KB
/
_mixins.scss
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
@mixin linear-gradient($args...){
background-image:-o-linear-gradient($args);
background-image:linear-gradient($args);
}
@mixin linear-gradient-with-background($gradient,$color){
background: $color;
@include linear-gradient($gradient);
}
@mixin linear-gradient-with-image($gradient,$image){
background: $image, -o-linear-gradient($gradient);
background: $image, linear-gradient($gradient);
}
@mixin horizontal-linear-gradient($args...){
background-image: linear-gradient(to right, $args);
}
@mixin horizontal-linear-gradient-with-background($gradient,$background){
background: $background;
@include horizontal-linear-gradient($gradient);
}
@mixin user-select-none(){
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@mixin box-sizing($model){
-webkit-box-sizing: $model;
-moz-box-sizing: $model;
box-sizing: $model;
}
@mixin border-radius($radius){
border-radius: $radius;
-moz-border-radius: $radius;
}
@mixin border($border,$radius){
border: $border;
@include border-radius($radius)
}
@mixin arrow($width, $height, $color, $direction) {
width: 0;
height: 0;
@if ($direction == 'up') {
border-left: $width * 0.5 solid transparent;
border-right: $width * 0.5 solid transparent;
border-bottom: $height solid $color;
}
@if ($direction == 'down') {
border-left: $width * 0.5 solid transparent;
border-right: $width * 0.5 solid transparent;
border-top: $height solid $color;
}
@if ($direction == 'left') {
border-top: $height * 0.5 solid transparent;
border-bottom: $height * 0.5 solid transparent;
border-right: $width solid $color;
}
@if ($direction == 'right') {
border-top: $height * 0.5 solid transparent;
border-bottom: $height * 0.5 solid transparent;
border-left: $width solid $color;
}
}