@volverjs/style 0.1.12-beta.8 → 0.1.12

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.
Files changed (98) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/dist/base.css +1 -1
  4. package/dist/components/vv-accordion-group.css +1 -1
  5. package/dist/components/vv-accordion.css +1 -1
  6. package/dist/components/vv-alert-group.css +1 -1
  7. package/dist/components/vv-alert.css +1 -1
  8. package/dist/components/vv-avatar-group.css +1 -1
  9. package/dist/components/vv-avatar.css +1 -1
  10. package/dist/components/vv-badge.css +1 -1
  11. package/dist/components/vv-breadcrumb.css +1 -1
  12. package/dist/components/vv-button-group.css +1 -1
  13. package/dist/components/vv-button.css +1 -1
  14. package/dist/components/vv-card.css +1 -1
  15. package/dist/components/vv-checkbox-group.css +1 -1
  16. package/dist/components/vv-checkbox.css +1 -1
  17. package/dist/components/vv-dialog.css +1 -1
  18. package/dist/components/vv-dropdown-action.css +1 -1
  19. package/dist/components/vv-dropdown-optgroup.css +1 -1
  20. package/dist/components/vv-dropdown-option.css +1 -1
  21. package/dist/components/vv-dropdown.css +1 -1
  22. package/dist/components/vv-input-file.css +1 -1
  23. package/dist/components/vv-input-text.css +1 -1
  24. package/dist/components/vv-nav.css +1 -1
  25. package/dist/components/vv-progress.css +1 -1
  26. package/dist/components/vv-radio-group.css +1 -1
  27. package/dist/components/vv-radio.css +1 -1
  28. package/dist/components/vv-select.css +1 -1
  29. package/dist/components/vv-skeleton.css +1 -1
  30. package/dist/components/vv-tab.css +1 -1
  31. package/dist/components/vv-table.css +1 -1
  32. package/dist/components/vv-text.css +1 -1
  33. package/dist/components/vv-textarea.css +1 -1
  34. package/dist/components/vv-tooltip.css +1 -1
  35. package/dist/components.css +1 -1
  36. package/dist/export.css +1 -1
  37. package/dist/props/background.css +1 -1
  38. package/dist/props/colors.css +1 -1
  39. package/dist/props/input.css +1 -1
  40. package/dist/props/spacing.css +1 -1
  41. package/dist/props/transitions.css +1 -1
  42. package/dist/props/typography.css +1 -1
  43. package/dist/props.css +1 -1
  44. package/dist/themes/dark/props.css +1 -1
  45. package/dist/themes/dark/volver.css +1 -1
  46. package/dist/utilities/backgrounds.css +1 -1
  47. package/dist/utilities/colors.css +1 -1
  48. package/dist/utilities/effects.css +1 -1
  49. package/dist/utilities/interactivity.css +1 -1
  50. package/dist/utilities/sizing.css +1 -1
  51. package/dist/utilities/transforms.css +1 -1
  52. package/dist/utilities/typography.css +1 -1
  53. package/dist/utilities.css +1 -1
  54. package/dist/volver.css +1 -1
  55. package/package.json +37 -36
  56. package/src/_preflight.scss +31 -1
  57. package/src/components/vv-button-group.scss +6 -6
  58. package/src/components/vv-tooltip.scss +1 -1
  59. package/src/export.scss +16 -14
  60. package/src/props/breakpoints.scss +5 -4
  61. package/src/props/spacing.scss +2 -2
  62. package/src/props/typography.scss +3 -2
  63. package/src/settings/_colors.scss +11 -11
  64. package/src/settings/_effects.scss +3 -3
  65. package/src/settings/_input.scss +2 -2
  66. package/src/settings/_interactivity.scss +14 -0
  67. package/src/settings/_typography.scss +9 -1
  68. package/src/settings/components/_vv-accordion-group.scss +2 -2
  69. package/src/settings/components/_vv-accordion.scss +2 -0
  70. package/src/settings/components/_vv-alert-group.scss +5 -2
  71. package/src/settings/components/_vv-alert.scss +1 -1
  72. package/src/settings/components/_vv-avatar-group.scss +1 -0
  73. package/src/settings/components/_vv-avatar.scss +12 -8
  74. package/src/settings/components/_vv-badge.scss +2 -0
  75. package/src/settings/components/_vv-breadcrumb.scss +1 -0
  76. package/src/settings/components/_vv-button.scss +1 -0
  77. package/src/settings/components/_vv-card.scss +2 -0
  78. package/src/settings/components/_vv-checkbox-group.scss +2 -0
  79. package/src/settings/components/_vv-checkbox.scss +6 -0
  80. package/src/settings/components/_vv-dialog.scss +1 -0
  81. package/src/settings/components/_vv-input-file.scss +32 -3
  82. package/src/settings/components/_vv-input-text.scss +4 -1
  83. package/src/settings/components/_vv-nav.scss +1 -1
  84. package/src/settings/components/_vv-radio.scss +1 -0
  85. package/src/settings/components/_vv-select.scss +4 -1
  86. package/src/settings/components/_vv-table.scss +19 -1
  87. package/src/settings/components/_vv-textarea.scss +5 -1
  88. package/src/themes/dark/settings/_colors.scss +8 -8
  89. package/src/tools/_breakpoints.scss +13 -4
  90. package/src/tools/_functions.scss +100 -26
  91. package/src/tools/_mixins.scss +68 -24
  92. package/src/utilities/flexbox.scss +6 -1
  93. package/src/utilities/interactivity.scss +17 -1
  94. package/src/utilities/layout.scss +9 -3
  95. package/src/utilities/sizing.scss +10 -2
  96. package/src/utilities/spacing.scss +10 -1
  97. package/src/utilities/transforms.scss +2 -2
  98. package/src/utilities/typography.scss +11 -0
@@ -18,6 +18,7 @@ $vv-card: (
18
18
  element: (
19
19
  header: (
20
20
  _alias: '> header',
21
+ _combinator: '>',
21
22
  overflow: hidden,
22
23
  padding: var(--spacing-md),
23
24
  background-color: var(--color-surface-1),
@@ -40,6 +41,7 @@ $vv-card: (
40
41
  ),
41
42
  footer: (
42
43
  _alias: '> footer',
44
+ _combinator: '>',
43
45
  border-top: var(--border) solid var(--color-surface-4),
44
46
  padding: var(--spacing-md),
45
47
  ),
@@ -6,6 +6,7 @@ $vv-checkbox-group: (
6
6
  element: (
7
7
  legend: (
8
8
  _alias: '> legend',
9
+ _combinator: '>',
9
10
  display: var(--input-label-display),
10
11
  font-size: var(--input-label-font-size),
11
12
  font-weight: var(--input-label-font-weight),
@@ -24,6 +25,7 @@ $vv-checkbox-group: (
24
25
  ),
25
26
  hint: (
26
27
  _alias: '> small',
28
+ _combinator: '>',
27
29
  display: var(--input-hint-display),
28
30
  font-size: var(--input-hint-font-size),
29
31
  color: var(--input-hint-color),
@@ -13,6 +13,11 @@ $vv-checkbox: (
13
13
  disabled: (
14
14
  opacity: var(--opacity-30),
15
15
  cursor: not-allowed,
16
+ element: (
17
+ input: (
18
+ cursor: not-allowed,
19
+ ),
20
+ ),
16
21
  ),
17
22
  ),
18
23
  element: (
@@ -42,6 +47,7 @@ $vv-checkbox: (
42
47
  ),
43
48
  hint: (
44
49
  _alias: '> small',
50
+ _combinator: '>',
45
51
  flex-basis: 100%,
46
52
  display: var(--input-hint-display),
47
53
  font-size: var(--input-hint-font-size),
@@ -25,6 +25,7 @@ $vv-dialog: (
25
25
  element: (
26
26
  wrapper: (
27
27
  _alias: '> article',
28
+ _combinator: '>',
28
29
  display: flex,
29
30
  flex-direction: column,
30
31
  position: relative,
@@ -9,6 +9,7 @@ $vv-input-file: (
9
9
  element: (
10
10
  label: (
11
11
  _alias: '> label',
12
+ _combinator: '>',
12
13
  display: var(--input-label-display),
13
14
  font-size: var(--input-label-font-size),
14
15
  font-weight: var(--input-label-font-weight),
@@ -72,11 +73,12 @@ $vv-input-file: (
72
73
  white-space: nowrap,
73
74
  cursor: pointer,
74
75
  color: var(--input-color),
75
- [padding-block]: var(--input-spacing-top) 0,
76
76
  [padding-inline]: var(--input-spacing-left)
77
77
  var(--input-spacing-right),
78
78
  min-width: 0,
79
79
  min-height: var(--input-min-height),
80
+ display: flex,
81
+ align-items: center,
80
82
  text-overflow: var(--input-text-overflow),
81
83
  pseudo: (
82
84
  file-selector-button: (
@@ -86,6 +88,7 @@ $vv-input-file: (
86
88
  cursor: pointer,
87
89
  text-decoration: underline,
88
90
  color: var(--input-color),
91
+ min-height: var(--input-min-height),
89
92
  ),
90
93
  ),
91
94
  state: (
@@ -121,6 +124,7 @@ $vv-input-file: (
121
124
  height: var(--input-min-height),
122
125
  margin: var(--input-icon-margin),
123
126
  pointer-events: var(--input-icon-pointer-events),
127
+ flex-shrink: 0,
124
128
  ),
125
129
  icon-after: (
126
130
  _alias: 'input + :where(svg, [data-icon])',
@@ -172,6 +176,12 @@ $vv-input-file: (
172
176
  ),
173
177
  ),
174
178
  ),
179
+ drop-area-action: (
180
+ position: absolute,
181
+ top: var(--spacing-8),
182
+ right: var(--spacing-8),
183
+ z-index: var(--z-1),
184
+ ),
175
185
  preview: (
176
186
  position: absolute,
177
187
  display: flex,
@@ -190,7 +200,7 @@ $vv-input-file: (
190
200
  height: var(--border-2),
191
201
  bottom: 0,
192
202
  left: 0,
193
- z-index: 1,
203
+ z-index: var(--z-1),
194
204
  pseudo: (
195
205
  -webkit-progress-bar: (
196
206
  background-color: transparent,
@@ -217,12 +227,19 @@ $vv-input-file: (
217
227
  ),
218
228
  ),
219
229
  item: (
230
+ position: relative,
231
+ overflow: hidden,
220
232
  display: flex,
221
233
  font-size: var(--input-label-font-size),
222
234
  align-items: center,
223
235
  gap: var(--spacing-8),
224
236
  background-color: var(--input-background-color),
225
237
  padding: var(--spacing-8),
238
+ state: (
239
+ active: (
240
+ background-color: var(--color-surface-2),
241
+ ),
242
+ ),
226
243
  ),
227
244
  item-name: (
228
245
  white-space: nowrap,
@@ -236,14 +253,22 @@ $vv-input-file: (
236
253
  align-self: flex-end,
237
254
  ),
238
255
  item-link: (
256
+ white-space: nowrap,
257
+ text-overflow: ellipsis,
258
+ overflow: hidden,
239
259
  cursor: pointer,
240
260
  text-decoration: underline,
241
261
  ),
242
262
  item-icon: (
243
263
  flex-shrink: 0,
244
264
  ),
265
+ item-action: (
266
+ flex-shrink: 0,
267
+ cursor: pointer,
268
+ ),
245
269
  item-remove: (
246
270
  flex-shrink: 0,
271
+ cursor: pointer,
247
272
  background-image: var(--bg-close),
248
273
  width: 1.4em,
249
274
  height: 1.4em,
@@ -253,7 +278,6 @@ $vv-input-file: (
253
278
  border-radius: var(--rounded-full),
254
279
  background-color: var(--color-surface-3),
255
280
  margin-inline-start: auto,
256
- cursor: pointer,
257
281
  transition: var(--transition-colors),
258
282
  state: (
259
283
  hover: (
@@ -421,6 +445,11 @@ $vv-input-file: (
421
445
  preview: (
422
446
  border-radius: var(--rounded-full),
423
447
  ),
448
+ drop-area-action: (
449
+ position: relative,
450
+ top: auto,
451
+ right: auto,
452
+ ),
424
453
  ),
425
454
  ),
426
455
  ),
@@ -9,6 +9,7 @@ $vv-input-text: (
9
9
  element: (
10
10
  label: (
11
11
  _alias: '> label',
12
+ _combinator: '>',
12
13
  display: var(--input-label-display),
13
14
  font-size: var(--input-label-font-size),
14
15
  font-weight: var(--input-label-font-weight),
@@ -150,6 +151,7 @@ $vv-input-text: (
150
151
  height: var(--input-min-height),
151
152
  margin: var(--input-icon-margin),
152
153
  pointer-events: var(--input-icon-pointer-events),
154
+ flex-shrink: 0,
153
155
  ),
154
156
  icon-after: (
155
157
  _alias: 'input + :where(svg, [data-icon])',
@@ -199,6 +201,7 @@ $vv-input-text: (
199
201
  ),
200
202
  hint: (
201
203
  _alias: '> small',
204
+ _combinator: '>',
202
205
  display: var(--input-hint-display),
203
206
  font-size: var(--input-hint-font-size),
204
207
  color: var(--input-hint-color),
@@ -304,7 +307,7 @@ $vv-input-text: (
304
307
  ),
305
308
  label: (
306
309
  position: absolute,
307
- z-index: 1,
310
+ z-index: var(--z-1),
308
311
  min-height: var(--input-min-height),
309
312
  line-height: var(--input-min-height),
310
313
  pointer-events: none,
@@ -18,7 +18,7 @@ $vv-nav: (
18
18
  [padding]: var(--nav-item-padding),
19
19
  ),
20
20
  item-label: (
21
- _alias: 'li > a',
21
+ _alias: 'li > :is(a, button)',
22
22
  display: flex,
23
23
  align-items: center,
24
24
  will-change: background-color color,
@@ -79,6 +79,7 @@ $vv-radio: (
79
79
  ),
80
80
  hint: (
81
81
  _alias: '> small',
82
+ _combinator: '>',
82
83
  flex-basis: 100%,
83
84
  display: var(--input-hint-display),
84
85
  font-size: var(--input-hint-font-size),
@@ -10,6 +10,7 @@ $vv-select: (
10
10
  element: (
11
11
  label: (
12
12
  _alias: '> label',
13
+ _combinator: '>',
13
14
  display: var(--input-label-display),
14
15
  font-size: var(--input-label-font-size),
15
16
  font-weight: var(--input-label-font-weight),
@@ -132,6 +133,7 @@ $vv-select: (
132
133
  height: var(--input-min-height),
133
134
  margin: var(--input-icon-margin),
134
135
  pointer-events: var(--input-icon-pointer-events),
136
+ flex-shrink: 0,
135
137
  ),
136
138
  icon-after: (
137
139
  _alias: 'select + :where(svg, [data-icon])',
@@ -139,6 +141,7 @@ $vv-select: (
139
141
  ),
140
142
  hint: (
141
143
  _alias: '> small',
144
+ _combinator: '>',
142
145
  display: var(--input-hint-display),
143
146
  font-size: var(--input-hint-font-size),
144
147
  color: var(--input-hint-color),
@@ -256,7 +259,7 @@ $vv-select: (
256
259
  ),
257
260
  label: (
258
261
  position: absolute,
259
- z-index: 1,
262
+ z-index: var(--z-1),
260
263
  min-height: var(--input-min-height),
261
264
  line-height: var(--input-min-height),
262
265
  pointer-events: none,
@@ -29,6 +29,10 @@ $vv-table: (
29
29
  ),
30
30
  ),
31
31
  ),
32
+ tfoot-tr: (
33
+ _alias: 'tfoot > tr',
34
+ border-width: 1px 0 0 0,
35
+ ),
32
36
  th: (
33
37
  _alias: 'th',
34
38
  font-weight: var(--font-semibold),
@@ -48,7 +52,21 @@ $vv-table: (
48
52
  modifier: (
49
53
  inline-spacing: (
50
54
  --table-cell-padding: var(--spacing-md),
51
- border-width: 0,
55
+ ),
56
+ bordered: (
57
+ --table-cell-padding: var(--spacing-md),
58
+ element: (
59
+ th: (
60
+ border-width: 1px,
61
+ border-style: solid,
62
+ border-color: var(--color-surface-5),
63
+ ),
64
+ td: (
65
+ border-width: 1px,
66
+ border-style: solid,
67
+ border-color: var(--color-surface-5),
68
+ ),
69
+ ),
52
70
  ),
53
71
  ),
54
72
  ) !default;
@@ -9,6 +9,7 @@ $vv-textarea: (
9
9
  element: (
10
10
  label: (
11
11
  _alias: '> label',
12
+ _combinator: '>',
12
13
  display: var(--input-label-display),
13
14
  font-size: var(--input-label-font-size),
14
15
  font-weight: var(--input-label-font-weight),
@@ -82,6 +83,7 @@ $vv-textarea: (
82
83
  var(--input-spacing-bottom) var(--input-spacing-left),
83
84
  overflow: auto,
84
85
  text-overflow: var(--input-text-overflow),
86
+ min-height: var(--input-min-height),
85
87
  pseudo: (
86
88
  placeholder: (
87
89
  color: var(--input-placeholder-color),
@@ -116,6 +118,7 @@ $vv-textarea: (
116
118
  height: var(--input-min-height),
117
119
  margin: var(--input-icon-margin),
118
120
  pointer-events: var(--input-icon-pointer-events),
121
+ flex-shrink: 0,
119
122
  ),
120
123
  icon-after: (
121
124
  _alias: 'textarea + :where(svg, [data-icon])',
@@ -131,6 +134,7 @@ $vv-textarea: (
131
134
  ),
132
135
  hint: (
133
136
  _alias: '> small',
137
+ _combinator: '>',
134
138
  display: var(--input-hint-display),
135
139
  font-size: var(--input-hint-font-size),
136
140
  color: var(--input-hint-color),
@@ -224,7 +228,7 @@ $vv-textarea: (
224
228
  ),
225
229
  label: (
226
230
  position: absolute,
227
- z-index: 1,
231
+ z-index: var(--z-1),
228
232
  min-height: var(--input-min-height),
229
233
  line-height: var(--input-min-height),
230
234
  pointer-events: none,
@@ -4,8 +4,8 @@
4
4
  @use '../../../settings/colors' as *;
5
5
 
6
6
  $dark-color-scheme: dark !default;
7
- $dark-color-word: hsl(color.hue($color-brand) 15% 85%) !default;
8
- $dark-color-surface: hsl(color.hue($color-brand) 10% 5%) !default;
7
+ $dark-color-word: hsl(color-hue($color-brand) 15% 85%) !default;
8
+ $dark-color-surface: hsl(color-hue($color-brand) 10% 5%) !default;
9
9
  $dark-color-surface-palette: (
10
10
  brand: hsl(var(--color-brand-hue) var(--color-brand-saturation) 10%),
11
11
  accent: hsl(var(--color-accent-hue) var(--color-accent-saturation) 10%),
@@ -15,12 +15,12 @@ $dark-color-surface-palette: (
15
15
  warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) 10%),
16
16
  ) !default;
17
17
  $dark-color-surface-palette-no-vars: (
18
- brand: hsl(color.hue($color-brand) color.saturation($color-brand) 10%),
19
- accent: hsl(color.hue($color-accent) color.saturation($color-accent) 10%),
20
- success: hsl(color.hue($color-success) color.saturation($color-success) 10%),
21
- danger: hsl(color.hue($color-danger) color.saturation($color-danger) 10%),
22
- info: hsl(color.hue($color-info) color.saturation($color-info) 10%),
23
- warning: hsl(color.hue($color-warning) color.saturation($color-warning) 10%),
18
+ brand: hsl(color-hue($color-brand) color-saturation($color-brand) 10%),
19
+ accent: hsl(color-hue($color-accent) color-saturation($color-accent) 10%),
20
+ success: hsl(color-hue($color-success) color-saturation($color-success) 10%),
21
+ danger: hsl(color-hue($color-danger) color-saturation($color-danger) 10%),
22
+ info: hsl(color-hue($color-info) color-saturation($color-info) 10%),
23
+ warning: hsl(color-hue($color-warning) color-saturation($color-warning) 10%),
24
24
  ) !default;
25
25
 
26
26
  // color map
@@ -19,9 +19,10 @@
19
19
  $bps-names: map.keys($bps)
20
20
  ) {
21
21
  $n: list.index($bps-names, $name);
22
+
22
23
  @return if(
23
- $n != null and $n < length($bps-names),
24
- nth($bps-names, $n + 1),
24
+ $n != null and $n < list.length($bps-names),
25
+ list.nth($bps-names, $n + 1),
25
26
  null
26
27
  );
27
28
  }
@@ -31,6 +32,7 @@
31
32
  // 576px
32
33
  @function breakpoint-min($name, $bps) {
33
34
  $min: map.get($bps, $name);
35
+
34
36
  @return if($min != 0, $min, null);
35
37
  }
36
38
 
@@ -44,6 +46,7 @@
44
46
  // 767.98px
45
47
  @function breakpoint-max($name, $bps) {
46
48
  $next: breakpoint-next($name, $bps);
49
+
47
50
  @return if($next, breakpoint-min($next, $bps) - 0.02, null);
48
51
  }
49
52
 
@@ -61,12 +64,17 @@
61
64
  // Makes the @content apply to the given breakpoint and wider.
62
65
  @mixin media-breakpoint-up($name, $bps) {
63
66
  $min: breakpoint-min($name, $bps);
67
+
64
68
  @if $min {
65
69
  @media (min-width: $min) {
66
- @content;
70
+ & {
71
+ @content;
72
+ }
67
73
  }
68
74
  } @else {
69
- @content;
75
+ & {
76
+ @content;
77
+ }
70
78
  }
71
79
  }
72
80
 
@@ -74,6 +82,7 @@
74
82
  // Makes the @content apply to the given breakpoint and narrower.
75
83
  @mixin media-breakpoint-down($name, $bps) {
76
84
  $max: breakpoint-max($name, $bps);
85
+
77
86
  @if $max {
78
87
  @media (max-width: $max) {
79
88
  @content;
@@ -5,17 +5,55 @@
5
5
  @use 'sass:list';
6
6
  @use 'sass:math';
7
7
 
8
+ @function color-hue($color) {
9
+ @return color.channel($color, 'hue', $space: hsl);
10
+ }
11
+
12
+ @function color-saturation($color) {
13
+ @return color.channel($color, 'saturation', $space: hsl);
14
+ }
15
+
16
+ @function color-lightness($color) {
17
+ @return color.channel($color, 'lightness', $space: hsl);
18
+ }
19
+
20
+ @function color-alpha($color) {
21
+ @return color.channel($color, 'alpha');
22
+ }
23
+
24
+ @function color-hsla($color) {
25
+ @return hsla(
26
+ color-hue($color),
27
+ color.channel($color, 'saturation', $space: hsl),
28
+ color.channel($color, 'lightness', $space: hsl),
29
+ color.channel($color, 'alpha')
30
+ );
31
+ }
32
+
33
+ @function color-red($color) {
34
+ @return color.channel($color, 'red', $space: rgb);
35
+ }
36
+
37
+ @function color-green($color) {
38
+ @return color.channel($color, 'green', $space: rgb);
39
+ }
40
+
41
+ @function color-blue($color) {
42
+ @return color.channel($color, 'blue', $space: rgb);
43
+ }
44
+
8
45
  @function hsla-map($color, $name, $noVarExport: false) {
9
46
  @if $noVarExport {
10
47
  @return (
11
- #{$name}: hsla(color.hue($color), color.saturation($color), color.lightness($color), color.alpha($color))
48
+ #{$name}: hsla(color-hue($color), color.channel($color, 'saturation', $space:
49
+ hsl), color.channel($color, 'lightness', $space: hsl), color.channel($color, 'alpha'))
12
50
  );
13
51
  } @else {
14
52
  @return (
15
- hue: color.hue($color),
16
- saturation: color.saturation($color),
17
- lightness: color.lightness($color),
18
- #{$name}: hsla(var(--color-#{$name}-hue), var(--color-#{$name}-saturation), var(--color-#{$name}-lightness), color.alpha($color))
53
+ hue: color-hue($color),
54
+ saturation: color.channel($color, 'saturation', $space: hsl),
55
+ lightness: color.channel($color, 'lightness', $space: hsl),
56
+ #{$name}: hsla(var(--color-#{$name}-hue), var(--color-#{$name}-saturation), var(--color-#{$name}-lightness), color.channel($color, 'alpha'))
19
57
  );
20
58
  }
21
59
  }
@@ -24,9 +62,9 @@
24
62
  @if $noVarExport {
25
63
  @return (
26
64
  hsla(
27
- color.hue($color),
28
- color.saturation($color),
29
- color.lightness($color),
65
+ color-hue($color),
66
+ color.channel($color, 'saturation', $space: hsl),
67
+ color.channel($color, 'lightness', $space: hsl),
30
68
  $alpha
31
69
  )
32
70
  );
@@ -41,7 +79,9 @@
41
79
  }
42
80
 
43
81
  @function hex-to-rgb($hex) {
44
- @return red($hex), green($hex), blue($hex);
82
+ @return color.channel($hex, 'red', $space: rgb),
83
+ color.channel($hex, 'green', $space: rgb),
84
+ color.channel($hex, 'blue', $space: rgb);
45
85
  }
46
86
 
47
87
  @function color-alpha-map(
@@ -52,6 +92,7 @@
52
92
  $noVarExport: false
53
93
  ) {
54
94
  $result: hsla-map($color, $name, $noVarExport);
95
+
55
96
  @for $index from 1 to ($steps + 1) {
56
97
  $result: map.merge(
57
98
  $result,
@@ -61,6 +102,7 @@
61
102
  )
62
103
  );
63
104
  }
105
+
64
106
  @return $result;
65
107
  }
66
108
 
@@ -96,6 +138,7 @@
96
138
  $noVarExport
97
139
  )
98
140
  );
141
+
99
142
  @return $result;
100
143
  }
101
144
 
@@ -110,29 +153,38 @@
110
153
  $inverted: true
111
154
  ) {
112
155
  $result: hsla-map($color, $name, $noVarExport);
156
+
113
157
  @for $counter from 1 to ($steps + 1) {
114
158
  $index: $counter;
159
+
115
160
  @if $inverted {
116
161
  $index: $steps + 1 - $counter;
117
162
  }
118
163
 
119
164
  $key: $index;
165
+
120
166
  @if $prefix != '' {
121
167
  $key: $prefix + '-' + $index;
122
168
  }
123
169
 
124
170
  @if $fixed {
125
171
  $increment: $scale * $index;
172
+
126
173
  @if $noVarExport {
127
- $alpha: color.lightness($color) + $increment;
174
+ $alpha: color.channel($color, 'lightness', $space: hsl) +
175
+ $increment;
128
176
  $result: map.merge(
129
177
  $result,
130
178
  (
131
179
  #{$key}:
132
180
  hsla(
133
- color.hue($color),
134
- color.saturation($color),
135
- color.lightness($color),
181
+ color-hue($color),
182
+ color.channel(
183
+ $color,
184
+ 'saturation',
185
+ $space: hsl
186
+ ),
187
+ color.channel($color, 'lightness', $space: hsl),
136
188
  $alpha
137
189
  )
138
190
  )
@@ -157,16 +209,22 @@
157
209
  $increment: math.div($scale * $index, 100);
158
210
  $increment: math.div($increment, ($increment * 0 + 1));
159
211
  $increment: $increment + 1;
212
+
160
213
  @if $noVarExport {
161
- $alpha: color.lightness($color) * $increment;
214
+ $alpha: color.channel($color, 'lightness', $space: hsl) *
215
+ $increment;
162
216
  $result: map.merge(
163
217
  $result,
164
218
  (
165
219
  #{$key}:
166
220
  hsla(
167
- color.hue($color),
168
- color.saturation($color),
169
- color.lightness($color),
221
+ color-hue($color),
222
+ color.channel(
223
+ $color,
224
+ 'saturation',
225
+ $space: hsl
226
+ ),
227
+ color.channel($color, 'lightness', $space: hsl),
170
228
  $alpha
171
229
  )
172
230
  )
@@ -189,6 +247,7 @@
189
247
  }
190
248
  }
191
249
  }
250
+
192
251
  @return $result;
193
252
  }
194
253
 
@@ -206,27 +265,35 @@
206
265
 
207
266
  @for $counter from 1 to ($steps + 1) {
208
267
  $index: $counter;
268
+
209
269
  @if $inverted {
210
270
  $index: $steps + 1 - $counter;
211
271
  }
212
272
 
213
273
  $key: $index;
274
+
214
275
  @if $prefix != '' {
215
276
  $key: $prefix + '-' + $index;
216
277
  }
217
278
 
218
279
  @if $fixed {
219
280
  $decrement: $scale * $index;
281
+
220
282
  @if $noVarExport {
221
- $alpha: color.lightness($color) - $decrement;
283
+ $alpha: color.channel($color, 'lightness', $space: hsl) -
284
+ $decrement;
222
285
  $result: map.merge(
223
286
  $result,
224
287
  (
225
288
  #{$key}:
226
289
  hsla(
227
- color.hue($color),
228
- color.saturation($color),
229
- color.lightness($color),
290
+ color-hue($color),
291
+ color.channel(
292
+ $color,
293
+ 'saturation',
294
+ $space: hsl
295
+ ),
296
+ color.channel($color, 'lightness', $space: hsl),
230
297
  $alpha
231
298
  )
232
299
  )
@@ -251,16 +318,22 @@
251
318
  $decrement: math.div($scale * $index, 100);
252
319
  $decrement: math.div($decrement, ($decrement * 0 + 1));
253
320
  $decrement: 1 - $decrement;
321
+
254
322
  @if $noVarExport {
255
- $alpha: color.lightness($color) * $decrement;
323
+ $alpha: color.channel($color, 'lightness', $space: hsl) *
324
+ $decrement;
256
325
  $result: map.merge(
257
326
  $result,
258
327
  (
259
328
  #{$key}:
260
329
  hsla(
261
- color.hue($color),
262
- color.saturation($color),
263
- color.lightness($color),
330
+ color-hue($color),
331
+ color.channel(
332
+ $color,
333
+ 'saturation',
334
+ $space: hsl
335
+ ),
336
+ color.channel($color, 'lightness', $space: hsl),
264
337
  $alpha
265
338
  )
266
339
  )
@@ -283,6 +356,7 @@
283
356
  }
284
357
  }
285
358
  }
359
+
286
360
  @return $result;
287
361
  }
288
362
 
@@ -320,7 +394,7 @@
320
394
  @function list-to-string($list, $glue: ', ') {
321
395
  $result: null;
322
396
 
323
- @for $i from 1 through length($list) {
397
+ @for $i from 1 through list.length($list) {
324
398
  $e: list.nth($list, $i);
325
399
 
326
400
  @if $result and $e {