@neatui/css 2.0.10 → 3.0.0-beta.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.
Files changed (48) hide show
  1. package/components/btns/base.scss +1 -3
  2. package/components/btns/btns@a.scss +1 -1
  3. package/components/btns/mcui@btns.scss +0 -2
  4. package/components/chat/chat@a.scss +22 -24
  5. package/components/cite/cite@a.scss +5 -3
  6. package/components/demo/demo@a.scss +2 -2
  7. package/components/form/README.md +2 -2
  8. package/components/form/base.scss +2 -2
  9. package/components/form/form@b/input.scss +4 -4
  10. package/components/form/form@c/checkbox.scss +1 -1
  11. package/components/form/form@c/input.scss +2 -2
  12. package/components/form/form@d/base.scss +6 -6
  13. package/components/form/form@d/checkbox.scss +1 -1
  14. package/components/form/form@d/date.scss +3 -3
  15. package/components/form/form@d/input.scss +12 -12
  16. package/components/form/form@d/radio.scss +1 -1
  17. package/components/form/form@d/select.scss +4 -4
  18. package/components/form/form@d/switch.scss +4 -4
  19. package/components/form/form@d/textarea.scss +5 -5
  20. package/components/form/form@d/upload.scss +4 -4
  21. package/components/grid/grid@a.scss +1 -1
  22. package/components/imgs/imgs@b.scss +8 -8
  23. package/components/list/list@c.scss +5 -4
  24. package/components/load/load@i.scss +3 -3
  25. package/components/opts/opts@a.scss +1 -1
  26. package/components/path/README.md +2 -2
  27. package/components/table/base.scss +2 -2
  28. package/components/table/table@a.scss +1 -1
  29. package/components/table/table@b.scss +1 -1
  30. package/components/tips/base.scss +12 -12
  31. package/components/tips/tips@a.scss +1 -1
  32. package/core/README.md +2 -2
  33. package/core/color.scss +111 -121
  34. package/core/cols.scss +6 -3
  35. package/core/media.scss +30 -28
  36. package/core/neatui@core.scss +5 -5
  37. package/core/scale.scss +27 -22
  38. package/core/scroll.scss +5 -5
  39. package/core/shadow.scss +17 -9
  40. package/core/size.scss +3 -1
  41. package/core/theme.scss +102 -99
  42. package/core/ux.scss +2 -2
  43. package/core/var.scss +2 -0
  44. package/package.json +1 -1
  45. package/components/btns/btns@b.scss +0 -190
  46. package/components/btns/btns@c.scss +0 -172
  47. package/core/neatui@core.lite.scss +0 -30
  48. package/core/neatui@mobile.scss +0 -37
package/core/scroll.scss CHANGED
@@ -4,7 +4,7 @@
4
4
  scrollbar-width: thin;
5
5
  scrollbar-gutter: auto;
6
6
  // @include theme {
7
- // scrollbar-color: rgba(co(text), 0.15) transparent;
7
+ // scrollbar-color: rgba(var(--co-text), 0.15) transparent;
8
8
  // }
9
9
  scrollbar-color: var(--co-text-ss) transparent;
10
10
 
@@ -19,7 +19,7 @@
19
19
  border: 1px solid transparent;
20
20
  border-radius: 10px;
21
21
  // @include theme {
22
- // background-color: rgba(co(text), 0.15) !important;
22
+ // background-color: rgba(var(--co-text), 0.15) !important;
23
23
  // }
24
24
  background-color: var(--co-text-ss) !important;
25
25
  background-clip: content-box;
@@ -102,7 +102,7 @@
102
102
 
103
103
  ::-webkit-scrollbar-thumb {
104
104
  // @include theme {
105
- // background-color: rgba(co(text), 0.15) !important;
105
+ // background-color: rgba(var(--co-text), 0.15) !important;
106
106
  // }
107
107
  background-color: var(--co-text-ss) !important;
108
108
  }
@@ -114,7 +114,7 @@
114
114
  scrollbar-width: thin;
115
115
  scrollbar-gutter: auto;
116
116
  // @include theme {
117
- // scrollbar-color: rgba(co(text), 0.15) transparent;
117
+ // scrollbar-color: rgba(var(--co-text), 0.15) transparent;
118
118
  // }
119
119
  scrollbar-color: var(--co-text-ss) transparent;
120
120
 
@@ -129,7 +129,7 @@
129
129
  border: 1px solid transparent;
130
130
  border-radius: 10px;
131
131
  // @include theme {
132
- // background-color: rgba(co(text), 0.15) !important;
132
+ // background-color: rgba(var(--co-text), 0.15) !important;
133
133
  // }
134
134
  background-color: var(--co-text-ss) !important;
135
135
  background-clip: content-box;
package/core/shadow.scss CHANGED
@@ -14,11 +14,15 @@ div {
14
14
  }
15
15
 
16
16
  .bs-x {
17
- box-shadow: inset 1px 0 0 0 currentColor, inset -1px 0 0 0 currentColor;
17
+ box-shadow:
18
+ inset 1px 0 0 0 currentColor,
19
+ inset -1px 0 0 0 currentColor;
18
20
  }
19
21
 
20
22
  .bs-y {
21
- box-shadow: inset 0 1px 0 0 currentColor, inset 0 -1px 0 0 currentColor;
23
+ box-shadow:
24
+ inset 0 1px 0 0 currentColor,
25
+ inset 0 -1px 0 0 currentColor;
22
26
  }
23
27
 
24
28
  .bs-l {
@@ -40,42 +44,46 @@ div {
40
44
  /* 主题色 */
41
45
  .bs-xs-main {
42
46
  @include theme {
43
- box-shadow: inset 0 0 0 1px co(main);
47
+ box-shadow: inset 0 0 0 1px var(--co-main);
44
48
  }
45
49
  }
46
50
 
47
51
  .bs-x-xs-main {
48
52
  @include theme {
49
- box-shadow: inset 1px 0 0 0 co(main), inset -1px 0 0 0 co(main);
53
+ box-shadow:
54
+ inset 1px 0 0 0 var(--co-main),
55
+ inset -1px 0 0 0 var(--co-main);
50
56
  }
51
57
  }
52
58
 
53
59
  .bs-y-xs-main {
54
60
  @include theme {
55
- box-shadow: inset 0 1px 0 0 co(main), inset 0 -1px 0 0 co(main);
61
+ box-shadow:
62
+ inset 0 1px 0 0 var(--co-main),
63
+ inset 0 -1px 0 0 var(--co-main);
56
64
  }
57
65
  }
58
66
 
59
67
  .bs-l-xs-main {
60
68
  @include theme {
61
- box-shadow: inset 1px 0 0 0 co(main);
69
+ box-shadow: inset 1px 0 0 0 var(--co-main);
62
70
  }
63
71
  }
64
72
 
65
73
  .bs-r-xs-main {
66
74
  @include theme {
67
- box-shadow: inset -1px 0 0 0 co(main);
75
+ box-shadow: inset -1px 0 0 0 var(--co-main);
68
76
  }
69
77
  }
70
78
 
71
79
  .bs-t-xs-main {
72
80
  @include theme {
73
- box-shadow: inset 0 1px 0 0 co(main);
81
+ box-shadow: inset 0 1px 0 0 var(--co-main);
74
82
  }
75
83
  }
76
84
 
77
85
  .bs-b-xs-main {
78
86
  @include theme {
79
- box-shadow: inset 0 -1px 0 0 co(main);
87
+ box-shadow: inset 0 -1px 0 0 var(--co-main);
80
88
  }
81
89
  }
package/core/size.scss CHANGED
@@ -9,6 +9,8 @@
9
9
  * 备注:s->Small 小,m->Middle 中,l->Large 大;x->Extra 特大
10
10
  */
11
11
 
12
+ @use 'sass:list';
13
+
12
14
  // 全局字号
13
15
  @mixin baseSize($sz: 13) {
14
16
  $size: 'xs', 's', 'm', 'l', 'xl';
@@ -16,7 +18,7 @@
16
18
  @each $i in $size {
17
19
  [size='#{$i}'],
18
20
  [ui-size='#{$i}'] {
19
- $s: index($size, $i) + $sz;
21
+ $s: list.index($size, $i) + $sz;
20
22
  font-size: #{$s}px;
21
23
  }
22
24
  }
package/core/theme.scss CHANGED
@@ -1,9 +1,12 @@
1
- @use "sass:list";
2
- @use "sass:meta";
1
+ @use 'sass:list';
2
+ @use 'sass:meta';
3
+ @use 'sass:map';
4
+ @use 'sass:color';
5
+ @use 'sass:string';
3
6
 
4
7
  // 兜底
5
8
  $theme: if(
6
- global-variable-exists(theme),
9
+ meta.global-variable-exists(theme),
7
10
  $theme,
8
11
  (
9
12
  _sys: (
@@ -19,13 +22,13 @@ $theme: if(
19
22
  info: #0889e4
20
23
  )
21
24
  )
22
- );
25
+ ) !default;
23
26
 
24
27
  // 检测
25
- @if (global-variable-exists(theme)) {
26
- $fa: map-keys($theme);
28
+ @if (meta.global-variable-exists(theme)) {
29
+ $fa: map.keys($theme);
27
30
  $fk: list.nth($fa, 1);
28
- @if (length($fa) == 1 and $fk == _sys) {
31
+ @if (list.length($fa) == 1 and $fk == _sys) {
29
32
  @warn '检测到您未定义主题色卡,请遵循 neatui 设计规范建立主题色卡;https://neatui.fekit.cn/#/docs/config';
30
33
  @debug '尝试修复错误...';
31
34
  @debug '创建系统默认色卡[theme=_sys]';
@@ -39,7 +42,7 @@ $theme: if(
39
42
  @if ($s and meta.type-of($s) == 'map') {
40
43
  $baseColor: 'main', 'text', 'fore', 'back', 'link', 'code', 'well', 'warn', 'risk';
41
44
  @each $baseColorItem in $baseColor {
42
- @if (map-has-key($s, $baseColorItem)) {
45
+ @if (map.has-key($s, $baseColorItem)) {
43
46
  } @else {
44
47
  @warn '[theme=#{$n}]主题缺少一个关键的基础颜色#{$baseColorItem}';
45
48
  }
@@ -59,105 +62,105 @@ $theme: if(
59
62
  none: transparent,
60
63
  w: #ffffff,
61
64
  b: #000000,
62
- read: mix(map-get($s, 'text'), map-get($s, 'fore'), 85%),
63
- desc: mix(map-get($s, 'text'), map-get($s, 'fore'), 55%),
64
- note: mix(map-get($s, 'text'), map-get($s, 'fore'), 35%),
65
- case: mix(map-get($s, 'text'), map-get($s, 'fore'), 20%),
66
- line: mix(map-get($s, 'text'), map-get($s, 'fore'), 10%),
67
- weak: mix(map-get($s, 'text'), map-get($s, 'fore'), 4%)
65
+ read: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 85%),
66
+ desc: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 55%),
67
+ note: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 35%),
68
+ case: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 20%),
69
+ line: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 10%),
70
+ weak: color.mix(map.get($s, 'text'), map.get($s, 'fore'), 4%)
68
71
  );
69
72
  // 将扩展颜色加入放题色卡中
70
- $theme: map-merge(
73
+ $theme: map.merge(
71
74
  $theme,
72
75
  (
73
- $n: map-merge($m, $s)
76
+ $n: map.merge($m, $s)
74
77
  )
75
78
  );
76
79
  }
77
80
  }
78
81
 
79
82
  // 主题
80
- @mixin theme($n: null) {
81
- $hasTheme: map-get($theme, $n);
82
- @if ($n != null) {
83
- @if ($hasTheme != null) {
84
- $t: $hasTheme;
85
- $first: list.nth(list.nth($theme, 1), 1);
86
- $n: $n;
87
- $s: #{list.nth(&, 1)};
88
- @if ($s == 'html' or $s == '' or $s == null) {
89
- @if ($n == $first) {
90
- @at-root html {
91
- @content;
92
- }
93
- } @else {
94
- @at-root [theme='#{$n}'] {
95
- @content;
96
- }
97
- }
98
- } @else {
99
- @if ($n == $first) {
100
- @content;
101
- } @else {
102
- [theme='#{$n}'] & {
103
- @content;
104
- }
105
- }
106
- }
107
- } @else {
108
- @warn '没有指定主题#{$hasTheme}';
109
- }
110
- } @else {
111
- $first: list.nth(list.nth($theme, 1), 1);
112
- @each $t in $theme {
113
- $n: list.nth($t, 1);
114
- $s: #{list.nth(&, 1)};
115
-
116
- @if ($s == 'html' or $s == ':root' or $s == '' or $s == null) {
117
- @if ($n == $first) {
118
- @at-root html {
119
- @content;
120
- }
121
- } @else {
122
- @at-root [theme='#{$n}'] {
123
- @content;
124
- }
125
- }
126
- } @else {
127
- @if ($n == $first) {
128
- @content;
129
- } @else {
130
- [theme='#{$n}'] & {
131
- @content;
132
- }
133
- }
134
- }
135
- }
136
- }
137
- }
83
+ // @mixin theme($n: null) {
84
+ // $hasTheme: map.get($theme, $n);
85
+ // @if ($n != null) {
86
+ // @if ($hasTheme != null) {
87
+ // $t: $hasTheme;
88
+ // $first: list.nth(list.nth($theme, 1), 1);
89
+ // $n: $n;
90
+ // $s: #{list.nth(&, 1)};
91
+ // @if ($s == 'html' or $s == '' or $s == null) {
92
+ // @if ($n == $first) {
93
+ // @at-root html {
94
+ // @content;
95
+ // }
96
+ // } @else {
97
+ // @at-root [theme='#{$n}'] {
98
+ // @content;
99
+ // }
100
+ // }
101
+ // } @else {
102
+ // @if ($n == $first) {
103
+ // @content;
104
+ // } @else {
105
+ // [theme='#{$n}'] & {
106
+ // @content;
107
+ // }
108
+ // }
109
+ // }
110
+ // } @else {
111
+ // @warn '没有指定主题#{$hasTheme}';
112
+ // }
113
+ // } @else {
114
+ // $first: list.nth(list.nth($theme, 1), 1);
115
+ // @each $t in $theme {
116
+ // $n: list.nth($t, 1);
117
+ // $s: #{list.nth(&, 1)};
118
+
119
+ // @if ($s == 'html' or $s == ':root' or $s == '' or $s == null) {
120
+ // @if ($n == $first) {
121
+ // @at-root html {
122
+ // @content;
123
+ // }
124
+ // } @else {
125
+ // @at-root [theme='#{$n}'] {
126
+ // @content;
127
+ // }
128
+ // }
129
+ // } @else {
130
+ // @if ($n == $first) {
131
+ // @content;
132
+ // } @else {
133
+ // [theme='#{$n}'] & {
134
+ // @content;
135
+ // }
136
+ // }
137
+ // }
138
+ // }
139
+ // }
140
+ // }
138
141
 
139
142
  // 颜色
140
- @function co($a: '') {
141
- @if (& != null) {
142
- $r: list.nth(list.nth(&, 1), 1);
143
- $n: str-slice($r, 8, -2);
144
- $s: map-get($theme, $n);
145
- @if ($s == null) {
146
- $n: list.nth(list.nth($theme, 1), 1);
147
- $s: list.nth(list.nth($theme, 1), 2);
148
- }
149
- @if ($s != null) {
150
- @if (map-has-key($s, $a)) {
151
- $a: map-get($s, $a);
152
- } @else {
153
- @debug '当前主题[theme=#{$n}]没有定义颜色名 #{$a}';
154
- }
155
- }
156
- @return $a;
157
- } @else {
158
- @return transparent;
159
- }
160
- }
143
+ // @function co($a: '') {
144
+ // @if (& != null) {
145
+ // $r: list.nth(list.nth(&, 1), 1);
146
+ // $n: string.slice($r, 8, -2);
147
+ // $s: map.get($theme, $n);
148
+ // @if ($s == null) {
149
+ // $n: list.nth(list.nth($theme, 1), 1);
150
+ // $s: list.nth(list.nth($theme, 1), 2);
151
+ // }
152
+ // @if ($s != null) {
153
+ // @if (map.has-key($s, $a)) {
154
+ // $a: map.get($s, $a);
155
+ // } @else {
156
+ // @debug '当前主题[theme=#{$n}]没有定义颜色名 #{$a}';
157
+ // }
158
+ // }
159
+ // @return $a;
160
+ // } @else {
161
+ // @return transparent;
162
+ // }
163
+ // }
161
164
 
162
165
  // 变量
163
166
  @mixin vars() {
@@ -183,11 +186,11 @@ $theme: if(
183
186
  --co-#{$k}-#{$l}: #{rgba($v, $ls)};
184
187
 
185
188
  @if ($k != 'w' and $k != 'b') {
186
- --co-#{$k}-fore-#{$l}: #{mix($v, map-get($s, 'fore'), $ls * 100%)};
189
+ --co-#{$k}-fore-#{$l}: #{color.mix($v, map.get($s, 'fore'), $ls * 100%)};
187
190
  }
188
191
 
189
192
  @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
190
- --co-#{$k}-text-#{$l}: #{mix($v, map-get($s, 'text'), $ls * 100%)};
193
+ --co-#{$k}-text-#{$l}: #{color.mix($v, map.get($s, 'text'), $ls * 100%)};
191
194
  }
192
195
  }
193
196
  @if ($ls <= 0.1 or $ls >= 0.8) {
@@ -213,11 +216,11 @@ $theme: if(
213
216
  --co-#{$k}-#{$l}: #{rgba($v, $ls)};
214
217
 
215
218
  @if ($k != 'w' and $k != 'b') {
216
- --co-#{$k}-fore-#{$l}: #{mix($v, map-get($s, 'fore'), $ls * 100%)};
219
+ --co-#{$k}-fore-#{$l}: #{color.mix($v, map.get($s, 'fore'), $ls * 100%)};
217
220
  }
218
221
 
219
222
  @if ($k == 'main' or $k == 'well' or $k == 'warn' or $k == 'risk') {
220
- --co-#{$k}-text-#{$l}: #{mix($v, map-get($s, 'text'), $ls * 100%)};
223
+ --co-#{$k}-text-#{$l}: #{color.mix($v, map.get($s, 'text'), $ls * 100%)};
221
224
  }
222
225
  }
223
226
  @if ($ls <= 0.1 or $ls >= 0.8) {
package/core/ux.scss CHANGED
@@ -35,7 +35,7 @@
35
35
  cursor: pointer;
36
36
  }
37
37
  &:hover {
38
- box-shadow: 0 0.1em 0.5em var(--co-deep);
38
+ box-shadow: 0 0.1em 0.5em var(--co-text-ss);
39
39
  }
40
40
  }
41
41
 
@@ -267,7 +267,7 @@
267
267
  top: 130%;
268
268
 
269
269
  background: var(--co-fore);
270
- box-shadow: 0 1px 0.3em 1px var(--co-deep);
270
+ box-shadow: 0 1px 0.3em 1px var(--co-text-ss);
271
271
 
272
272
  padding: 1.5rem;
273
273
  right: 0.15rem;
package/core/var.scss ADDED
@@ -0,0 +1,2 @@
1
+ $sz: 'xs', 's', 'm', 'l', 'xl';
2
+ $co: 'main', 'vice', 'text', 'fore', 'back', 'link', 'code', 'well', 'warn', 'risk';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "2.0.10",
3
+ "version": "3.0.0-beta.0",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",
@@ -1,190 +0,0 @@
1
- @import './base.scss';
2
-
3
- @use 'sass:math';
4
- $size: 'xs', 's', 'm', 'l', 'xl';
5
- $type: 'none', 'main', 'text', 'read', 'weak', 'back', 'info', 'well', 'warn', 'risk';
6
-
7
- // 按钮
8
- [ui-btn~='@b'] {
9
- // 基础样式
10
- & {
11
- position: relative;
12
- display: inline-table;
13
- height: 2.5em;
14
- line-height: 2.5em;
15
- padding: 0 1em;
16
- border-radius: 0.25em;
17
- cursor: pointer;
18
- transition: all 50ms;
19
- text-align: center;
20
- vertical-align: middle;
21
- // -webkit-font-smoothing: auto;
22
- // -moz-osx-font-smoothing: auto;
23
- border: 0;
24
- user-select: none;
25
- white-space: nowrap;
26
- // @include theme {
27
- color: var(--co-text);
28
- background: var(--co-weak);
29
- box-shadow: inset 0 0 0 1px var(--co-line);
30
- // }
31
- }
32
-
33
- & > * {
34
- &.icon {
35
- display: inline-block;
36
- & + * {
37
- margin-left: 0.2em;
38
- }
39
- }
40
- }
41
-
42
- // 绝对尺寸
43
- &[ui-btn~=':abs'] {
44
- height: 2.5rem;
45
- line-height: 2.5rem;
46
- padding: 0 1rem;
47
- border-radius: 0.25rem;
48
- }
49
- // 圆弧按钮
50
- &[ui-btn~=':round'] {
51
- border-radius: 100em;
52
- }
53
-
54
- // 移入状态
55
- &:hover {
56
- // @include theme {
57
- box-shadow:
58
- inset 0 0 0 1px var(--co-line),
59
- inset 0 0 0 100em var(--co-text-xs);
60
- // }
61
- }
62
-
63
- // 按下状态
64
- &:active {
65
- transform: scale(0.98, 0.95);
66
- }
67
-
68
- // 正方形按钮
69
- &[ui-btn~=':square'] {
70
- width: 2.5em;
71
- padding: 0;
72
- }
73
-
74
- // 禁用按钮
75
- &[ui-btn~=':disabled'] {
76
- pointer-events: none;
77
- &,
78
- &:hover {
79
- opacity: 0.65;
80
- box-shadow:
81
- inset 0 0 0 1px transparent,
82
- inset 0 0 0 100em rgba(0, 0, 0, 0);
83
- cursor: not-allowed;
84
- }
85
- &:active {
86
- transform: scale(1, 1);
87
- cursor: not-allowed;
88
- }
89
- }
90
-
91
- // 按钮尺寸
92
- $base: 1.5;
93
- @each $i in $size {
94
- &[ui-btn~='#{$i}'] {
95
- height: #{$base}em;
96
- line-height: #{$base}em;
97
- padding: 0 #{calc(($base - 1) / 2)}em;
98
-
99
- // 方形按钮
100
- &[ui-btn~=':square'] {
101
- width: #{$base}em;
102
- padding: 0;
103
- }
104
-
105
- &[ui-btn~=':block'] {
106
- width: 100%;
107
- }
108
-
109
- &[ui-btn~=':abs'] {
110
- height: #{$base}rem;
111
- line-height: #{$base}rem;
112
- padding: 0 #{calc(($base - 1) / 2)}rem;
113
- }
114
- }
115
- $base: $base + 0.5;
116
- }
117
-
118
- // 按钮颜色
119
- @each $name in $type {
120
- &[ui-btn~='#{$name}'] {
121
- @if ($name == 'none' or $name == 'weak' or $name == 'back') {
122
- @include theme {
123
- background: var(--co-#{$name});
124
- }
125
- color: inherit;
126
- } @else {
127
- @include theme {
128
- // 背景色
129
- $co: var(--co-#{$name});
130
- background-image: linear-gradient(180deg, saturate($co, 5%) 0%, mix($co, var(--co-text), 80%) 100%);
131
- box-shadow: inset 0 -0.3em 0 0 rgba(0, 0, 0, 0.15);
132
-
133
- // 智能计算文字颜色
134
- // $wd: lightness($co) - (saturation($co) / 3);
135
- // @if ($wd < 60%) {
136
- // color: #fff;
137
- // } @else {
138
- // color: co(back);
139
- // }
140
- color: co(back);
141
- }
142
- }
143
- box-shadow: inset 0 0 0 1px transparent;
144
-
145
- &:hover {
146
- @include theme {
147
- box-shadow:
148
- inset 0 0 0 1px transparent,
149
- inset 0 0 0 100em rgba(var(--co-text), 0.04);
150
- }
151
- }
152
-
153
- // 边框式
154
- &[ui-btn~=':border'] {
155
- background: transparent;
156
- @include theme {
157
- color: var(--co-#{$name});
158
- box-shadow:
159
- inset 0 0 0 1px var(--co-#{$name}),
160
- inset 0 -0.2em 0 0 co(back),
161
- inset 0 -0.3em 0 0 var(--co-#{$name});
162
- }
163
-
164
- &:hover {
165
- @include theme {
166
- box-shadow:
167
- inset 0 0 0 1px var(--co-#{$name}),
168
- inset 0 -0.2em 0 0 co(back),
169
- inset 0 -0.3em 0 0 var(--co-#{$name}),
170
- inset 0 0 0 100em rgba(var(--co-#{$name}), 0.08);
171
- }
172
- }
173
- }
174
-
175
- // 下划线
176
- &[ui-btn~=':underline'] {
177
- @include theme {
178
- color: var(--co-#{$name});
179
- }
180
- background: transparent;
181
- box-shadow: inset 0 0 0 1px transparent;
182
-
183
- &:hover {
184
- box-shadow: inset 0 0 0 1px transparent;
185
- text-decoration: underline;
186
- }
187
- }
188
- }
189
- }
190
- }