@neatui/css 5.3.0 → 5.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @neatui/css 更新记录
2
2
 
3
+ ## 5.5.0
4
+
5
+ ### 不兼容变更:换行只用 `ui-wrap`
6
+
7
+ - 移除 `.wrap`、`.nowrap` 及 `pad:`、`mob:` 换行类。
8
+ - `ui-wrap` 新增 `no`(不换行)。迁移:`nowrap` → `ui-wrap="no"`,`wrap` → `ui-wrap="all"`,`mob:wrap` → `ui-wrap="=mob"`,`pad:wrap` → `ui-wrap="<dpc"`。
9
+
3
10
  ## 5.2.1
4
11
 
5
12
  - `ui-icon="close"`:图案放大到 80%,线条更细;`steps` 内部使用的 `%icon-close` 不变。
package/GUIDE.md CHANGED
@@ -933,6 +933,33 @@ dpc, dpc-s, dpc-m, dpc-l
933
933
 
934
934
  除两个兼容空端点外,命中的规则都使用 `display: none !important`。
935
935
 
936
+ ### 按断点换行 `ui-wrap`
937
+
938
+ 换行只用 `ui-wrap`(`wrap`、`nowrap` 及 `pad:`、`mob:` 换行类已移除)。三类取值:
939
+
940
+ - `no`:不换行(`no` + `wrap`,对应 CSS `nowrap`)。
941
+ - `all`:全部换行。
942
+ - 断点值:与 `ui-hide` 相同(`>`、`<`、`=` + 九档细分值或设备段别名),可用空格组合,列出的范围换行、其余不换行。
943
+
944
+ | 换行的端 | 写法 |
945
+ | --- | --- |
946
+ | 都不换行 | `ui-wrap="no"` |
947
+ | 仅移动 | `ui-wrap="=mob"` |
948
+ | 仅平板 | `ui-wrap="=pad"` |
949
+ | 仅桌面 | `ui-wrap="=dpc"` |
950
+ | 移动 + 平板 | `ui-wrap="<dpc"` |
951
+ | 平板 + 桌面 | `ui-wrap=">mob"` |
952
+ | 移动 + 桌面 | `ui-wrap="=mob =dpc"` |
953
+ | 都换行 | `ui-wrap="all"` |
954
+
955
+ ```html
956
+ <!-- 仅中平板档(960px–1119px)换行 -->
957
+ <div ui-wrap="=pad-m">...</div>
958
+ ```
959
+
960
+ 迁移:`nowrap` → `ui-wrap="no"`,`wrap` → `ui-wrap="all"`,`mob:wrap` → `ui-wrap="=mob"`,`pad:wrap` → `ui-wrap="<dpc"`。
961
+ `all` 不带媒体查询,比 `=mob =pad =dpc` 更可靠(后者在断点间的小数宽度,如 799.5px,不会命中)。
962
+
936
963
  ### 响应式 class 前缀
937
964
 
938
965
  组件级 class 使用 `base → pad → mob` 三层覆盖;`pad:` 在最大 1279px 生效,
package/core/basic.scss CHANGED
@@ -1,5 +1,6 @@
1
1
  @use "./media.scss" as *;
2
2
  @use "./vars.scss" as *;
3
+ @use "sass:list";
3
4
 
4
5
  @mixin base($d: "") {
5
6
  .#{$d}w-auto {
@@ -177,13 +178,6 @@
177
178
  overflow-y: auto;
178
179
  }
179
180
 
180
- .#{$d}wrap {
181
- white-space: normal;
182
- }
183
- .#{$d}nowrap {
184
- white-space: nowrap;
185
- }
186
-
187
181
  .#{$d}upper {
188
182
  text-transform: uppercase;
189
183
  }
@@ -204,6 +198,34 @@
204
198
  @include base("mob\\:");
205
199
  }
206
200
 
201
+ // 换行只用 ui-wrap(已移除 wrap / nowrap 类):
202
+ // no = 不换行(no + wrap,同 CSS nowrap);all = 全部换行;
203
+ // 断点值同 ui-hide(>pad / <pad / =pad 及九档细分值),可空格组合,列出的范围换行、其余不换行
204
+ [ui-wrap],
205
+ [ui-wrap~='no'] {
206
+ white-space: nowrap;
207
+ }
208
+ [ui-wrap~='all'] {
209
+ white-space: normal;
210
+ }
211
+ @each $q in ('>', '<', '=') {
212
+ @each $sz in $level {
213
+ $n: #{list.nth($sz, 1)};
214
+ [ui-wrap~='#{$q}#{$n}'] {
215
+ @include med('#{$q}#{$n}') {
216
+ white-space: normal;
217
+ }
218
+ }
219
+ }
220
+ }
221
+ @each $p in ('>mob', '>pad', '<pad', '<dpc', '=mob', '=pad', '=dpc') {
222
+ [ui-wrap~='#{$p}'] {
223
+ @include med($p) {
224
+ white-space: normal;
225
+ }
226
+ }
227
+ }
228
+
207
229
  // 代码
208
230
  code,
209
231
  .code {
package/dist/neatui.css CHANGED
@@ -601,14 +601,6 @@ sup{
601
601
  overflow-y:auto;
602
602
  }
603
603
 
604
- .wrap{
605
- white-space:normal;
606
- }
607
-
608
- .nowrap{
609
- white-space:nowrap;
610
- }
611
-
612
604
  .upper{
613
605
  text-transform:uppercase;
614
606
  }
@@ -765,12 +757,6 @@ sup{
765
757
  .pad\:scroll-y{
766
758
  overflow-y:auto;
767
759
  }
768
- .pad\:wrap{
769
- white-space:normal;
770
- }
771
- .pad\:nowrap{
772
- white-space:nowrap;
773
- }
774
760
  .pad\:upper{
775
761
  text-transform:uppercase;
776
762
  }
@@ -926,12 +912,6 @@ sup{
926
912
  .mob\:scroll-y{
927
913
  overflow-y:auto;
928
914
  }
929
- .mob\:wrap{
930
- white-space:normal;
931
- }
932
- .mob\:nowrap{
933
- white-space:nowrap;
934
- }
935
915
  .mob\:upper{
936
916
  text-transform:uppercase;
937
917
  }
@@ -939,6 +919,206 @@ sup{
939
919
  text-transform:lowercase;
940
920
  }
941
921
  }
922
+ [ui-wrap],[ui-wrap~=no]{
923
+ white-space:nowrap;
924
+ }
925
+
926
+ [ui-wrap~=all]{
927
+ white-space:normal;
928
+ }
929
+
930
+ @media screen and (min-width:480px){
931
+ [ui-wrap~=">mob-s"]{
932
+ white-space:normal;
933
+ }
934
+ }
935
+
936
+ @media screen and (min-width:640px){
937
+ [ui-wrap~=">mob-m"]{
938
+ white-space:normal;
939
+ }
940
+ }
941
+
942
+ @media screen and (min-width:800px){
943
+ [ui-wrap~=">mob-l"]{
944
+ white-space:normal;
945
+ }
946
+ }
947
+
948
+ @media screen and (min-width:960px){
949
+ [ui-wrap~=">pad-s"]{
950
+ white-space:normal;
951
+ }
952
+ }
953
+
954
+ @media screen and (min-width:1120px){
955
+ [ui-wrap~=">pad-m"]{
956
+ white-space:normal;
957
+ }
958
+ }
959
+
960
+ @media screen and (min-width:1280px){
961
+ [ui-wrap~=">pad-l"]{
962
+ white-space:normal;
963
+ }
964
+ }
965
+
966
+ @media screen and (min-width:1440px){
967
+ [ui-wrap~=">dpc-s"]{
968
+ white-space:normal;
969
+ }
970
+ }
971
+
972
+ @media screen and (min-width:1600px){
973
+ [ui-wrap~=">dpc-m"]{
974
+ white-space:normal;
975
+ }
976
+ }
977
+
978
+ @media screen and (max-width:479px){
979
+ [ui-wrap~="<mob-m"]{
980
+ white-space:normal;
981
+ }
982
+ }
983
+
984
+ @media screen and (max-width:639px){
985
+ [ui-wrap~="<mob-l"]{
986
+ white-space:normal;
987
+ }
988
+ }
989
+
990
+ @media screen and (max-width:799px){
991
+ [ui-wrap~="<pad-s"]{
992
+ white-space:normal;
993
+ }
994
+ }
995
+
996
+ @media screen and (max-width:959px){
997
+ [ui-wrap~="<pad-m"]{
998
+ white-space:normal;
999
+ }
1000
+ }
1001
+
1002
+ @media screen and (max-width:1119px){
1003
+ [ui-wrap~="<pad-l"]{
1004
+ white-space:normal;
1005
+ }
1006
+ }
1007
+
1008
+ @media screen and (max-width:1279px){
1009
+ [ui-wrap~="<dpc-s"]{
1010
+ white-space:normal;
1011
+ }
1012
+ }
1013
+
1014
+ @media screen and (max-width:1439px){
1015
+ [ui-wrap~="<dpc-m"]{
1016
+ white-space:normal;
1017
+ }
1018
+ }
1019
+
1020
+ @media screen and (max-width:1599px){
1021
+ [ui-wrap~="<dpc-l"]{
1022
+ white-space:normal;
1023
+ }
1024
+ }
1025
+
1026
+ @media screen and (max-width:479px){
1027
+ [ui-wrap~="=mob-s"]{
1028
+ white-space:normal;
1029
+ }
1030
+ }
1031
+
1032
+ @media screen and (min-width:480px) and (max-width:639px){
1033
+ [ui-wrap~="=mob-m"]{
1034
+ white-space:normal;
1035
+ }
1036
+ }
1037
+
1038
+ @media screen and (min-width:640px) and (max-width:799px){
1039
+ [ui-wrap~="=mob-l"]{
1040
+ white-space:normal;
1041
+ }
1042
+ }
1043
+
1044
+ @media screen and (min-width:800px) and (max-width:959px){
1045
+ [ui-wrap~="=pad-s"]{
1046
+ white-space:normal;
1047
+ }
1048
+ }
1049
+
1050
+ @media screen and (min-width:960px) and (max-width:1119px){
1051
+ [ui-wrap~="=pad-m"]{
1052
+ white-space:normal;
1053
+ }
1054
+ }
1055
+
1056
+ @media screen and (min-width:1120px) and (max-width:1279px){
1057
+ [ui-wrap~="=pad-l"]{
1058
+ white-space:normal;
1059
+ }
1060
+ }
1061
+
1062
+ @media screen and (min-width:1280px) and (max-width:1439px){
1063
+ [ui-wrap~="=dpc-s"]{
1064
+ white-space:normal;
1065
+ }
1066
+ }
1067
+
1068
+ @media screen and (min-width:1440px) and (max-width:1599px){
1069
+ [ui-wrap~="=dpc-m"]{
1070
+ white-space:normal;
1071
+ }
1072
+ }
1073
+
1074
+ @media screen and (min-width:1600px){
1075
+ [ui-wrap~="=dpc-l"]{
1076
+ white-space:normal;
1077
+ }
1078
+ }
1079
+
1080
+ @media screen and (min-width:800px){
1081
+ [ui-wrap~=">mob"]{
1082
+ white-space:normal;
1083
+ }
1084
+ }
1085
+
1086
+ @media screen and (min-width:1280px){
1087
+ [ui-wrap~=">pad"]{
1088
+ white-space:normal;
1089
+ }
1090
+ }
1091
+
1092
+ @media screen and (max-width:799px){
1093
+ [ui-wrap~="<pad"]{
1094
+ white-space:normal;
1095
+ }
1096
+ }
1097
+
1098
+ @media screen and (max-width:1279px){
1099
+ [ui-wrap~="<dpc"]{
1100
+ white-space:normal;
1101
+ }
1102
+ }
1103
+
1104
+ @media screen and (max-width:799px){
1105
+ [ui-wrap~="=mob"]{
1106
+ white-space:normal;
1107
+ }
1108
+ }
1109
+
1110
+ @media screen and (min-width:800px) and (max-width:1279px){
1111
+ [ui-wrap~="=pad"]{
1112
+ white-space:normal;
1113
+ }
1114
+ }
1115
+
1116
+ @media screen and (min-width:1280px){
1117
+ [ui-wrap~="=dpc"]{
1118
+ white-space:normal;
1119
+ }
1120
+ }
1121
+
942
1122
  .code,code{
943
1123
  font-family:Menlo,Monaco,Courier New,monospace;
944
1124
  -webkit-font-smoothing:antialiased;