@neatui/css 3.16.1 → 4.0.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.
- package/GUIDE.md +512 -242
- package/MIGRATION-4.0.md +144 -0
- package/README.md +32 -16
- package/components/form/form@a/input.scss +16 -0
- package/components/form/form@b/input.scss +16 -0
- package/components/form/form@c/input.scss +16 -0
- package/components/form/form@d/input.scss +16 -0
- package/components/load/load@h.scss +24 -9
- package/core/basic.scss +8 -30
- package/core/border.scss +3 -0
- package/core/flex.scss +1 -1
- package/core/media.scss +1 -1
- package/core/shadow.scss +0 -89
- package/core/size.scss +39 -41
- package/core/theme.scss +19 -16
- package/core/trim.scss +88 -98
- package/index.scss +1 -0
- package/package.json +1 -1
- package/NEATUI_COMPREHENSIVE_ASSESSMENT.md +0 -1019
- package/NEATUI_DEEP_EVALUATION_REPORT.md +0 -111
- package/NEATUI_EVALUATION_REPORT_GPT.md +0 -247
package/MIGRATION-4.0.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# NeatUI CSS 4.0 迁移指南
|
|
2
|
+
|
|
3
|
+
4.0 收敛了颜色语法,并重建了字号与宽高刻度。迁移时必须按本指南逐项处理,不能只按类名表面含义替换。
|
|
4
|
+
|
|
5
|
+
## 边框颜色前缀
|
|
6
|
+
|
|
7
|
+
4.0 将边框颜色前缀从 `bk-` 收敛为 `b-`,不再生成 `bk-*` 兼容类:
|
|
8
|
+
|
|
9
|
+
| 3.x | 4.0 | CSS 属性 |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `bk-line` | `b-line` | `border-color: var(--co-line)` |
|
|
12
|
+
| `bk-main` | `b-main` | `border-color: var(--co-main)` |
|
|
13
|
+
| `bk-main-o-mm` | `b-main-o-mm` | `border-color: var(--co-main-o-mm)` |
|
|
14
|
+
| `bk-main:hover` | `b-main:hover` | hover 边框颜色 |
|
|
15
|
+
|
|
16
|
+
`b-` 在 4.0 中统一承载边框语义:`b-solid / b-dashed / b-double / b-dotted` 表示样式,`b-xs / b-ss` 表示宽度,`b-line / b-main` 表示颜色。具体含义由后缀词元决定。
|
|
17
|
+
|
|
18
|
+
## 尺寸迁移
|
|
19
|
+
|
|
20
|
+
4.0 重建了字号与宽高刻度。迁移时必须先读取 3.x 类名对应的实际值,再选择 4.0 中相同或最接近的档位;不能按 `xs / sm / mm` 等名称直接替换。
|
|
21
|
+
|
|
22
|
+
以下规则同时适用于响应式前缀,以及 `w / min-w / max-w / h / min-h / max-h` 六组属性。
|
|
23
|
+
|
|
24
|
+
## 宽高旧值
|
|
25
|
+
|
|
26
|
+
3.x 基础档从 `0em` 开始,每档增加 `2em`:
|
|
27
|
+
|
|
28
|
+
| 档位 | no | xs | ss | sm | sl | ms | mm | ml | ls | lm | ll | xl |
|
|
29
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
30
|
+
| 基础 | 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 |
|
|
31
|
+
| `+` | 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | 21 | 23 |
|
|
32
|
+
| `*s` | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 |
|
|
33
|
+
| `*m` | 0 | 6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 | 66 |
|
|
34
|
+
| `*l` | 0 | 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 88 |
|
|
35
|
+
|
|
36
|
+
## 宽高新值
|
|
37
|
+
|
|
38
|
+
4.0 的 `*s / *m / *l` 表示分段,不再表示乘法,并且不再生成 `+`:
|
|
39
|
+
|
|
40
|
+
| 档位 | xs | ss | sm | sl | ms | mm | ml | ls | lm | ll | xl |
|
|
41
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
42
|
+
| 基础 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5 | 5.5 |
|
|
43
|
+
| `*s` | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
|
|
44
|
+
| `*m` | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 |
|
|
45
|
+
| `*l` | 42 | 46 | 50 | 54 | 58 | 62 | 66 | 70 | 74 | 78 | 82 |
|
|
46
|
+
|
|
47
|
+
单位均为 `em`。`no` 仍为 `0`。
|
|
48
|
+
|
|
49
|
+
## NeatUI 内部宽高迁移
|
|
50
|
+
|
|
51
|
+
当前组件包使用到的旧值按下表迁移:
|
|
52
|
+
|
|
53
|
+
| 3.x 类名 | 旧值 | 4.0 类名 | 新值 | 结果 |
|
|
54
|
+
|---|---:|---|---:|---|
|
|
55
|
+
| `w/h-xs` | 2em | `w/h-sl` | 2em | 精确 |
|
|
56
|
+
| `w/h-ss` | 4em | `w/h-ls` | 4em | 精确 |
|
|
57
|
+
| `w/h-sm` | 6em | `w/h-xs*s` | 6em | 精确 |
|
|
58
|
+
| `w/h-ms` | 10em | `w/h-ms*s` | 10em | 精确 |
|
|
59
|
+
| `w/h-ms+` | 11em | `w/h-mm*s` | 11em | 精确 |
|
|
60
|
+
| `w/h-mm` | 12em | `w/h-ml*s` | 12em | 精确 |
|
|
61
|
+
| `w/h-ml+` | 15em | `w/h-ll*s` | 15em | 精确 |
|
|
62
|
+
| `w/h-ls` | 16em | `w/h-xl*s` | 16em | 精确 |
|
|
63
|
+
| `w/h-ls+` | 17em | `w/h-xs*m` | 18em | 最近档,增加1em |
|
|
64
|
+
| `w/h-ll` | 20em | `w/h-ss*m` | 20em | 精确 |
|
|
65
|
+
| `w/h-xl` | 22em | `w/h-sm*m` | 22em | 精确 |
|
|
66
|
+
|
|
67
|
+
属性前缀应保持不变。例如:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
min-h-ms 10em -> min-h-ms*s 10em
|
|
71
|
+
max-h-ls 16em -> max-h-xl*s 16em
|
|
72
|
+
mob:w-ll 20em -> mob:w-ss*m 20em
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 字号旧值与迁移
|
|
76
|
+
|
|
77
|
+
3.x 字号是不规则序列;4.0 改为四段等差刻度。NeatUI 内部使用到的基础字号按最近值迁移:
|
|
78
|
+
|
|
79
|
+
4.0 完整字号值如下,单位均为 `rem`:
|
|
80
|
+
|
|
81
|
+
| 档位 | xs | ss | sm | sl | ms | mm | ml | ls | lm | ll | xl |
|
|
82
|
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
|
83
|
+
| 基础 | 0.625 | 0.75 | 0.875 | 1 | 1.125 | 1.25 | 1.375 | 1.5 | 1.625 | 1.75 | 1.875 |
|
|
84
|
+
| `*s` | 2 | 2.25 | 2.5 | 2.75 | 3 | 3.25 | 3.5 | 3.75 | 4 | 4.25 | 4.5 |
|
|
85
|
+
| `*m` | 5 | 5.5 | 6 | 6.5 | 7 | 7.5 | 8 | 8.5 | 9 | 9.5 | 10 |
|
|
86
|
+
| `*l` | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
|
|
87
|
+
|
|
88
|
+
| 3.x 类名 | 旧值 | 4.0 类名 | 新值 | 结果 |
|
|
89
|
+
|---|---:|---|---:|---|
|
|
90
|
+
| `fs-xs` | 0.8rem | `fs-ss` | 0.75rem | 近似,-0.05rem |
|
|
91
|
+
| `fs-ss` | 0.9rem | `fs-sm` | 0.875rem | 近似,-0.025rem |
|
|
92
|
+
| `fs-sm` | 1rem | `fs-sl` | 1rem | 精确 |
|
|
93
|
+
| `fs-sl` | 1.1rem | `fs-ms` | 1.125rem | 近似,+0.025rem |
|
|
94
|
+
| `fs-ms` | 1.2rem | `fs-mm` | 1.25rem | 近似,+0.05rem |
|
|
95
|
+
| `fs-mm` | 1.4rem | `fs-ml` | 1.375rem | 近似,-0.025rem |
|
|
96
|
+
| `fs-ml` | 1.8rem | `fs-ll` | 1.75rem | 近似,-0.05rem |
|
|
97
|
+
| `fs-ls` | 2.2rem | `fs-ss*s` | 2.25rem | 近似,+0.05rem |
|
|
98
|
+
| `fs-lm` | 2.6rem | `fs-sm*s` | 2.5rem | 近似,-0.1rem |
|
|
99
|
+
| `fs-ll` | 3.2rem | `fs-mm*s` | 3.25rem | 近似,+0.05rem |
|
|
100
|
+
| `fs-xl` | 3.8rem | `fs-ls*s` | 3.75rem | 近似,-0.05rem |
|
|
101
|
+
|
|
102
|
+
旧 `fs-*+` 已删除,逐项迁移如下:
|
|
103
|
+
|
|
104
|
+
| 3.x 类名 | 旧值 | 4.0 类名 | 新值 | 结果 |
|
|
105
|
+
|---|---:|---|---:|---|
|
|
106
|
+
| `fs-xs+` | 0.85rem | `fs-sm` | 0.875rem | 近似,+0.025rem |
|
|
107
|
+
| `fs-ss+` | 0.95rem | `fs-sl` | 1rem | 近似,+0.05rem |
|
|
108
|
+
| `fs-sm+` | 1.05rem | `fs-sl` | 1rem | 近似,-0.05rem |
|
|
109
|
+
| `fs-sl+` | 1.15rem | `fs-ms` | 1.125rem | 近似,-0.025rem |
|
|
110
|
+
| `fs-ms+` | 1.25rem | `fs-mm` | 1.25rem | 精确 |
|
|
111
|
+
| `fs-mm+` | 1.5rem | `fs-ls` | 1.5rem | 精确 |
|
|
112
|
+
| `fs-ml+` | 2rem | `fs-xs*s` | 2rem | 精确 |
|
|
113
|
+
| `fs-ls+` | 2.4rem | `fs-sm*s` | 2.5rem | 近似,+0.1rem |
|
|
114
|
+
| `fs-lm+` | 2.8rem | `fs-sl*s` | 2.75rem | 近似,-0.05rem |
|
|
115
|
+
| `fs-ll+` | 3.5rem | `fs-ml*s` | 3.5rem | 精确 |
|
|
116
|
+
| `fs-xl+` | 4.1rem | `fs-lm*s` | 4rem | 近似,-0.1rem |
|
|
117
|
+
|
|
118
|
+
旧 `fs-*` 翻倍类也已删除,逐项迁移如下:
|
|
119
|
+
|
|
120
|
+
| 3.x 类名 | 旧值 | 4.0 类名 | 新值 | 结果 |
|
|
121
|
+
|---|---:|---|---:|---|
|
|
122
|
+
| `fs-xs*` | 1.6rem | `fs-lm` | 1.625rem | 近似,+0.025rem |
|
|
123
|
+
| `fs-ss*` | 1.8rem | `fs-ll` | 1.75rem | 近似,-0.05rem |
|
|
124
|
+
| `fs-sm*` | 2rem | `fs-xs*s` | 2rem | 精确 |
|
|
125
|
+
| `fs-sl*` | 2.2rem | `fs-ss*s` | 2.25rem | 近似,+0.05rem |
|
|
126
|
+
| `fs-ms*` | 2.4rem | `fs-sm*s` | 2.5rem | 近似,+0.1rem |
|
|
127
|
+
| `fs-mm*` | 2.8rem | `fs-sl*s` | 2.75rem | 近似,-0.05rem |
|
|
128
|
+
| `fs-ml*` | 3.6rem | `fs-ml*s` | 3.5rem | 近似,-0.1rem |
|
|
129
|
+
| `fs-ls*` | 4.4rem | `fs-xl*s` | 4.5rem | 近似,+0.1rem |
|
|
130
|
+
| `fs-lm*` | 5.2rem | `fs-xs*m` | 5rem | 近似,-0.2rem |
|
|
131
|
+
| `fs-ll*` | 6.4rem | `fs-sl*m` | 6.5rem | 近似,+0.1rem |
|
|
132
|
+
| `fs-xl*` | 7.6rem | `fs-mm*m` | 7.5rem | 近似,-0.1rem |
|
|
133
|
+
|
|
134
|
+
无法精确匹配的字号应在视觉回归中确认,不要仅凭名称猜测。
|
|
135
|
+
|
|
136
|
+
## 检查清单
|
|
137
|
+
|
|
138
|
+
1. 搜索所有字号及宽高类,包括动态字符串和响应式前缀。
|
|
139
|
+
2. 根据3.x表计算旧值。
|
|
140
|
+
3. 优先选择4.0精确同值档位。
|
|
141
|
+
4. 没有精确值时记录差值并进行视觉确认。
|
|
142
|
+
5. 确认代码中不再使用宽高 `+`、旧字号 `+` 或旧字号翻倍 `*`。
|
|
143
|
+
6. 编译 CSS,并验证基础、`*s`、`*m`、`*l` 及响应式选择器均正常生成。
|
|
144
|
+
7. 确认正式代码、组件和文档中不再出现 `bk-*`。
|
package/README.md
CHANGED
|
@@ -67,10 +67,16 @@
|
|
|
67
67
|
|
|
68
68
|
- 分级字号:
|
|
69
69
|
|
|
70
|
-
- `.fs-
|
|
71
|
-
- `.fs-{size}
|
|
72
|
-
- `.fs-{size}
|
|
70
|
+
- `.fs-xs` ~ `.fs-xl`: 11档基础字号
|
|
71
|
+
- `.fs-{size}*s`: 展示字号段
|
|
72
|
+
- `.fs-{size}*m`: 大展示字号段
|
|
73
|
+
- `.fs-{size}*l`: 巨型字号段
|
|
73
74
|
- `.fs-{size}-sub`: 子元素字号
|
|
75
|
+
- `.fs-case / .fs-note / .fs-desc / .fs-body / .fs-lead`: 语义字号
|
|
76
|
+
- `.fs-root`: 重置为 `1rem`
|
|
77
|
+
- `.fs++ / .fs--`: 相对当前上下文放大或缩小
|
|
78
|
+
|
|
79
|
+
4.0 已移除 `fs-{size}+`、`fs-{size}*` 和宽高 `+` 语法,并将 `*s / *m / *l` 改为分段刻度;`fs++ / fs--` 是保留的上下文缩放语法。升级项目请先阅读 [4.0 尺寸迁移指南](./MIGRATION-4.0.md),按旧实际值选择新档位。
|
|
74
80
|
|
|
75
81
|
- 行高:
|
|
76
82
|
- `.lh-no`: 无行高
|
|
@@ -130,16 +136,25 @@
|
|
|
130
136
|
|
|
131
137
|
- `.b-solid`: 实线边框
|
|
132
138
|
- `.b-dashed`: 虚线边框
|
|
139
|
+
- `.b-double`: 双线边框
|
|
133
140
|
- `.b-dotted`: 点线边框
|
|
134
141
|
|
|
135
142
|
- 边框宽度:
|
|
136
|
-
- 全边框:`.b-no` ~ `.b-
|
|
137
|
-
- 水平边框:`.bx-no` ~ `.bx-
|
|
138
|
-
- 垂直边框:`.by-no` ~ `.by-
|
|
139
|
-
- 顶部边框:`.bt-no` ~ `.bt-
|
|
140
|
-
- 右侧边框:`.br-no` ~ `.br-
|
|
141
|
-
- 底部边框:`.bb-no` ~ `.bb-
|
|
142
|
-
- 左侧边框:`.bl-no` ~ `.bl-
|
|
143
|
+
- 全边框:`.b-no` ~ `.b-xx`(0px ~ 12px)
|
|
144
|
+
- 水平边框:`.bx-no` ~ `.bx-xx`
|
|
145
|
+
- 垂直边框:`.by-no` ~ `.by-xx`
|
|
146
|
+
- 顶部边框:`.bt-no` ~ `.bt-xx`
|
|
147
|
+
- 右侧边框:`.br-no` ~ `.br-xx`
|
|
148
|
+
- 底部边框:`.bb-no` ~ `.bb-xx`
|
|
149
|
+
- 左侧边框:`.bl-no` ~ `.bl-xx`
|
|
150
|
+
|
|
151
|
+
- 边框颜色:
|
|
152
|
+
- `.b-line`:线条色
|
|
153
|
+
- `.b-main`:主题主色
|
|
154
|
+
- `.b-risk`:危险色
|
|
155
|
+
- `.b-main-o-mm`:带透明度的主题主色
|
|
156
|
+
|
|
157
|
+
4.0 已将旧的 `bk-*` 前缀收敛为 `b-*`,不再生成兼容类。`b-solid`、`b-xs`、`b-line` 分别表示边框样式、宽度和颜色。
|
|
143
158
|
|
|
144
159
|
尺寸等级:
|
|
145
160
|
|
|
@@ -149,12 +164,13 @@
|
|
|
149
164
|
- `sm`: 3px
|
|
150
165
|
- `sl`: 4px
|
|
151
166
|
- `ms`: 5px
|
|
152
|
-
- `mm`:
|
|
153
|
-
- `ml`:
|
|
154
|
-
- `ls`:
|
|
155
|
-
- `lm`:
|
|
156
|
-
- `ll`:
|
|
157
|
-
- `xl`:
|
|
167
|
+
- `mm`: 6px
|
|
168
|
+
- `ml`: 7px
|
|
169
|
+
- `ls`: 8px
|
|
170
|
+
- `lm`: 9px
|
|
171
|
+
- `ll`: 10px
|
|
172
|
+
- `xl`: 11px
|
|
173
|
+
- `xx`: 12px
|
|
158
174
|
|
|
159
175
|
### 5. 主题系统 (theme)
|
|
160
176
|
|
|
@@ -129,6 +129,22 @@ value 规定输入字段的默认值。
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
// 预览
|
|
133
|
+
&[ui-form~='preview'] {
|
|
134
|
+
&,
|
|
135
|
+
&:hover,
|
|
136
|
+
&:focus-within {
|
|
137
|
+
cursor: default;
|
|
138
|
+
border-color: transparent !important;
|
|
139
|
+
background-color: transparent !important;
|
|
140
|
+
box-shadow: none !important;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
input {
|
|
144
|
+
cursor: default;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
132
148
|
// 尺寸
|
|
133
149
|
$sz_base: 1.5em;
|
|
134
150
|
@each $s in $form-sz {
|
|
@@ -128,6 +128,22 @@ value 规定输入字段的默认值。
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
// 预览
|
|
132
|
+
&[ui-form~='preview'] {
|
|
133
|
+
&,
|
|
134
|
+
&:hover,
|
|
135
|
+
&:focus-within {
|
|
136
|
+
cursor: default;
|
|
137
|
+
border-color: transparent !important;
|
|
138
|
+
background-color: transparent !important;
|
|
139
|
+
box-shadow: none !important;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
input {
|
|
143
|
+
cursor: default;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
131
147
|
// 尺寸
|
|
132
148
|
$sz_base: 1.5em;
|
|
133
149
|
@each $s in $form-sz {
|
|
@@ -130,6 +130,22 @@ value 规定输入字段的默认值。
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
// 预览
|
|
134
|
+
&[ui-form~='preview'] {
|
|
135
|
+
&,
|
|
136
|
+
&:hover,
|
|
137
|
+
&:focus-within {
|
|
138
|
+
cursor: default;
|
|
139
|
+
border-color: transparent !important;
|
|
140
|
+
background-color: transparent !important;
|
|
141
|
+
box-shadow: none !important;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
input {
|
|
145
|
+
cursor: default;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
133
149
|
// 尺寸
|
|
134
150
|
$sz_base: 1.5em;
|
|
135
151
|
@each $s in $form-sz {
|
|
@@ -139,6 +139,22 @@ value 规定输入字段的默认值。
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
// 预览
|
|
143
|
+
&[ui-form~='preview'] {
|
|
144
|
+
&,
|
|
145
|
+
&:hover,
|
|
146
|
+
&:focus-within {
|
|
147
|
+
cursor: default;
|
|
148
|
+
border-color: transparent !important;
|
|
149
|
+
background-color: transparent !important;
|
|
150
|
+
box-shadow: none !important;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
input {
|
|
154
|
+
cursor: default;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
142
158
|
// 尺寸
|
|
143
159
|
$sz_base: 1.5em;
|
|
144
160
|
@each $s in $form-sz {
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
[ui-load=
|
|
1
|
+
[ui-load="@h"],
|
|
2
2
|
.ui-load-h {
|
|
3
3
|
@keyframes ui-load-h {
|
|
4
4
|
0%,
|
|
5
5
|
20% {
|
|
6
|
-
background: radial-gradient(
|
|
6
|
+
background: radial-gradient(
|
|
7
|
+
circle at 15% 50%,
|
|
8
|
+
currentColor 12%,
|
|
9
|
+
transparent 13%
|
|
10
|
+
);
|
|
7
11
|
}
|
|
8
12
|
21%,
|
|
9
13
|
25% {
|
|
10
14
|
}
|
|
11
15
|
25%,
|
|
12
16
|
40% {
|
|
13
|
-
background: radial-gradient(
|
|
17
|
+
background: radial-gradient(
|
|
18
|
+
circle at 50% 50%,
|
|
19
|
+
currentColor 17%,
|
|
20
|
+
transparent 18%
|
|
21
|
+
);
|
|
14
22
|
}
|
|
15
23
|
41%,
|
|
16
24
|
45% {
|
|
17
25
|
}
|
|
18
26
|
45%,
|
|
19
27
|
60% {
|
|
20
|
-
background: radial-gradient(
|
|
28
|
+
background: radial-gradient(
|
|
29
|
+
circle at 85% 50%,
|
|
30
|
+
currentColor 12%,
|
|
31
|
+
transparent 13%
|
|
32
|
+
);
|
|
21
33
|
}
|
|
22
34
|
61%,
|
|
23
35
|
100% {
|
|
@@ -29,19 +41,22 @@
|
|
|
29
41
|
display: inline-block;
|
|
30
42
|
width: 1em;
|
|
31
43
|
height: 1em;
|
|
32
|
-
background:
|
|
33
|
-
radial-gradient(circle at
|
|
44
|
+
background:
|
|
45
|
+
radial-gradient(circle at 15% 50%, currentColor 12%, transparent 13%),
|
|
46
|
+
radial-gradient(circle at 50% 50%, currentColor 14%, transparent 15%),
|
|
47
|
+
radial-gradient(circle at 85% 50%, currentColor 9%, transparent 10%);
|
|
34
48
|
|
|
35
49
|
&::after {
|
|
36
50
|
position: absolute;
|
|
37
51
|
display: block;
|
|
38
|
-
content:
|
|
52
|
+
content: "";
|
|
39
53
|
width: 100%;
|
|
40
54
|
height: 100%;
|
|
41
55
|
left: 0;
|
|
42
56
|
top: 0;
|
|
43
|
-
color:
|
|
44
|
-
animation: ui-load-h 1s cubic-bezier(0.72, 0.115, 0.355, 0.88) infinite
|
|
57
|
+
color: currentColor;
|
|
58
|
+
animation: ui-load-h 1s cubic-bezier(0.72, 0.115, 0.355, 0.88) infinite
|
|
59
|
+
both;
|
|
45
60
|
}
|
|
46
61
|
}
|
|
47
62
|
}
|
package/core/basic.scss
CHANGED
|
@@ -206,15 +206,16 @@ code,
|
|
|
206
206
|
|
|
207
207
|
[layout="full"] {
|
|
208
208
|
&,
|
|
209
|
-
body
|
|
209
|
+
body,
|
|
210
|
+
#app,
|
|
211
|
+
#root,
|
|
212
|
+
#__nuxt,
|
|
213
|
+
#__next,
|
|
214
|
+
#svelte,
|
|
215
|
+
app-root {
|
|
210
216
|
width: 100%;
|
|
211
217
|
height: 100%;
|
|
212
218
|
}
|
|
213
|
-
|
|
214
|
-
.box {
|
|
215
|
-
width: 100%;
|
|
216
|
-
max-width: 100%;
|
|
217
|
-
}
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
// 容器
|
|
@@ -247,6 +248,7 @@ code,
|
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
.box,
|
|
251
|
+
.doc,
|
|
250
252
|
.box-base,
|
|
251
253
|
.box-wide,
|
|
252
254
|
.box-norm,
|
|
@@ -255,15 +257,6 @@ code,
|
|
|
255
257
|
margin: 0 auto;
|
|
256
258
|
}
|
|
257
259
|
|
|
258
|
-
@include mob {
|
|
259
|
-
.box-base,
|
|
260
|
-
[layout] .box {
|
|
261
|
-
width: 100%;
|
|
262
|
-
max-width: 100%;
|
|
263
|
-
padding: 0 4%;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
260
|
// 文档
|
|
268
261
|
.doc {
|
|
269
262
|
p {
|
|
@@ -271,21 +264,6 @@ code,
|
|
|
271
264
|
}
|
|
272
265
|
}
|
|
273
266
|
|
|
274
|
-
.bk {
|
|
275
|
-
&-solid {
|
|
276
|
-
border-style: solid;
|
|
277
|
-
}
|
|
278
|
-
&-dashed {
|
|
279
|
-
border-style: dashed;
|
|
280
|
-
}
|
|
281
|
-
&-double {
|
|
282
|
-
border-style: double;
|
|
283
|
-
}
|
|
284
|
-
&-dotted {
|
|
285
|
-
border-style: dotted;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
267
|
// 省略号
|
|
290
268
|
[ui-omit] {
|
|
291
269
|
overflow: hidden;
|
package/core/border.scss
CHANGED
package/core/flex.scss
CHANGED
package/core/media.scss
CHANGED
package/core/shadow.scss
CHANGED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// 阴影
|
|
2
|
-
$cos: main, read, case, line, back;
|
|
3
|
-
$szs: xs, ss, sm, sl, ms, mm, ml, ls, lm, ll;
|
|
4
|
-
|
|
5
|
-
div {
|
|
6
|
-
width: 5em;
|
|
7
|
-
height: 2em;
|
|
8
|
-
margin: 1em;
|
|
9
|
-
background: #f0f0f0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.bs {
|
|
13
|
-
box-shadow: inset 0 0 0 1px currentColor;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.bs-x {
|
|
17
|
-
box-shadow:
|
|
18
|
-
inset 1px 0 0 0 currentColor,
|
|
19
|
-
inset -1px 0 0 0 currentColor;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.bs-y {
|
|
23
|
-
box-shadow:
|
|
24
|
-
inset 0 1px 0 0 currentColor,
|
|
25
|
-
inset 0 -1px 0 0 currentColor;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.bs-l {
|
|
29
|
-
box-shadow: inset 1px 0 0 0 currentColor;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.bs-r {
|
|
33
|
-
box-shadow: inset -1px 0 0 0 currentColor;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.bs-t {
|
|
37
|
-
box-shadow: inset 0 1px 0 0 currentColor;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.bs-b {
|
|
41
|
-
box-shadow: inset 0 -1px 0 0 currentColor;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* 主题色 */
|
|
45
|
-
.bs-xs-main {
|
|
46
|
-
@include theme {
|
|
47
|
-
box-shadow: inset 0 0 0 1px var(--co-main);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.bs-x-xs-main {
|
|
52
|
-
@include theme {
|
|
53
|
-
box-shadow:
|
|
54
|
-
inset 1px 0 0 0 var(--co-main),
|
|
55
|
-
inset -1px 0 0 0 var(--co-main);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.bs-y-xs-main {
|
|
60
|
-
@include theme {
|
|
61
|
-
box-shadow:
|
|
62
|
-
inset 0 1px 0 0 var(--co-main),
|
|
63
|
-
inset 0 -1px 0 0 var(--co-main);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.bs-l-xs-main {
|
|
68
|
-
@include theme {
|
|
69
|
-
box-shadow: inset 1px 0 0 0 var(--co-main);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.bs-r-xs-main {
|
|
74
|
-
@include theme {
|
|
75
|
-
box-shadow: inset -1px 0 0 0 var(--co-main);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.bs-t-xs-main {
|
|
80
|
-
@include theme {
|
|
81
|
-
box-shadow: inset 0 1px 0 0 var(--co-main);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.bs-b-xs-main {
|
|
86
|
-
@include theme {
|
|
87
|
-
box-shadow: inset 0 -1px 0 0 var(--co-main);
|
|
88
|
-
}
|
|
89
|
-
}
|
package/core/size.scss
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* 模块:字号
|
|
3
3
|
* 模块类型:b(基础模块)
|
|
4
4
|
* 精度:11档 (xs ss sm sl ms mm ml ls lm ll xl)
|
|
5
|
-
* 分级:
|
|
5
|
+
* 分级:4段 (base/*s/*m/*l)
|
|
6
6
|
* 适配:桌面 | 平板 | 移动
|
|
7
|
-
* 版本:v0.0.
|
|
7
|
+
* 版本:v0.0.3
|
|
8
8
|
* 备注:s->Small 小,m->Middle 中,l->Large 大;x->Extra
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -26,8 +26,11 @@
|
|
|
26
26
|
|
|
27
27
|
// 分级字号
|
|
28
28
|
@mixin randSize($d: '') {
|
|
29
|
-
$
|
|
30
|
-
|
|
29
|
+
$base-sizes: ('xs' 0.625rem), ('ss' 0.75rem), ('sm' 0.875rem), ('sl' 1rem), ('ms' 1.125rem), ('mm' 1.25rem), ('ml' 1.375rem), ('ls' 1.5rem), ('lm' 1.625rem), ('ll' 1.75rem), ('xl' 1.875rem);
|
|
30
|
+
$display-sizes: ('xs\\*s' 2rem), ('ss\\*s' 2.25rem), ('sm\\*s' 2.5rem), ('sl\\*s' 2.75rem), ('ms\\*s' 3rem), ('mm\\*s' 3.25rem), ('ml\\*s' 3.5rem), ('ls\\*s' 3.75rem), ('lm\\*s' 4rem), ('ll\\*s' 4.25rem), ('xl\\*s' 4.5rem),
|
|
31
|
+
('xs\\*m' 5rem), ('ss\\*m' 5.5rem), ('sm\\*m' 6rem), ('sl\\*m' 6.5rem), ('ms\\*m' 7rem), ('mm\\*m' 7.5rem), ('ml\\*m' 8rem), ('ls\\*m' 8.5rem), ('lm\\*m' 9rem), ('ll\\*m' 9.5rem), ('xl\\*m' 10rem),
|
|
32
|
+
('xs\\*l' 11rem), ('ss\\*l' 12rem), ('sm\\*l' 13rem), ('sl\\*l' 14rem), ('ms\\*l' 15rem), ('mm\\*l' 16rem), ('ml\\*l' 17rem), ('ls\\*l' 18rem), ('lm\\*l' 19rem), ('ll\\*l' 20rem), ('xl\\*l' 21rem);
|
|
33
|
+
|
|
31
34
|
.#{$d}fs-no {
|
|
32
35
|
font-size: 0rem;
|
|
33
36
|
}
|
|
@@ -35,54 +38,49 @@
|
|
|
35
38
|
line-height: 0;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
$sz
|
|
39
|
-
$add: 0.05;
|
|
40
|
-
@each $k in $rank {
|
|
41
|
-
@if ($sz<1.2) {
|
|
42
|
-
$sz: $sz + 0.1;
|
|
43
|
-
} @else if ($sz<1.4) {
|
|
44
|
-
$sz: $sz + 0.2;
|
|
45
|
-
$add: 0.1;
|
|
46
|
-
} @else if($sz<2.4) {
|
|
47
|
-
$sz: $sz + 0.4;
|
|
48
|
-
$add: 0.2;
|
|
49
|
-
} @else if($sz<3.4) {
|
|
50
|
-
$sz: $sz + 0.6;
|
|
51
|
-
$add: 0.3;
|
|
52
|
-
} @else {
|
|
53
|
-
$sz: $sz + 0.8;
|
|
54
|
-
$add: 0.4;
|
|
55
|
-
}
|
|
56
|
-
|
|
41
|
+
@each $k, $sz in $base-sizes {
|
|
57
42
|
.#{$d}fs-#{$k},
|
|
58
43
|
.#{$d}fs-#{$k}-sub > *,
|
|
59
44
|
.#{$d}fs-#{$k}-sub\:sta > *::before,
|
|
60
45
|
.#{$d}fs-#{$k}-sub\:end > *::after,
|
|
61
46
|
.#{$d}fs-#{$k}\:sta::before,
|
|
62
47
|
.#{$d}fs-#{$k}\:end::after {
|
|
63
|
-
font-size:
|
|
64
|
-
}
|
|
65
|
-
// 加0.05
|
|
66
|
-
.#{$d}fs-#{$k}\+,
|
|
67
|
-
.#{$d}fs-#{$k}-sub\+ > *,
|
|
68
|
-
.#{$d}fs-#{$k}\+\:sta::before,
|
|
69
|
-
.#{$d}fs-#{$k}\+\:end::after,
|
|
70
|
-
.#{$d}fs-#{$k}-sub\+\:sta > *::before,
|
|
71
|
-
.#{$d}fs-#{$k}-sub\+\:end > *::after {
|
|
72
|
-
font-size: #{$sz + $add}rem;
|
|
48
|
+
font-size: $sz;
|
|
73
49
|
}
|
|
50
|
+
}
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
.#{$d}fs-#{$k}
|
|
77
|
-
|
|
78
|
-
.#{$d}fs-#{$k}\*\:sta::before,
|
|
79
|
-
.#{$d}fs-#{$k}\*\:end::after,
|
|
80
|
-
.#{$d}fs-#{$k}-sub\*\:sta > *::before,
|
|
81
|
-
.#{$d}fs-#{$k}-sub\*\:end > *::after {
|
|
82
|
-
font-size: #{$sz * 2}rem;
|
|
52
|
+
@each $k, $sz in $display-sizes {
|
|
53
|
+
.#{$d}fs-#{$k} {
|
|
54
|
+
font-size: $sz;
|
|
83
55
|
}
|
|
84
56
|
}
|
|
85
57
|
|
|
58
|
+
.#{$d}fs-case {
|
|
59
|
+
font-size: 0.625rem;
|
|
60
|
+
}
|
|
61
|
+
.#{$d}fs-note {
|
|
62
|
+
font-size: 0.75rem;
|
|
63
|
+
}
|
|
64
|
+
.#{$d}fs-desc {
|
|
65
|
+
font-size: 0.875rem;
|
|
66
|
+
}
|
|
67
|
+
.#{$d}fs-body {
|
|
68
|
+
font-size: 1rem;
|
|
69
|
+
}
|
|
70
|
+
.#{$d}fs-lead {
|
|
71
|
+
font-size: 1.125rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$d}fs-root {
|
|
75
|
+
font-size: 1rem;
|
|
76
|
+
}
|
|
77
|
+
.#{$d}fs\+\+ {
|
|
78
|
+
font-size: 1.125em;
|
|
79
|
+
}
|
|
80
|
+
.#{$d}fs-- {
|
|
81
|
+
font-size: 0.875em;
|
|
82
|
+
}
|
|
83
|
+
|
|
86
84
|
.#{$d}lh-no {
|
|
87
85
|
line-height: 0;
|
|
88
86
|
}
|