@zl-ui-kit/theme 0.14.3 → 0.15.0

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.
@@ -1,27 +1,27 @@
1
- // ============================================================
2
- // SCSS 工具(供消费方深度定制编译使用;变量前缀 zl-)
3
- // 入口:@zl/theme/scss(colors / map / theme 三个模块)
4
- // ============================================================
5
-
6
- @use 'sass:list';
7
- @use '../generated/_constants' as *;
8
-
9
- $color-gradient-range: (6, 3) !default;
10
-
11
- /** 遍历全部色彩类型 */
12
- @mixin colorForEach() {
13
- @each $color in $color-types {
14
- @content ($color);
15
- }
16
- }
17
-
18
- /** 色板渐变背景(默认 6→3 级) */
19
- @mixin colorGradient($color, $direction, $range: $color-gradient-range) {
20
- $color-stops: ();
21
-
22
- @each $stop in $range {
23
- $color-stops: list.append($color-stops, var(--zl-#{$color}-#{$stop}), comma);
24
- }
25
-
26
- background-image: linear-gradient($direction, $color-stops);
27
- }
1
+ // ============================================================
2
+ // SCSS 工具(供消费方深度定制编译使用;变量前缀 zl-)
3
+ // 入口:@zl/theme/scss(colors / map / theme 三个模块)
4
+ // ============================================================
5
+
6
+ @use 'sass:list';
7
+ @use '../generated/_constants' as *;
8
+
9
+ $color-gradient-range: (6, 3) !default;
10
+
11
+ /** 遍历全部色彩类型 */
12
+ @mixin colorForEach() {
13
+ @each $color in $color-types {
14
+ @content ($color);
15
+ }
16
+ }
17
+
18
+ /** 色板渐变背景(默认 6→3 级) */
19
+ @mixin colorGradient($color, $direction, $range: $color-gradient-range) {
20
+ $color-stops: ();
21
+
22
+ @each $stop in $range {
23
+ $color-stops: list.append($color-stops, var(--zl-#{$color}-#{$stop}), comma);
24
+ }
25
+
26
+ background-image: linear-gradient($direction, $color-stops);
27
+ }
@@ -1,16 +1,16 @@
1
- // 嵌套 map 取值工具
2
-
3
- @use 'sass:map';
4
- @use 'sass:meta';
5
-
6
- @function mapGet($map, $keys...) {
7
- @each $key in $keys {
8
- @if meta.type-of($map) == 'map' and map.has-key($map, $key) {
9
- $map: map.get($map, $key);
10
- } @else {
11
- @warn "Key `#{$key}` not found in map or map is not nested.";
12
- @return null;
13
- }
14
- }
15
- @return $map;
16
- }
1
+ // 嵌套 map 取值工具
2
+
3
+ @use 'sass:map';
4
+ @use 'sass:meta';
5
+
6
+ @function mapGet($map, $keys...) {
7
+ @each $key in $keys {
8
+ @if meta.type-of($map) == 'map' and map.has-key($map, $key) {
9
+ $map: map.get($map, $key);
10
+ } @else {
11
+ @warn "Key `#{$key}` not found in map or map is not nested.";
12
+ @return null;
13
+ }
14
+ }
15
+ @return $map;
16
+ }
@@ -1,13 +1,13 @@
1
- // 主题作用域 mixin:为每套主题生成选择器块(light 无属性选择器)
2
-
3
- @use '../generated/_constants' as *;
4
-
5
- @mixin theme() {
6
- @each $theme in $themes-name {
7
- $filter: if($theme == 'light', '', "[data-theme='#{$theme}']");
8
-
9
- body#{$filter} {
10
- @content ($theme);
11
- }
12
- }
13
- }
1
+ // 主题作用域 mixin:为每套主题生成选择器块(light 无属性选择器)
2
+
3
+ @use '../generated/_constants' as *;
4
+
5
+ @mixin theme() {
6
+ @each $theme in $themes-name {
7
+ $filter: if($theme == 'light', '', "[data-theme='#{$theme}']");
8
+
9
+ body#{$filter} {
10
+ @content ($theme);
11
+ }
12
+ }
13
+ }