_mixins.scss
1.11 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
// MIXINS
@mixin border-radius($radius) {
border-radius: $radius;
background-clip: padding-box; /* stops bg color from leaking outside the border: */
}
@mixin box-sizing($box-model) {
box-sizing: $box-model;
}
@mixin abs-pos ($top: auto, $right: auto, $bottom: auto, $left: auto) {
top: $top;
right: $right;
bottom: $bottom;
left: $left;
position: absolute;
}
@mixin font-size($size: 12, $base: 16) {
font-size: $size + px;
font-size: ($size / $base) * 1rem;
}
@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;
}
}
@mixin animation($str) {
-webkit-animation: #{$str};
-moz-animation: #{$str};
-ms-animation: #{$str};
-o-animation: #{$str};
animation: #{$str};
}
@mixin transition($args...) {
transition: $args;
}
@mixin opacity($opacity) {
opacity: $opacity;
}
// PLACEHOLDERS
%text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}