@neatui/css 2.0.8 → 2.0.10

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,5 +1,6 @@
1
1
  [ui-navs~='@a'] {
2
2
  position: relative;
3
+ white-space: nowrap;
3
4
  }
4
5
  [ui-navs~='@a'] > *,
5
6
  [ui-nav~='@a'] {
@@ -10,6 +11,9 @@
10
11
  justify-content: start;
11
12
  padding: 0.25em 0.5em;
12
13
  border-radius: 0.25em;
14
+ margin-bottom: 1px;
15
+ white-space: nowrap;
16
+
13
17
 
14
18
  cursor: pointer;
15
19
  user-select: none;
@@ -21,7 +21,7 @@
21
21
  // 弹性布局
22
22
  @import './flex.scss';
23
23
  // 缩小
24
- @import './scale.scss';
24
+ // @import './scale.scss';
25
25
  // 滚动条
26
26
  // @import './scroll.scss';
27
27
  // 封面
@@ -21,7 +21,7 @@
21
21
  // 弹性布局
22
22
  @import './flex.scss';
23
23
  // 缩小
24
- @import './scale.scss';
24
+ // @import './scale.scss';
25
25
  // 滚动条
26
26
  @import './scroll.scss';
27
27
  // 封面
@@ -28,7 +28,7 @@
28
28
  // 弹性布局
29
29
  @import './flex.scss';
30
30
  // 缩小
31
- @import './scale.scss';
31
+ // @import './scale.scss';
32
32
  // 滚动条
33
33
  @import './scroll.scss';
34
34
  // 封面
package/core/scale.scss CHANGED
@@ -1,24 +1,24 @@
1
- @mixin scale($d: '') {
2
- $rank: 'xxs', 'xs', 'ss', 'sm', 'sl', 'ms', 'mm', 'ml', 'ls', 'lm', 'll', 'xl', 'xxl';
1
+ // @mixin scale($d: '') {
2
+ // $rank: 'xxs', 'xs', 'ss', 'sm', 'sl', 'ms', 'mm', 'ml', 'ls', 'lm', 'll', 'xl', 'xxl';
3
3
 
4
- $sz: 0;
5
- @each $k in $rank {
6
- [ui-scale~='#{$k}'] {
7
- transform: scale($sz);
4
+ // $sz: 0;
5
+ // @each $k in $rank {
6
+ // [ui-scale~='#{$k}'] {
7
+ // transform: scale($sz);
8
8
 
9
- &[ui-scale~='ct'] {
10
- transform-origin: 50% 0%;
11
- }
12
- &[ui-scale~='cb'] {
13
- transform-origin: 50% 100%;
14
- }
15
- &[ui-scale~='lm'] {
16
- transform-origin: 0% 50%;
17
- }
18
- &[ui-scale~='rm'] {
19
- transform-origin: 100% 50%;
20
- }
21
- }
22
- $sz: $sz + 0.1;
23
- }
24
- }
9
+ // &[ui-scale~='ct'] {
10
+ // transform-origin: 50% 0%;
11
+ // }
12
+ // &[ui-scale~='cb'] {
13
+ // transform-origin: 50% 100%;
14
+ // }
15
+ // &[ui-scale~='lm'] {
16
+ // transform-origin: 0% 50%;
17
+ // }
18
+ // &[ui-scale~='rm'] {
19
+ // transform-origin: 100% 50%;
20
+ // }
21
+ // }
22
+ // $sz: $sz + 0.1;
23
+ // }
24
+ // }
package/core/theme.scss CHANGED
@@ -1,3 +1,6 @@
1
+ @use "sass:list";
2
+ @use "sass:meta";
3
+
1
4
  // 兜底
2
5
  $theme: if(
3
6
  global-variable-exists(theme),
@@ -21,7 +24,7 @@ $theme: if(
21
24
  // 检测
22
25
  @if (global-variable-exists(theme)) {
23
26
  $fa: map-keys($theme);
24
- $fk: nth($fa, 1);
27
+ $fk: list.nth($fa, 1);
25
28
  @if (length($fa) == 1 and $fk == _sys) {
26
29
  @warn '检测到您未定义主题色卡,请遵循 neatui 设计规范建立主题色卡;https://neatui.fekit.cn/#/docs/config';
27
30
  @debug '尝试修复错误...';
@@ -31,9 +34,9 @@ $theme: if(
31
34
  }
32
35
 
33
36
  @each $var in $theme {
34
- $n: nth($var, 1);
35
- $s: nth($var, 2);
36
- @if ($s and type-of($s) == 'map') {
37
+ $n: list.nth($var, 1);
38
+ $s: list.nth($var, 2);
39
+ @if ($s and meta.type-of($s) == 'map') {
37
40
  $baseColor: 'main', 'text', 'fore', 'back', 'link', 'code', 'well', 'warn', 'risk';
38
41
  @each $baseColorItem in $baseColor {
39
42
  @if (map-has-key($s, $baseColorItem)) {
@@ -49,9 +52,9 @@ $theme: if(
49
52
 
50
53
  // 扩展颜色
51
54
  @each $i in $theme {
52
- $n: nth($i, 1);
53
- $s: nth($i, 2);
54
- @if ($s and type-of($s) == 'map') {
55
+ $n: list.nth($i, 1);
56
+ $s: list.nth($i, 2);
57
+ @if ($s and meta.type-of($s) == 'map') {
55
58
  $m: (
56
59
  none: transparent,
57
60
  w: #ffffff,
@@ -61,13 +64,7 @@ $theme: if(
61
64
  note: mix(map-get($s, 'text'), map-get($s, 'fore'), 35%),
62
65
  case: mix(map-get($s, 'text'), map-get($s, 'fore'), 20%),
63
66
  line: mix(map-get($s, 'text'), map-get($s, 'fore'), 10%),
64
- weak: mix(map-get($s, 'text'), map-get($s, 'fore'), 4%),
65
- deep:
66
- rgb(
67
- red(map-get($s, 'back')) - (red(map-get($s, 'back')) * 0.05 + 5),
68
- green(map-get($s, 'back')) - (green(map-get($s, 'back')) * 0.05 + 5),
69
- blue(map-get($s, 'back')) - (blue(map-get($s, 'back')) * 0.05 + 5)
70
- ),
67
+ weak: mix(map-get($s, 'text'), map-get($s, 'fore'), 4%)
71
68
  );
72
69
  // 将扩展颜色加入放题色卡中
73
70
  $theme: map-merge(
@@ -85,9 +82,9 @@ $theme: if(
85
82
  @if ($n != null) {
86
83
  @if ($hasTheme != null) {
87
84
  $t: $hasTheme;
88
- $first: nth(nth($theme, 1), 1);
85
+ $first: list.nth(list.nth($theme, 1), 1);
89
86
  $n: $n;
90
- $s: #{nth(&, 1)};
87
+ $s: #{list.nth(&, 1)};
91
88
  @if ($s == 'html' or $s == '' or $s == null) {
92
89
  @if ($n == $first) {
93
90
  @at-root html {
@@ -111,10 +108,10 @@ $theme: if(
111
108
  @warn '没有指定主题#{$hasTheme}';
112
109
  }
113
110
  } @else {
114
- $first: nth(nth($theme, 1), 1);
111
+ $first: list.nth(list.nth($theme, 1), 1);
115
112
  @each $t in $theme {
116
- $n: nth($t, 1);
117
- $s: #{nth(&, 1)};
113
+ $n: list.nth($t, 1);
114
+ $s: #{list.nth(&, 1)};
118
115
 
119
116
  @if ($s == 'html' or $s == ':root' or $s == '' or $s == null) {
120
117
  @if ($n == $first) {
@@ -142,12 +139,12 @@ $theme: if(
142
139
  // 颜色
143
140
  @function co($a: '') {
144
141
  @if (& != null) {
145
- $r: nth(nth(&, 1), 1);
142
+ $r: list.nth(list.nth(&, 1), 1);
146
143
  $n: str-slice($r, 8, -2);
147
144
  $s: map-get($theme, $n);
148
145
  @if ($s == null) {
149
- $n: nth(nth($theme, 1), 1);
150
- $s: nth(nth($theme, 1), 2);
146
+ $n: list.nth(list.nth($theme, 1), 1);
147
+ $s: list.nth(list.nth($theme, 1), 2);
151
148
  }
152
149
  @if ($s != null) {
153
150
  @if (map-has-key($s, $a)) {
@@ -167,16 +164,16 @@ $theme: if(
167
164
  $levels: xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl;
168
165
  $colors: main, text, well, warn, risk;
169
166
 
170
- $f: nth(nth($theme, 1), 1);
167
+ $f: list.nth(list.nth($theme, 1), 1);
171
168
  @each $i in $theme {
172
- $n: nth($i, 1);
173
- $s: nth($i, 2);
169
+ $n: list.nth($i, 1);
170
+ $s: list.nth($i, 2);
174
171
  @if ($n == $f) {
175
172
  :root {
176
173
  @each $c in $s {
177
- $k: nth($c, 1);
178
- $v: nth($c, 2);
179
- --#{$k}: #{red($v), green($v), blue($v)};
174
+ $k: list.nth($c, 1);
175
+ $v: list.nth($c, 2);
176
+ // --#{$k}: #{red($v), green($v), blue($v)};
180
177
  --co-#{$k}: #{$v};
181
178
 
182
179
  $ls: 0.05;
@@ -204,9 +201,9 @@ $theme: if(
204
201
  } @else {
205
202
  [theme~='#{$n}'] {
206
203
  @each $c in $s {
207
- $k: nth($c, 1);
208
- $v: nth($c, 2);
209
- --#{$k}: #{red($v), green($v), blue($v)};
204
+ $k: list.nth($c, 1);
205
+ $v: list.nth($c, 2);
206
+ // --#{$k}: #{red($v), green($v), blue($v)};
210
207
  --co-#{$k}: #{$v};
211
208
 
212
209
  $ls: 0.05;
package/core/trim.scss CHANGED
@@ -397,65 +397,65 @@
397
397
 
398
398
  // 缩小
399
399
  .#{$media}s-no {
400
- transform: scale3d(0, 0, 1);
400
+ transform: scale(0);
401
401
  }
402
402
  .#{$media}s-ss {
403
- transform: scale3d(0.1, 0.1, 1);
403
+ transform: scale(0.1);
404
404
  }
405
405
  .#{$media}s-sm {
406
- transform: scale3d(0.2, 0.2, 1);
406
+ transform: scale(0.2);
407
407
  }
408
408
  .#{$media}s-sl {
409
- transform: scale3d(0.3, 0.3, 1);
409
+ transform: scale(0.3);
410
410
  }
411
411
  .#{$media}s-ms {
412
- transform: scale3d(0.4, 0.4, 1);
412
+ transform: scale(0.4);
413
413
  }
414
414
  .#{$media}s-mm {
415
- transform: scale3d(0.5, 0.5, 1);
415
+ transform: scale(0.5);
416
416
  }
417
417
  .#{$media}s-ml {
418
- transform: scale3d(0.6, 0.6, 1);
418
+ transform: scale(0.6);
419
419
  }
420
420
  .#{$media}s-ls {
421
- transform: scale3d(0.7, 0.7, 1);
421
+ transform: scale(0.7);
422
422
  }
423
423
  .#{$media}s-lm {
424
- transform: scale3d(0.8, 0.8, 1);
424
+ transform: scale(0.8);
425
425
  }
426
426
  .#{$media}s-ll {
427
- transform: scale3d(0.9, 0.9, 1);
427
+ transform: scale(0.9);
428
428
  }
429
429
  .#{$media}s-xl {
430
- transform: scale3d(0.95, 0.95, 1);
430
+ transform: scale(0.95);
431
431
  }
432
432
 
433
433
  .#{$media}s-ss\+mm {
434
- transform: scale3d(0.15, 0.15, 1);
434
+ transform: scale(0.15);
435
435
  }
436
436
  .#{$media}s-sm\+mm {
437
- transform: scale3d(0.25, 0.25, 1);
437
+ transform: scale(0.25);
438
438
  }
439
439
  .#{$media}s-sl\+mm {
440
- transform: scale3d(0.35, 0.35, 1);
440
+ transform: scale(0.35);
441
441
  }
442
442
  .#{$media}s-ms\+mm {
443
- transform: scale3d(0.45, 0.45, 1);
443
+ transform: scale(0.45);
444
444
  }
445
445
  .#{$media}s-mm\+mm {
446
- transform: scale3d(0.55, 0.55, 1);
446
+ transform: scale(0.55);
447
447
  }
448
448
  .#{$media}s-ml\+mm {
449
- transform: scale3d(0.65, 0.65, 1);
449
+ transform: scale(0.65);
450
450
  }
451
451
  .#{$media}s-ls\+mm {
452
- transform: scale3d(0.75, 0.75, 1);
452
+ transform: scale(0.75);
453
453
  }
454
454
  .#{$media}s-lm\+mm {
455
- transform: scale3d(0.85, 0.85, 1);
455
+ transform: scale(0.85);
456
456
  }
457
457
  .#{$media}s-ll\+mm {
458
- transform: scale3d(0.95, 0.95, 1);
458
+ transform: scale(0.95);
459
459
  }
460
460
 
461
461
  // 旋转
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",