@volverjs/style 0.1.9-beta.5 → 0.1.9-beta.6
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/dist/base.css +1 -1
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-nav.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-textarea.css +1 -1
- package/dist/components.css +1 -1
- package/dist/export.css +1 -1
- package/dist/props/colors.css +1 -1
- package/dist/props.css +1 -1
- package/dist/utilities/colors.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +1 -1
- package/src/export.scss +51 -5
- package/src/settings/_colors.scss +52 -0
- package/src/settings/_effects.scss +27 -0
- package/src/settings/components/_vv-input-text.scss +1 -0
- package/src/settings/components/_vv-nav.scss +1 -0
- package/src/settings/components/_vv-select.scss +1 -0
- package/src/settings/components/_vv-textarea.scss +1 -0
- package/src/themes/dark/settings/_colors.scss +40 -0
- package/src/tools/_functions.scss +189 -80
package/package.json
CHANGED
package/src/export.scss
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
// context
|
|
6
6
|
@use 'context' as *;
|
|
7
|
+
@use './themes/dark/context' as *;
|
|
7
8
|
|
|
8
9
|
:export {
|
|
9
10
|
// ============================================================== */
|
|
@@ -31,6 +32,52 @@
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
// colors exported with no vars
|
|
36
|
+
@each $key, $value in $colors-computed {
|
|
37
|
+
@if type-of($value) == 'map' {
|
|
38
|
+
@each $subKey, $subValue in $value {
|
|
39
|
+
@if type-of($value) not 'map' {
|
|
40
|
+
@if not
|
|
41
|
+
str-index($subKey, 'hue') and not
|
|
42
|
+
str-index($subKey, 'saturation') and not
|
|
43
|
+
str-index($subKey, 'lightness')
|
|
44
|
+
{
|
|
45
|
+
@if '' + $key == $subKey {
|
|
46
|
+
#{'colors-computed__' + $key}: $subValue;
|
|
47
|
+
} @else {
|
|
48
|
+
#{'colors-computed__' + $key + '-' + $subKey}: $subValue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} @else if $key != 'scheme' {
|
|
54
|
+
#{'colors-computed__' + $key}: $value;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// dark colors exported with no vars
|
|
59
|
+
@each $key, $value in $dark-colors-computed {
|
|
60
|
+
@if type-of($value) == 'map' {
|
|
61
|
+
@each $subKey, $subValue in $value {
|
|
62
|
+
@if type-of($value) not 'map' {
|
|
63
|
+
@if not
|
|
64
|
+
str-index($subKey, 'hue') and not
|
|
65
|
+
str-index($subKey, 'saturation') and not
|
|
66
|
+
str-index($subKey, 'lightness')
|
|
67
|
+
{
|
|
68
|
+
@if '' + $key == $subKey {
|
|
69
|
+
#{'dark-colors-computed__' + $key}: $subValue;
|
|
70
|
+
} @else {
|
|
71
|
+
#{'dark-colors-computed__' + $key + '-' + $subKey}: $subValue;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
} @else if $key != 'scheme' {
|
|
77
|
+
#{'dark-colors-computed__' + $key}: $value;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
34
81
|
// #endregion
|
|
35
82
|
|
|
36
83
|
// ==============================================================
|
|
@@ -280,11 +327,6 @@
|
|
|
280
327
|
#{'max-height__' + $key}: $value;
|
|
281
328
|
}
|
|
282
329
|
|
|
283
|
-
// max height
|
|
284
|
-
@each $key, $value in $max-height {
|
|
285
|
-
#{'max-height__' + $key}: $value;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
330
|
// #endregion
|
|
289
331
|
|
|
290
332
|
// ============================================================== */
|
|
@@ -421,6 +463,10 @@
|
|
|
421
463
|
#{'box-shadow__' + $key}: $value;
|
|
422
464
|
}
|
|
423
465
|
|
|
466
|
+
@each $key, $value in $box-shadow-no-vars {
|
|
467
|
+
#{'box-shadow-no-vars__' + $key}: $value;
|
|
468
|
+
}
|
|
469
|
+
|
|
424
470
|
// opacity
|
|
425
471
|
@each $key, $value in $opacity {
|
|
426
472
|
#{'opacity__' + $key}: $value;
|
|
@@ -24,6 +24,14 @@ $color-surface-palette: (
|
|
|
24
24
|
info: hsl(var(--color-info-hue) var(--color-info-saturation) 90%),
|
|
25
25
|
warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) 90%),
|
|
26
26
|
) !default;
|
|
27
|
+
$color-surface-palette-no-vars: (
|
|
28
|
+
brand: hsl(color.hue($color-brand) color.saturation($color-brand) 90%),
|
|
29
|
+
accent: hsl(color.hue($color-accent) color.saturation($color-accent) 90%),
|
|
30
|
+
success: hsl(color.hue($color-success) color.saturation($color-success) 90%),
|
|
31
|
+
danger: hsl(color.hue($color-danger) color.saturation($color-danger) 90%),
|
|
32
|
+
info: hsl(color.hue($color-info) color.saturation($color-info) 90%),
|
|
33
|
+
warning: hsl(color.hue($color-warning) color.saturation($color-warning) 90%),
|
|
34
|
+
) !default;
|
|
27
35
|
$color-shadow: hsl(color.hue($color-brand) 50% 20%) !default;
|
|
28
36
|
$color-backdrop: hsla(color.hue($color-brand) 50% 20% / 20%) !default;
|
|
29
37
|
$color-alpha: hsla(0deg 0% 0% / 0%) !default;
|
|
@@ -56,3 +64,47 @@ $colors: (
|
|
|
56
64
|
backdrop: hsla-map($color-backdrop, 'backdrop'),
|
|
57
65
|
alpha: color-alpha-map($color-alpha, 'alpha', $steps: 5, $scale: 5%),
|
|
58
66
|
) !default;
|
|
67
|
+
|
|
68
|
+
// colors-computed map
|
|
69
|
+
$colors-computed: (
|
|
70
|
+
scheme: $color-scheme,
|
|
71
|
+
transparent: $color-transparent,
|
|
72
|
+
black: hsla-map($color-black, 'black', $noVarExport: true),
|
|
73
|
+
white: hsla-map($color-white, 'white', $noVarExport: true),
|
|
74
|
+
shadow: hsla-map($color-shadow, 'shadow', $noVarExport: true),
|
|
75
|
+
backdrop: hsla-map($color-backdrop, 'backdrop', $noVarExport: true),
|
|
76
|
+
alpha:
|
|
77
|
+
color-alpha-map(
|
|
78
|
+
$color-alpha,
|
|
79
|
+
'alpha',
|
|
80
|
+
$steps: 5,
|
|
81
|
+
$scale: 5%,
|
|
82
|
+
$noVarExport: true
|
|
83
|
+
),
|
|
84
|
+
brand: color-shades-map($color-brand, 'brand', $noVarExport: true),
|
|
85
|
+
accent: color-shades-map($color-accent, 'accent', $noVarExport: true),
|
|
86
|
+
success: color-shades-map($color-success, 'success', $noVarExport: true),
|
|
87
|
+
danger: color-shades-map($color-danger, 'danger', $noVarExport: true),
|
|
88
|
+
info: color-shades-map($color-info, 'info', $noVarExport: true),
|
|
89
|
+
warning: color-shades-map($color-warning, 'warning', $noVarExport: true),
|
|
90
|
+
gray: color-shades-map($color-gray, 'gray', $scale: 15%, $noVarExport: true),
|
|
91
|
+
word:
|
|
92
|
+
color-lighten-map(
|
|
93
|
+
$color-word,
|
|
94
|
+
'word',
|
|
95
|
+
$scale: 12%,
|
|
96
|
+
$fixed: true,
|
|
97
|
+
$noVarExport: true
|
|
98
|
+
),
|
|
99
|
+
surface:
|
|
100
|
+
map.merge(
|
|
101
|
+
color-darken-map(
|
|
102
|
+
$color-surface,
|
|
103
|
+
'surface',
|
|
104
|
+
$scale: 2%,
|
|
105
|
+
$fixed: true,
|
|
106
|
+
$noVarExport: true
|
|
107
|
+
),
|
|
108
|
+
$color-surface-palette-no-vars
|
|
109
|
+
),
|
|
110
|
+
) !default;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use './colors';
|
|
4
|
+
|
|
1
5
|
// box-shadow
|
|
2
6
|
$box-shadow: (
|
|
3
7
|
sm:
|
|
@@ -17,6 +21,29 @@ $box-shadow: (
|
|
|
17
21
|
none: '0 0 #0000',
|
|
18
22
|
) !default;
|
|
19
23
|
|
|
24
|
+
// box-shadow without css vars
|
|
25
|
+
$color-shadow-hue: color.hue(colors.$color-shadow);
|
|
26
|
+
$color-shadow-saturation: color.saturation(colors.$color-shadow);
|
|
27
|
+
$color-shadow-lightness: color.lightness(colors.$color-shadow);
|
|
28
|
+
|
|
29
|
+
$box-shadow-no-vars: (
|
|
30
|
+
sm:
|
|
31
|
+
'0 1px 2px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 5%)',
|
|
32
|
+
shadow:
|
|
33
|
+
'0 1px 3px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 1px 2px -1px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
|
|
34
|
+
md:
|
|
35
|
+
'0 4px 6px -1px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 2px 4px -2px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
|
|
36
|
+
lg:
|
|
37
|
+
'0 10px 15px -3px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 4px 6px -4px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
|
|
38
|
+
xl:
|
|
39
|
+
'0 20px 25px -5px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%), 0 8px 10px -6px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 10%)',
|
|
40
|
+
2xl:
|
|
41
|
+
'0 25px 50px -12px hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 25%)',
|
|
42
|
+
inner:
|
|
43
|
+
'inset 0 2px 4px 0 hsla(#{$color-shadow-hue} #{$color-shadow-saturation} #{$color-shadow-lightness} / 5%)',
|
|
44
|
+
none: '0 0 #0000'
|
|
45
|
+
) !default;
|
|
46
|
+
|
|
20
47
|
// opacity
|
|
21
48
|
$opacity: (
|
|
22
49
|
0: 0,
|
|
@@ -16,6 +16,14 @@ $dark-color-surface-palette: (
|
|
|
16
16
|
info: hsl(var(--color-info-hue) var(--color-info-saturation) 10%),
|
|
17
17
|
warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) 10%),
|
|
18
18
|
) !default;
|
|
19
|
+
$dark-color-surface-palette-no-vars: (
|
|
20
|
+
brand: hsl(color.hue($color-brand) color.saturation($color-brand) 10%),
|
|
21
|
+
accent: hsl(color.hue($color-accent) color.saturation($color-accent) 10%),
|
|
22
|
+
success: hsl(color.hue($color-success) color.saturation($color-success) 10%),
|
|
23
|
+
danger: hsl(color.hue($color-danger) color.saturation($color-danger) 10%),
|
|
24
|
+
info: hsl(color.hue($color-info) color.saturation($color-info) 10%),
|
|
25
|
+
warning: hsl(color.hue($color-warning) color.saturation($color-warning) 10%),
|
|
26
|
+
) !default;
|
|
19
27
|
|
|
20
28
|
// color map
|
|
21
29
|
$dark-colors: (
|
|
@@ -33,3 +41,35 @@ $dark-colors: (
|
|
|
33
41
|
),
|
|
34
42
|
alpha: color-alpha-map($dark-color-alpha, 'alpha', $steps: 5, $scale: 5%),
|
|
35
43
|
) !default;
|
|
44
|
+
|
|
45
|
+
// dark-colors computed map
|
|
46
|
+
$dark-colors-computed: (
|
|
47
|
+
scheme: $dark-color-scheme,
|
|
48
|
+
word:
|
|
49
|
+
color-darken-map(
|
|
50
|
+
$dark-color-word,
|
|
51
|
+
'word',
|
|
52
|
+
$scale: 12%,
|
|
53
|
+
$fixed: true,
|
|
54
|
+
$noVarExport: true
|
|
55
|
+
),
|
|
56
|
+
surface:
|
|
57
|
+
map.merge(
|
|
58
|
+
color-lighten-map(
|
|
59
|
+
$dark-color-surface,
|
|
60
|
+
'surface',
|
|
61
|
+
$scale: 5%,
|
|
62
|
+
$fixed: true,
|
|
63
|
+
$noVarExport: true
|
|
64
|
+
),
|
|
65
|
+
$dark-color-surface-palette-no-vars
|
|
66
|
+
),
|
|
67
|
+
alpha:
|
|
68
|
+
color-alpha-map(
|
|
69
|
+
$dark-color-alpha,
|
|
70
|
+
'alpha',
|
|
71
|
+
$steps: 5,
|
|
72
|
+
$scale: 5%,
|
|
73
|
+
$noVarExport: true
|
|
74
|
+
),
|
|
75
|
+
) !default;
|
|
@@ -5,34 +5,60 @@
|
|
|
5
5
|
@use 'sass:list';
|
|
6
6
|
@use 'sass:math';
|
|
7
7
|
|
|
8
|
-
@function hsla-map($color, $name) {
|
|
9
|
-
@
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
@function hsla-map($color, $name, $noVarExport: false) {
|
|
9
|
+
@if $noVarExport {
|
|
10
|
+
@return (
|
|
11
|
+
#{$name}: hsla(color.hue($color), color.saturation($color), color.lightness($color), color.alpha($color))
|
|
12
|
+
);
|
|
13
|
+
} @else {
|
|
14
|
+
@return (
|
|
15
|
+
hue: color.hue($color),
|
|
16
|
+
saturation: color.saturation($color),
|
|
17
|
+
lightness: color.lightness($color),
|
|
18
|
+
#{$name}: hsla(var(--color-#{$name}-hue)
|
|
19
|
+
var(--color-#{$name}-saturation)
|
|
20
|
+
var(--color-#{$name}-lightness) / color.alpha($color))
|
|
21
|
+
);
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
|
|
19
|
-
@function alpha-color($name, $alpha) {
|
|
20
|
-
@
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
@function alpha-color($color, $name, $alpha, $noVarExport) {
|
|
26
|
+
@if $noVarExport {
|
|
27
|
+
@return (
|
|
28
|
+
hsla(
|
|
29
|
+
color.hue($color),
|
|
30
|
+
color.saturation($color),
|
|
31
|
+
color.lightness($color),
|
|
32
|
+
$alpha
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
} @else {
|
|
36
|
+
@return hsla(
|
|
37
|
+
var(--color-#{$name}-hue) var(--color-#{$name}-saturation)
|
|
38
|
+
var(--color-#{$name}-lightness) / #{$alpha}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
24
41
|
}
|
|
25
42
|
|
|
26
43
|
@function hex-to-rgb($hex) {
|
|
27
44
|
@return red($hex), green($hex), blue($hex);
|
|
28
45
|
}
|
|
29
46
|
|
|
30
|
-
@function color-alpha-map(
|
|
31
|
-
$
|
|
47
|
+
@function color-alpha-map(
|
|
48
|
+
$color,
|
|
49
|
+
$name,
|
|
50
|
+
$steps: 9,
|
|
51
|
+
$scale: 10%,
|
|
52
|
+
$noVarExport: false
|
|
53
|
+
) {
|
|
54
|
+
$result: hsla-map($color, $name, $noVarExport);
|
|
32
55
|
@for $index from 1 to ($steps + 1) {
|
|
33
56
|
$result: map.merge(
|
|
34
57
|
$result,
|
|
35
|
-
(
|
|
58
|
+
(
|
|
59
|
+
#{$index}:
|
|
60
|
+
alpha-color($color, $name, $index * $scale, $noVarExport)
|
|
61
|
+
)
|
|
36
62
|
);
|
|
37
63
|
}
|
|
38
64
|
@return $result;
|
|
@@ -43,14 +69,31 @@
|
|
|
43
69
|
$name,
|
|
44
70
|
$steps: 5,
|
|
45
71
|
$scale: 10%,
|
|
46
|
-
$fixed: false
|
|
72
|
+
$fixed: false,
|
|
73
|
+
$noVarExport: false
|
|
47
74
|
) {
|
|
48
75
|
$result: map.merge(
|
|
49
76
|
map.merge(
|
|
50
77
|
(#{$name}: $color),
|
|
51
|
-
color-lighten-map(
|
|
78
|
+
color-lighten-map(
|
|
79
|
+
$color,
|
|
80
|
+
$name,
|
|
81
|
+
$steps,
|
|
82
|
+
$scale,
|
|
83
|
+
'lighten',
|
|
84
|
+
$fixed,
|
|
85
|
+
$noVarExport
|
|
86
|
+
)
|
|
52
87
|
),
|
|
53
|
-
color-darken-map(
|
|
88
|
+
color-darken-map(
|
|
89
|
+
$color,
|
|
90
|
+
$name,
|
|
91
|
+
$steps,
|
|
92
|
+
$scale,
|
|
93
|
+
'darken',
|
|
94
|
+
$fixed,
|
|
95
|
+
$noVarExport
|
|
96
|
+
)
|
|
54
97
|
);
|
|
55
98
|
@return $result;
|
|
56
99
|
}
|
|
@@ -61,9 +104,10 @@
|
|
|
61
104
|
$steps: 5,
|
|
62
105
|
$scale: 10%,
|
|
63
106
|
$prefix: '',
|
|
64
|
-
$fixed: false
|
|
107
|
+
$fixed: false,
|
|
108
|
+
$noVarExport: false
|
|
65
109
|
) {
|
|
66
|
-
$result: hsla-map($color, $name);
|
|
110
|
+
$result: hsla-map($color, $name, $noVarExport);
|
|
67
111
|
@for $index from 1 to ($steps + 1) {
|
|
68
112
|
$key: $index;
|
|
69
113
|
@if $prefix != '' {
|
|
@@ -72,38 +116,70 @@
|
|
|
72
116
|
|
|
73
117
|
@if $fixed {
|
|
74
118
|
$increment: $scale * $index;
|
|
75
|
-
$
|
|
76
|
-
$
|
|
77
|
-
(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
119
|
+
@if $noVarExport {
|
|
120
|
+
$alpha: color.lightness($color) + $increment;
|
|
121
|
+
$result: map.merge(
|
|
122
|
+
$result,
|
|
123
|
+
(
|
|
124
|
+
#{$key}:
|
|
125
|
+
hsla(
|
|
126
|
+
color.hue($color),
|
|
127
|
+
color.saturation($color),
|
|
128
|
+
color.lightness($color),
|
|
129
|
+
$alpha
|
|
130
|
+
)
|
|
131
|
+
)
|
|
132
|
+
);
|
|
133
|
+
} @else {
|
|
134
|
+
$result: map.merge(
|
|
135
|
+
$result,
|
|
136
|
+
(
|
|
137
|
+
#{$key}:
|
|
138
|
+
hsl(
|
|
139
|
+
var(--color-#{$name}-hue)
|
|
140
|
+
var(--color-#{$name}-saturation)
|
|
141
|
+
calc(
|
|
142
|
+
var(--color-#{$name}-lightness) +
|
|
143
|
+
#{$increment}
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
}
|
|
89
149
|
} @else {
|
|
90
150
|
$increment: math.div($scale * $index, 100);
|
|
91
151
|
$increment: math.div($increment, ($increment * 0 + 1));
|
|
92
|
-
$
|
|
93
|
-
|
|
94
|
-
(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
152
|
+
$increment: $increment + 1;
|
|
153
|
+
@if $noVarExport {
|
|
154
|
+
$alpha: color.lightness($color) * $increment;
|
|
155
|
+
$result: map.merge(
|
|
156
|
+
$result,
|
|
157
|
+
(
|
|
158
|
+
#{$key}:
|
|
159
|
+
hsla(
|
|
160
|
+
color.hue($color),
|
|
161
|
+
color.saturation($color),
|
|
162
|
+
color.lightness($color),
|
|
163
|
+
$alpha
|
|
164
|
+
)
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
} @else {
|
|
168
|
+
$result: map.merge(
|
|
169
|
+
$result,
|
|
170
|
+
(
|
|
171
|
+
#{$key}:
|
|
172
|
+
hsl(
|
|
173
|
+
var(--color-#{$name}-hue)
|
|
174
|
+
var(--color-#{$name}-saturation)
|
|
175
|
+
calc(
|
|
101
176
|
var(--color-#{$name}-lightness) *
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
177
|
+
#{$increment}
|
|
178
|
+
)
|
|
179
|
+
)
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
|
+
}
|
|
107
183
|
}
|
|
108
184
|
}
|
|
109
185
|
@return $result;
|
|
@@ -115,9 +191,10 @@
|
|
|
115
191
|
$steps: 5,
|
|
116
192
|
$scale: 10%,
|
|
117
193
|
$prefix: '',
|
|
118
|
-
$fixed: false
|
|
194
|
+
$fixed: false,
|
|
195
|
+
$noVarExport: false
|
|
119
196
|
) {
|
|
120
|
-
$result: hsla-map($color, $name);
|
|
197
|
+
$result: hsla-map($color, $name, $noVarExport);
|
|
121
198
|
|
|
122
199
|
@for $index from 1 to ($steps + 1) {
|
|
123
200
|
$key: $index;
|
|
@@ -127,38 +204,70 @@
|
|
|
127
204
|
|
|
128
205
|
@if $fixed {
|
|
129
206
|
$decrement: $scale * $index;
|
|
130
|
-
$
|
|
131
|
-
$
|
|
132
|
-
(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
207
|
+
@if $noVarExport {
|
|
208
|
+
$alpha: color.lightness($color) - $decrement;
|
|
209
|
+
$result: map.merge(
|
|
210
|
+
$result,
|
|
211
|
+
(
|
|
212
|
+
#{$key}:
|
|
213
|
+
hsla(
|
|
214
|
+
color.hue($color),
|
|
215
|
+
color.saturation($color),
|
|
216
|
+
color.lightness($color),
|
|
217
|
+
$alpha
|
|
218
|
+
)
|
|
219
|
+
)
|
|
220
|
+
);
|
|
221
|
+
} @else {
|
|
222
|
+
$result: map.merge(
|
|
223
|
+
$result,
|
|
224
|
+
(
|
|
225
|
+
#{$key}:
|
|
226
|
+
hsl(
|
|
227
|
+
var(--color-#{$name}-hue)
|
|
228
|
+
var(--color-#{$name}-saturation)
|
|
229
|
+
calc(
|
|
230
|
+
var(--color-#{$name}-lightness) -
|
|
231
|
+
#{$decrement}
|
|
232
|
+
)
|
|
233
|
+
)
|
|
234
|
+
)
|
|
235
|
+
);
|
|
236
|
+
}
|
|
144
237
|
} @else {
|
|
145
238
|
$decrement: math.div($scale * $index, 100);
|
|
146
239
|
$decrement: math.div($decrement, ($decrement * 0 + 1));
|
|
147
|
-
$
|
|
148
|
-
|
|
149
|
-
(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
240
|
+
$decrement: 1 - $decrement;
|
|
241
|
+
@if $noVarExport {
|
|
242
|
+
$alpha: color.lightness($color) * $decrement;
|
|
243
|
+
$result: map.merge(
|
|
244
|
+
$result,
|
|
245
|
+
(
|
|
246
|
+
#{$key}:
|
|
247
|
+
hsla(
|
|
248
|
+
color.hue($color),
|
|
249
|
+
color.saturation($color),
|
|
250
|
+
color.lightness($color),
|
|
251
|
+
$alpha
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
);
|
|
255
|
+
} @else {
|
|
256
|
+
$result: map.merge(
|
|
257
|
+
$result,
|
|
258
|
+
(
|
|
259
|
+
#{$key}:
|
|
260
|
+
hsl(
|
|
261
|
+
var(--color-#{$name}-hue)
|
|
262
|
+
var(--color-#{$name}-saturation)
|
|
263
|
+
calc(
|
|
156
264
|
var(--color-#{$name}-lightness) *
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
265
|
+
#{$decrement}
|
|
266
|
+
)
|
|
267
|
+
)
|
|
268
|
+
)
|
|
269
|
+
);
|
|
270
|
+
}
|
|
162
271
|
}
|
|
163
272
|
}
|
|
164
273
|
@return $result;
|