1 | @import '~bootstrap-sass/assets/stylesheets/bootstrap/mixins';
|
2 |
|
3 |
|
4 | @mixin create-animation($animation-name, $args...) {
|
5 | #{$animation-name} {
|
6 | animation: $args;
|
7 | }
|
8 | }
|
9 |
|
10 |
|
11 | @mixin filter($args...) {
|
12 |
|
13 | -webkit-filter: $args;
|
14 | -moz-filter: $args;
|
15 | -o-filter: $args;
|
16 | -ms-filter: $args;
|
17 | filter: $args;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 | @mixin overflow($horizontal, $vertical) {
|
23 |
|
24 | overflow-x: $horizontal;
|
25 | overflow-y: $vertical;
|
26 | -ms-overflow-style: -ms-autohiding-scrollbar;
|
27 | -webkit-overflow-scrolling: touch;
|
28 | }
|
29 |
|
30 |
|
31 | @mixin spacer($property, $side, $value: $spacer-size) {
|
32 | @if ($side == top) or ($side == right) or ($side == bottom) or ($side == left) {
|
33 | #{$property}-#{$side}: $value;
|
34 | }
|
35 | @else if ($side == vertical) {
|
36 | #{$property}-top: $value;
|
37 | #{$property}-bottom: $value;
|
38 | }
|
39 | @else if ($side == horizontal) {
|
40 | #{$property}-right: $value;
|
41 | #{$property}-left: $value;
|
42 | }
|
43 | @else if ($side == all) {
|
44 | #{$property}: $value;
|
45 | }
|
46 | @else {
|
47 | @error 'Invalid spacer side argument: #{$side}';
|
48 | }
|
49 | }
|
50 |
|
51 | @mixin create-spacers($prefix, $property, $side, $value) {
|
52 | @if ($value > 0) {
|
53 | #{$prefix}-auto {
|
54 | @include spacer($property, $side, auto);
|
55 | }
|
56 | }
|
57 |
|
58 | #{$prefix}-0 {
|
59 | @include spacer($property, $side, 0);
|
60 | }
|
61 |
|
62 | #{$prefix}-xxs {
|
63 | @include spacer($property, $side, $value * 0.125);
|
64 | }
|
65 |
|
66 | #{$prefix}-xs {
|
67 | @include spacer($property, $side, $value * 0.25);
|
68 | }
|
69 |
|
70 | #{$prefix}-sm {
|
71 | @include spacer($property, $side, $value * 0.5);
|
72 | }
|
73 |
|
74 | #{$prefix}-md {
|
75 | @include spacer($property, $side, $value);
|
76 | }
|
77 |
|
78 | #{$prefix}-lg {
|
79 | @include spacer($property, $side, $value * 2);
|
80 | }
|
81 |
|
82 | #{$prefix}-xl {
|
83 | @include spacer($property, $side, $value * 3);
|
84 | }
|
85 |
|
86 | #{$prefix}-xxl {
|
87 | @include spacer($property, $side, $value * 5);
|
88 | }
|
89 | }
|