@oruga-ui/theme-oruga 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +5 -5
- package/dist/scss/components/_autocomplete.scss +3 -12
- package/dist/scss/components/_breadcrumb.scss +122 -103
- package/dist/scss/components/_button.scss +228 -173
- package/dist/scss/components/_carousel.scss +164 -142
- package/dist/scss/components/_checkbox.scss +118 -118
- package/dist/scss/components/_collapse.scss +1 -1
- package/dist/scss/components/_datepicker.scss +228 -290
- package/dist/scss/components/_datetimepicker.scss +8 -2
- package/dist/scss/components/_dialog.scss +243 -0
- package/dist/scss/components/_dropdown.scss +190 -164
- package/dist/scss/components/_field.scss +68 -39
- package/dist/scss/components/_icon.scss +24 -29
- package/dist/scss/components/_input.scss +112 -97
- package/dist/scss/components/_listbox.scss +176 -0
- package/dist/scss/components/_loading.scss +35 -15
- package/dist/scss/components/_menu.scss +113 -109
- package/dist/scss/components/_modal.scss +112 -50
- package/dist/scss/components/_notification.scss +113 -97
- package/dist/scss/components/_pagination.scss +173 -106
- package/dist/scss/components/_radio.scss +91 -84
- package/dist/scss/components/_select.scss +108 -115
- package/dist/scss/components/_sidebar.scss +102 -101
- package/dist/scss/components/_skeleton.scss +50 -39
- package/dist/scss/components/_slider.scss +221 -159
- package/dist/scss/components/_steps.scss +223 -261
- package/dist/scss/components/_switch.scss +126 -90
- package/dist/scss/components/_table.scss +307 -251
- package/dist/scss/components/_tabs.scss +360 -247
- package/dist/scss/components/_tag.scss +95 -39
- package/dist/scss/components/_taginput.scss +48 -36
- package/dist/scss/components/_timepicker.scss +61 -62
- package/dist/scss/components/_tooltip.scss +129 -254
- package/dist/scss/components/_upload.scss +83 -35
- package/dist/scss/theme-build.scss +9 -0
- package/dist/scss/theme.scss +44 -0
- package/dist/scss/utils/_animations.scss +30 -9
- package/dist/scss/utils/_base.scss +6 -4
- package/dist/scss/utils/_helpers.scss +84 -22
- package/dist/scss/utils/_root.scss +82 -29
- package/dist/scss/utils/_variables.scss +64 -42
- package/dist/theme.css +2 -0
- package/dist/theme.js +1 -1
- package/package.json +27 -20
- package/dist/oruga.css +0 -2
- package/dist/scss/oruga-build.scss +0 -9
- package/dist/scss/oruga.scss +0 -42
|
@@ -1,25 +1,87 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
|
+
@use "../utils/helpers" as h;
|
|
3
|
+
@use "../utils/variables" as vars;
|
|
2
4
|
|
|
3
5
|
/* @docs */
|
|
4
|
-
$upload-draggable-
|
|
5
|
-
$upload-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
$upload-draggable-padding: calc(4 * h.useVar("control-spacer")) !default;
|
|
7
|
+
$upload-disabled-opacity: h.useVar("control-disabled-opacity") !default;
|
|
8
|
+
|
|
9
|
+
$upload-draggable-background-color: h.useVar(
|
|
10
|
+
"control-background-color"
|
|
11
|
+
) !default;
|
|
12
|
+
$upload-draggable-border-color: h.useVar("control-border-color") !default;
|
|
13
|
+
$upload-draggable-border-style: dashed !default;
|
|
14
|
+
$upload-draggable-border-radius: h.useVar("border-radius") !default;
|
|
15
|
+
$upload-draggable-border-width: h.useVar("control-border-width") !default;
|
|
16
|
+
$upload-draggable-hover-border-color: h.useVar("secondary") !default;
|
|
17
|
+
$upload-draggable-hover-background-color: h.useVar(
|
|
18
|
+
"control-background-color"
|
|
8
19
|
) !default;
|
|
9
|
-
$upload-draggable-hover-border-color: var(--#{$prefix}grey) !default;
|
|
10
|
-
$upload-draggable-padding: 2em !default;
|
|
11
20
|
/* @docs */
|
|
12
21
|
|
|
13
22
|
.o-upload {
|
|
23
|
+
@include h.defineVar("upload-draggable-padding", $upload-draggable-padding);
|
|
24
|
+
@include h.defineVar("upload-disabled-opacity", $upload-disabled-opacity);
|
|
25
|
+
|
|
26
|
+
@include h.defineVar(
|
|
27
|
+
"upload-draggable-background-color",
|
|
28
|
+
$upload-draggable-background-color
|
|
29
|
+
);
|
|
30
|
+
@include h.defineVar(
|
|
31
|
+
"upload-draggable-border-color",
|
|
32
|
+
$upload-draggable-border-color
|
|
33
|
+
);
|
|
34
|
+
@include h.defineVar(
|
|
35
|
+
"upload-draggable-border-style",
|
|
36
|
+
$upload-draggable-border-style
|
|
37
|
+
);
|
|
38
|
+
@include h.defineVar(
|
|
39
|
+
"upload-draggable-border-radius",
|
|
40
|
+
$upload-draggable-border-radius
|
|
41
|
+
);
|
|
42
|
+
@include h.defineVar(
|
|
43
|
+
"upload-draggable-border-radius",
|
|
44
|
+
$upload-draggable-border-radius
|
|
45
|
+
);
|
|
46
|
+
@include h.defineVar(
|
|
47
|
+
"upload-draggable-border-width",
|
|
48
|
+
$upload-draggable-border-width
|
|
49
|
+
);
|
|
50
|
+
@include h.defineVar(
|
|
51
|
+
"upload-draggable-hover-border-color",
|
|
52
|
+
$upload-draggable-hover-border-color
|
|
53
|
+
);
|
|
54
|
+
@include h.defineVar(
|
|
55
|
+
"upload-draggable-hover-background-color",
|
|
56
|
+
$upload-draggable-hover-background-color
|
|
57
|
+
);
|
|
58
|
+
|
|
14
59
|
position: relative;
|
|
15
60
|
display: inline-flex;
|
|
16
61
|
|
|
62
|
+
// color variants
|
|
63
|
+
@each $name, $pair in vars.$colors {
|
|
64
|
+
&--#{$name} {
|
|
65
|
+
@include h.defineVar(
|
|
66
|
+
"upload-draggable-border-color",
|
|
67
|
+
h.useVar($name)
|
|
68
|
+
);
|
|
69
|
+
@include h.defineVar(
|
|
70
|
+
"upload-draggable-hover-background-color",
|
|
71
|
+
h.useVar("#{$name}-lighter")
|
|
72
|
+
);
|
|
73
|
+
@include h.defineVar(
|
|
74
|
+
"upload-draggable-hover-border-color",
|
|
75
|
+
h.useVar($name)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// add clickable cursor
|
|
81
|
+
@include h.clickable;
|
|
82
|
+
|
|
17
83
|
&--disabled {
|
|
18
|
-
|
|
19
|
-
--#{$prefix}upload-draggable-disabled-opacity,
|
|
20
|
-
$upload-draggable-disabled-opacity
|
|
21
|
-
);
|
|
22
|
-
cursor: not-allowed;
|
|
84
|
+
@include h.disabled(h.useVar("upload-disabled-opacity"));
|
|
23
85
|
}
|
|
24
86
|
|
|
25
87
|
&--expanded {
|
|
@@ -27,35 +89,21 @@ $upload-draggable-padding: 2em !default;
|
|
|
27
89
|
}
|
|
28
90
|
|
|
29
91
|
&__draggable {
|
|
30
|
-
cursor: pointer;
|
|
31
92
|
width: 100%;
|
|
93
|
+
padding: h.useVar("upload-draggable-padding");
|
|
32
94
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
);
|
|
37
|
-
border:
|
|
38
|
-
--#{$prefix}upload-draggable-border,
|
|
39
|
-
$upload-draggable-border
|
|
40
|
-
);
|
|
41
|
-
border-radius: var(
|
|
42
|
-
--#{$prefix}upload-draggable-border-radius,
|
|
43
|
-
$upload-draggable-border-radius
|
|
44
|
-
);
|
|
95
|
+
background-color: h.useVar("upload-draggable-background-color");
|
|
96
|
+
border-radius: h.useVar("upload-draggable-border-radius");
|
|
97
|
+
border-width: h.useVar("upload-draggable-border-width");
|
|
98
|
+
border-color: h.useVar("upload-draggable-border-color");
|
|
99
|
+
border-style: h.useVar("upload-draggable-border-style");
|
|
45
100
|
|
|
101
|
+
&:hover,
|
|
46
102
|
&--hovered {
|
|
47
|
-
border-color:
|
|
48
|
-
|
|
49
|
-
|
|
103
|
+
border-color: h.useVar("upload-draggable-hover-border-color");
|
|
104
|
+
background-color: h.useVar(
|
|
105
|
+
"upload-draggable-hover-background-color"
|
|
50
106
|
);
|
|
51
|
-
|
|
52
|
-
@each $name, $pair in $colors {
|
|
53
|
-
$color: list.nth($pair, 1);
|
|
54
|
-
|
|
55
|
-
&-#{$name} {
|
|
56
|
-
border-color: var(--#{$prefix}variant-#{$name}, $color);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
107
|
}
|
|
60
108
|
}
|
|
61
109
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/******************
|
|
2
|
+
* Theme Styles
|
|
3
|
+
*******************/
|
|
4
|
+
|
|
5
|
+
// import globals, helpers and functions
|
|
6
|
+
@forward "utils/animations";
|
|
7
|
+
@forward "utils/helpers";
|
|
8
|
+
@forward "utils/root";
|
|
9
|
+
@forward "utils/base";
|
|
10
|
+
|
|
11
|
+
// import theme components
|
|
12
|
+
@forward "components/autocomplete";
|
|
13
|
+
@forward "components/breadcrumb";
|
|
14
|
+
@forward "components/button";
|
|
15
|
+
@forward "components/carousel";
|
|
16
|
+
@forward "components/checkbox";
|
|
17
|
+
@forward "components/collapse";
|
|
18
|
+
@forward "components/datepicker";
|
|
19
|
+
@forward "components/datetimepicker";
|
|
20
|
+
@forward "components/dialog";
|
|
21
|
+
@forward "components/dropdown";
|
|
22
|
+
@forward "components/field";
|
|
23
|
+
@forward "components/icon";
|
|
24
|
+
@forward "components/input";
|
|
25
|
+
@forward "components/listbox";
|
|
26
|
+
@forward "components/loading";
|
|
27
|
+
@forward "components/menu";
|
|
28
|
+
@forward "components/modal";
|
|
29
|
+
@forward "components/notification";
|
|
30
|
+
@forward "components/pagination";
|
|
31
|
+
@forward "components/radio";
|
|
32
|
+
@forward "components/select";
|
|
33
|
+
@forward "components/skeleton";
|
|
34
|
+
@forward "components/sidebar";
|
|
35
|
+
@forward "components/slider";
|
|
36
|
+
@forward "components/steps";
|
|
37
|
+
@forward "components/switch";
|
|
38
|
+
@forward "components/table";
|
|
39
|
+
@forward "components/tabs";
|
|
40
|
+
@forward "components/tag";
|
|
41
|
+
@forward "components/taginput";
|
|
42
|
+
@forward "components/timepicker";
|
|
43
|
+
@forward "components/tooltip";
|
|
44
|
+
@forward "components/upload";
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
// Some of the animations are from animate.css (https://daneden.github.io/animate.css)
|
|
2
2
|
|
|
3
|
+
@use "./helpers" as h;
|
|
4
|
+
@use "./variables" as vars;
|
|
5
|
+
|
|
6
|
+
// Spin around
|
|
7
|
+
@keyframes spinAround {
|
|
8
|
+
from {
|
|
9
|
+
-webkit-transform: rotate(0deg);
|
|
10
|
+
transform: rotate(0deg);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
to {
|
|
14
|
+
-webkit-transform: rotate(359deg);
|
|
15
|
+
transform: rotate(359deg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
3
19
|
// Fade out
|
|
4
20
|
@keyframes fadeOut {
|
|
5
21
|
from {
|
|
@@ -111,7 +127,8 @@
|
|
|
111
127
|
// Fade
|
|
112
128
|
.fade-enter-active,
|
|
113
129
|
.fade-leave-active {
|
|
114
|
-
transition: opacity
|
|
130
|
+
transition: opacity h.useVar("animation-speed-fast")
|
|
131
|
+
h.useVar("animation-timing");
|
|
115
132
|
}
|
|
116
133
|
|
|
117
134
|
.fade-enter,
|
|
@@ -123,10 +140,12 @@
|
|
|
123
140
|
// Zoom In
|
|
124
141
|
.zoom-in-enter-active,
|
|
125
142
|
.zoom-in-leave-active {
|
|
126
|
-
transition: opacity
|
|
143
|
+
transition: opacity h.useVar("animation-speed-fast")
|
|
144
|
+
h.useVar("animation-timing");
|
|
127
145
|
|
|
128
146
|
.animation-content {
|
|
129
|
-
transition: transform
|
|
147
|
+
transition: transform h.useVar("animation-speed-fast")
|
|
148
|
+
h.useVar("animation-timing");
|
|
130
149
|
}
|
|
131
150
|
}
|
|
132
151
|
|
|
@@ -143,10 +162,12 @@
|
|
|
143
162
|
// Zoom Out
|
|
144
163
|
.zoom-out-enter-active,
|
|
145
164
|
.zoom-out-leave-active {
|
|
146
|
-
transition: opacity
|
|
165
|
+
transition: opacity h.useVar("animation-speed-fast")
|
|
166
|
+
h.useVar("animation-timing");
|
|
147
167
|
|
|
148
168
|
.animation-content {
|
|
149
|
-
transition: transform
|
|
169
|
+
transition: transform h.useVar("animation-speed-fast")
|
|
170
|
+
h.useVar("animation-timing");
|
|
150
171
|
}
|
|
151
172
|
}
|
|
152
173
|
|
|
@@ -165,7 +186,7 @@
|
|
|
165
186
|
.slide-next-leave-active,
|
|
166
187
|
.slide-prev-enter-active,
|
|
167
188
|
.slide-prev-leave-active {
|
|
168
|
-
transition: transform
|
|
189
|
+
transition: transform vars.$animation-speed
|
|
169
190
|
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
170
191
|
}
|
|
171
192
|
|
|
@@ -189,7 +210,7 @@
|
|
|
189
210
|
.slide-down-leave-active,
|
|
190
211
|
.slide-up-enter-active,
|
|
191
212
|
.slide-up-leave-active {
|
|
192
|
-
transition: transform
|
|
213
|
+
transition: transform vars.$animation-speed
|
|
193
214
|
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
194
215
|
}
|
|
195
216
|
|
|
@@ -210,11 +231,11 @@
|
|
|
210
231
|
}
|
|
211
232
|
|
|
212
233
|
.slide-enter-active {
|
|
213
|
-
transition:
|
|
234
|
+
transition: h.useVar("animation-speed-fast") h.useVar("animation-timing");
|
|
214
235
|
}
|
|
215
236
|
|
|
216
237
|
.slide-leave-active {
|
|
217
|
-
transition:
|
|
238
|
+
transition: h.useVar("animation-speed-fast") h.useVar("animation-timing");
|
|
218
239
|
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
|
219
240
|
}
|
|
220
241
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "./helpers" as h;
|
|
2
|
+
|
|
1
3
|
*,
|
|
2
4
|
:after,
|
|
3
5
|
:before {
|
|
@@ -12,10 +14,10 @@ body {
|
|
|
12
14
|
margin: 0;
|
|
13
15
|
padding: 0;
|
|
14
16
|
|
|
15
|
-
font-family:
|
|
16
|
-
font-size:
|
|
17
|
-
font-weight:
|
|
18
|
-
line-height:
|
|
17
|
+
font-family: h.useVar("font-family");
|
|
18
|
+
font-size: h.useVar("font-size");
|
|
19
|
+
font-weight: h.useVar("font-weight");
|
|
20
|
+
line-height: h.useVar("line-height");
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
img,
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
/**********************************
|
|
2
|
+
* Utility mixins and functions
|
|
3
|
+
***********************************/
|
|
1
4
|
@use "sass:string";
|
|
2
5
|
@use "sass:math";
|
|
3
6
|
@use "sass:color";
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
@use "./variables" as vars;
|
|
9
|
+
|
|
10
|
+
/// register a css variable with global prefix
|
|
11
|
+
@mixin defineVar($name, $value) {
|
|
12
|
+
$varName: "--#{vars.$prefix}-#{$name}";
|
|
13
|
+
|
|
14
|
+
#{$varName}: #{$value};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/// use a css variable with global prefix
|
|
18
|
+
@function useVar($name) {
|
|
19
|
+
$varName: "--#{vars.$prefix}-#{$name}";
|
|
20
|
+
|
|
21
|
+
@return var(#{$varName});
|
|
22
|
+
}
|
|
8
23
|
|
|
9
24
|
/// Replaces characters in a string
|
|
10
25
|
///
|
|
@@ -60,24 +75,6 @@
|
|
|
60
75
|
@return "data:image/svg+xml,#{$encoded}";
|
|
61
76
|
}
|
|
62
77
|
|
|
63
|
-
@mixin unselectable {
|
|
64
|
-
-webkit-touch-callout: none;
|
|
65
|
-
-webkit-user-select: none;
|
|
66
|
-
-moz-user-select: none;
|
|
67
|
-
-ms-user-select: none;
|
|
68
|
-
user-select: none;
|
|
69
|
-
}
|
|
70
|
-
@mixin side-flex-gap($gap) {
|
|
71
|
-
//flex-wrap: wrap;
|
|
72
|
-
margin-left: -$gap;
|
|
73
|
-
margin-right: -$gap;
|
|
74
|
-
|
|
75
|
-
& > * {
|
|
76
|
-
margin-left: $gap;
|
|
77
|
-
margin-right: $gap;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
78
|
// Custom divide function by @mdo from https://github.com/twbs/bootstrap/pull/34245
|
|
82
79
|
// Replaces old slash division deprecated in Dart Sass
|
|
83
80
|
@function divide($dividend, $divisor, $precision: 10) {
|
|
@@ -86,12 +83,15 @@
|
|
|
86
83
|
$divisor: math.abs($divisor);
|
|
87
84
|
$quotient: 0;
|
|
88
85
|
$remainder: $dividend;
|
|
86
|
+
|
|
89
87
|
@if $dividend == 0 {
|
|
90
88
|
@return 0;
|
|
91
89
|
}
|
|
90
|
+
|
|
92
91
|
@if $divisor == 0 {
|
|
93
92
|
@error "Cannot divide by 0";
|
|
94
93
|
}
|
|
94
|
+
|
|
95
95
|
@if $divisor == 1 {
|
|
96
96
|
@return $dividend;
|
|
97
97
|
}
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
$quotient: $quotient + 1;
|
|
101
101
|
$remainder: $remainder - $divisor;
|
|
102
102
|
}
|
|
103
|
+
|
|
103
104
|
@if $remainder > 0 and $precision > 0 {
|
|
104
105
|
$remainder: divide($remainder * 10, $divisor, $precision - 1) * 0.1;
|
|
105
106
|
}
|
|
@@ -107,7 +108,68 @@
|
|
|
107
108
|
@return ($quotient + $remainder) * $sign;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
/// create a focus color variant based on a given color
|
|
111
112
|
@function createFocus($color) {
|
|
112
113
|
@return color.adjust($color, $alpha: -0.75);
|
|
113
114
|
}
|
|
115
|
+
|
|
116
|
+
/// create a lighter color variant based on a given color
|
|
117
|
+
@function createLighter($color) {
|
|
118
|
+
@return color.scale($color, $lightness: 95%);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/// create a darker color variant based on a given color
|
|
122
|
+
@function createDarker($color) {
|
|
123
|
+
@return color.scale($color, $lightness: -10%);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/// define disabled state
|
|
127
|
+
@mixin disabled($opacity) {
|
|
128
|
+
opacity: $opacity;
|
|
129
|
+
cursor: unset;
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
text-decoration: none;
|
|
132
|
+
|
|
133
|
+
// define unselectable state
|
|
134
|
+
user-select: none;
|
|
135
|
+
-ms-user-select: none;
|
|
136
|
+
-moz-user-select: none;
|
|
137
|
+
-webkit-user-select: none;
|
|
138
|
+
-webkit-touch-callout: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/// define clickable state
|
|
142
|
+
@mixin clickable {
|
|
143
|
+
pointer-events: auto;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/// remove default appearance
|
|
148
|
+
@mixin removeAppearance {
|
|
149
|
+
appearance: none;
|
|
150
|
+
-ms-appearance: none;
|
|
151
|
+
-moz-appearance: none;
|
|
152
|
+
-webkit-appearance: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/// add focus effect
|
|
156
|
+
@mixin focusable($selector: "&") {
|
|
157
|
+
&:not(&--disabled) {
|
|
158
|
+
&:hover,
|
|
159
|
+
&:focus,
|
|
160
|
+
&:focus-visible,
|
|
161
|
+
&:focus-within {
|
|
162
|
+
#{$selector} {
|
|
163
|
+
box-shadow: vars.$control-focus-box-shadow useVar("focus");
|
|
164
|
+
outline: none;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@each $name, $pair in vars.$colors {
|
|
170
|
+
&--#{$name},
|
|
171
|
+
&--#{$name}-passive {
|
|
172
|
+
@include defineVar("focus", useVar("#{$name}-focus"));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -4,44 +4,97 @@
|
|
|
4
4
|
@use "sass:list";
|
|
5
5
|
@use "sass:meta";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
@use "./variables" as vars;
|
|
8
|
+
@use "./helpers" as h;
|
|
9
|
+
|
|
10
|
+
$host-selector: if(vars.$enable-host, ":root, :host", ":root");
|
|
8
11
|
|
|
9
12
|
#{$host-selector} {
|
|
10
13
|
// define color variables
|
|
11
|
-
@each $name, $
|
|
12
|
-
@
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
@each $name, $pair in vars.$colors {
|
|
15
|
+
@include h.defineVar($name, list.nth($pair, 1));
|
|
16
|
+
@include h.defineVar("#{$name}-invert", list.nth($pair, 2));
|
|
17
|
+
@include h.defineVar(
|
|
18
|
+
"#{$name}-focus",
|
|
19
|
+
h.createFocus(list.nth($pair, 1))
|
|
20
|
+
);
|
|
21
|
+
@include h.defineVar(
|
|
22
|
+
"#{$name}-lighter",
|
|
23
|
+
h.createLighter(list.nth($pair, 1))
|
|
24
|
+
);
|
|
25
|
+
@include h.defineVar(
|
|
26
|
+
"#{$name}-darker",
|
|
27
|
+
h.createDarker(list.nth($pair, 1))
|
|
28
|
+
);
|
|
18
29
|
}
|
|
19
30
|
|
|
31
|
+
// define focus box-shadow color variable
|
|
32
|
+
@include h.defineVar("focus", h.createFocus(vars.$grey));
|
|
33
|
+
|
|
20
34
|
// define additional colors
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
@include h.defineVar("white", vars.$white);
|
|
36
|
+
@include h.defineVar("black", vars.$black);
|
|
37
|
+
@include h.defineVar("grey", vars.$grey);
|
|
38
|
+
@include h.defineVar("grey-light", vars.$grey-light);
|
|
39
|
+
@include h.defineVar("grey-lighter", vars.$grey-lighter);
|
|
40
|
+
@include h.defineVar("grey-lightest", vars.$grey-lightest);
|
|
41
|
+
@include h.defineVar("grey-dark", vars.$grey-dark);
|
|
42
|
+
@include h.defineVar("grey-darker", vars.$grey-darker);
|
|
43
|
+
@include h.defineVar("grey-darkest", vars.$grey-darkest);
|
|
28
44
|
|
|
29
45
|
// define size variables
|
|
30
|
-
@each $name, $size in
|
|
31
|
-
|
|
46
|
+
@each $name, $size in vars.$sizes {
|
|
47
|
+
@include h.defineVar("size-#{$name}", $size);
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
// define base variables
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
@include h.defineVar("font-family", vars.$font-family);
|
|
52
|
+
@include h.defineVar("font-size", vars.$font-size);
|
|
53
|
+
@include h.defineVar("font-color", vars.$font-color);
|
|
54
|
+
@include h.defineVar("font-weight", vars.$font-weight);
|
|
55
|
+
@include h.defineVar("line-height", vars.$line-height);
|
|
56
|
+
|
|
57
|
+
@include h.defineVar("border-radius", vars.$border-radius);
|
|
58
|
+
@include h.defineVar("border-radius-rounded", vars.$border-radius-rounded);
|
|
59
|
+
|
|
60
|
+
// define control variables
|
|
61
|
+
@include h.defineVar("control-spacer", vars.$control-spacer);
|
|
62
|
+
@include h.defineVar("control-height", vars.$control-height);
|
|
63
|
+
@include h.defineVar(
|
|
64
|
+
"control-padding-vertical",
|
|
65
|
+
vars.$control-padding-vertical
|
|
66
|
+
);
|
|
67
|
+
@include h.defineVar(
|
|
68
|
+
"control-padding-horizontal",
|
|
69
|
+
vars.$control-padding-horizontal
|
|
70
|
+
);
|
|
71
|
+
@include h.defineVar("control-shadow-color", vars.$control-shadow-color);
|
|
72
|
+
@include h.defineVar("control-box-shadow", vars.$control-box-shadow);
|
|
73
|
+
@include h.defineVar(
|
|
74
|
+
"control-box-shadow-inset",
|
|
75
|
+
vars.$control-box-shadow-inset
|
|
76
|
+
);
|
|
77
|
+
@include h.defineVar(
|
|
78
|
+
"control-brackground-color",
|
|
79
|
+
vars.$control-brackground-color
|
|
80
|
+
);
|
|
81
|
+
@include h.defineVar("control-border-color", vars.$control-border-color);
|
|
82
|
+
@include h.defineVar("control-border-width", vars.$control-border-width);
|
|
83
|
+
@include h.defineVar(
|
|
84
|
+
"control-disabled-opacity",
|
|
85
|
+
vars.$control-disabled-opacity
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
@include h.defineVar(
|
|
89
|
+
"overlay-background-color",
|
|
90
|
+
vars.$overlay-background-color
|
|
91
|
+
);
|
|
92
|
+
@include h.defineVar("overlay-box-shadow", vars.$overlay-box-shadow);
|
|
93
|
+
|
|
94
|
+
// define animation variables
|
|
95
|
+
@include h.defineVar("animation-speed-slow", vars.$animation-speed-slow);
|
|
96
|
+
@include h.defineVar("animation-speed", vars.$animation-speed);
|
|
97
|
+
@include h.defineVar("animation-speed-fast", vars.$animation-speed-fast);
|
|
98
|
+
@include h.defineVar("transition-duration", vars.$animation-speed-fast);
|
|
99
|
+
@include h.defineVar("transition-timing", vars.$animation-timing);
|
|
47
100
|
}
|