@xihan-ui/styles 3.1.0 → 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.
Files changed (290) hide show
  1. package/CHANGELOG.md +470 -0
  2. package/component-tokens.d.ts +230 -60
  3. package/components.tokens.json +5156 -1557
  4. package/css/accordion.css +47 -20
  5. package/css/alert.css +16 -17
  6. package/css/anchor.css +2 -2
  7. package/css/approval.css +41 -17
  8. package/css/avatar-group.css +9 -12
  9. package/css/avatar.css +20 -18
  10. package/css/back-top.css +21 -7
  11. package/css/badge.css +5 -5
  12. package/css/breadcrumb.css +18 -16
  13. package/css/button-group.css +4 -6
  14. package/css/button.css +13 -12
  15. package/css/calendar-picker.css +178 -95
  16. package/css/calendar-range-picker.css +207 -122
  17. package/css/card.css +34 -6
  18. package/css/carousel.css +94 -46
  19. package/css/cartesian-chart.css +11 -11
  20. package/css/cascader.css +51 -39
  21. package/css/checkbox-group.css +9 -6
  22. package/css/checkbox.css +5 -4
  23. package/css/citation.css +9 -4
  24. package/css/clipboard.css +20 -4
  25. package/css/code-view.css +6 -6
  26. package/css/collapsible.css +29 -14
  27. package/css/color-field.css +4 -4
  28. package/css/color-picker.css +77 -23
  29. package/css/color-slider.css +10 -8
  30. package/css/color-swatch-picker.css +14 -9
  31. package/css/combobox.css +26 -14
  32. package/css/command.css +14 -9
  33. package/css/context-menu.css +10 -5
  34. package/css/date-field.css +12 -6
  35. package/css/date-picker.css +178 -109
  36. package/css/date-range-picker.css +199 -130
  37. package/css/description.css +10 -6
  38. package/css/descriptions.css +47 -19
  39. package/css/dialog.css +50 -35
  40. package/css/diff-view.css +8 -8
  41. package/css/drawer.css +75 -21
  42. package/css/editable.css +15 -41
  43. package/css/empty-state.css +21 -3
  44. package/css/field-array.css +5 -2
  45. package/css/field.css +17 -18
  46. package/css/fieldset.css +33 -13
  47. package/css/file-upload.css +66 -33
  48. package/css/float-button.css +60 -35
  49. package/css/floating-panel.css +1 -1
  50. package/css/form.css +30 -16
  51. package/css/graph-chart.css +2 -2
  52. package/css/grid-list.css +1 -1
  53. package/css/highlight.css +5 -5
  54. package/css/hover-card.css +19 -12
  55. package/css/image-viewer.css +77 -27
  56. package/css/image.css +13 -5
  57. package/css/infinite-scroll.css +8 -4
  58. package/css/input-group.css +74 -26
  59. package/css/kbd.css +1 -1
  60. package/css/label.css +27 -11
  61. package/css/layout.css +17 -10
  62. package/css/list.css +13 -9
  63. package/css/listbox.css +12 -7
  64. package/css/loading-bar.css +3 -0
  65. package/css/mention.css +11 -9
  66. package/css/menu.css +10 -5
  67. package/css/menubar.css +13 -8
  68. package/css/message-feed.css +1 -1
  69. package/css/navigation-menu.css +2 -2
  70. package/css/notification.css +132 -49
  71. package/css/number-animation.css +2 -2
  72. package/css/number-field.css +75 -52
  73. package/css/page-header.css +64 -27
  74. package/css/pagination.css +35 -38
  75. package/css/password-input.css +12 -68
  76. package/css/pin-input.css +18 -26
  77. package/css/popconfirm.css +23 -14
  78. package/css/popover.css +18 -12
  79. package/css/progress.css +14 -13
  80. package/css/prompt-input.css +3 -3
  81. package/css/question-flow.css +41 -15
  82. package/css/radar-chart.css +6 -6
  83. package/css/radio-group.css +120 -55
  84. package/css/rating.css +32 -15
  85. package/css/select.css +16 -12
  86. package/css/separator.css +24 -6
  87. package/css/side-nav.css +29 -24
  88. package/css/signature-pad.css +23 -9
  89. package/css/skeleton.css +12 -12
  90. package/css/slider.css +77 -48
  91. package/css/sortable.css +2 -2
  92. package/css/sparkline.css +8 -2
  93. package/css/spinner.css +40 -20
  94. package/css/statistic.css +14 -14
  95. package/css/steps.css +115 -84
  96. package/css/switch.css +9 -7
  97. package/css/table.css +29 -12
  98. package/css/tabs.css +35 -12
  99. package/css/tag-group.css +17 -6
  100. package/css/tag.css +54 -29
  101. package/css/tags-input.css +39 -20
  102. package/css/text-field.css +5 -5
  103. package/css/time-field.css +4 -4
  104. package/css/time-picker.css +150 -64
  105. package/css/time-range-picker.css +91 -62
  106. package/css/timeline.css +37 -20
  107. package/css/timer.css +3 -3
  108. package/css/toggle-group.css +4 -4
  109. package/css/tool-call.css +13 -11
  110. package/css/toolbar.css +6 -5
  111. package/css/tooltip.css +16 -17
  112. package/css/tour.css +14 -7
  113. package/css/transfer.css +22 -16
  114. package/css/tree-select.css +12 -12
  115. package/css/tree.css +26 -25
  116. package/css/typography.css +28 -25
  117. package/dist/css/accordion.css +296 -0
  118. package/dist/css/affix.css +47 -0
  119. package/dist/css/alert.css +246 -0
  120. package/dist/css/anchor.css +252 -0
  121. package/dist/css/approval.css +525 -0
  122. package/dist/css/avatar-group.css +96 -0
  123. package/dist/css/avatar.css +100 -0
  124. package/dist/css/back-top.css +175 -0
  125. package/dist/css/badge.css +205 -0
  126. package/dist/css/bar-code.css +62 -0
  127. package/dist/css/breadcrumb.css +232 -0
  128. package/dist/css/button-group.css +261 -0
  129. package/dist/css/button.css +216 -0
  130. package/dist/css/calendar-picker.css +550 -0
  131. package/dist/css/calendar-range-picker.css +639 -0
  132. package/dist/css/card.css +249 -0
  133. package/dist/css/carousel.css +726 -0
  134. package/dist/css/cartesian-chart.css +830 -0
  135. package/dist/css/cascader.css +973 -0
  136. package/dist/css/checkbox-group.css +361 -0
  137. package/dist/css/checkbox.css +258 -0
  138. package/dist/css/citation.css +475 -0
  139. package/dist/css/clipboard.css +331 -0
  140. package/dist/css/code-view.css +374 -0
  141. package/dist/css/collapsible.css +200 -0
  142. package/dist/css/color-field.css +176 -0
  143. package/dist/css/color-picker.css +649 -0
  144. package/dist/css/color-slider.css +283 -0
  145. package/dist/css/color-swatch-picker.css +250 -0
  146. package/dist/css/color-swatch.css +35 -0
  147. package/dist/css/combobox.css +578 -0
  148. package/dist/css/command.css +404 -0
  149. package/dist/css/context-menu.css +425 -0
  150. package/dist/css/date-field.css +317 -0
  151. package/dist/css/date-picker.css +931 -0
  152. package/dist/css/date-range-picker.css +949 -0
  153. package/dist/css/description.css +71 -0
  154. package/dist/css/descriptions.css +327 -0
  155. package/dist/css/dialog.css +470 -0
  156. package/dist/css/diff-view.css +513 -0
  157. package/dist/css/download-trigger.css +151 -0
  158. package/dist/css/drawer.css +606 -0
  159. package/dist/css/editable.css +269 -0
  160. package/dist/css/empty-state.css +181 -0
  161. package/dist/css/field-array.css +229 -0
  162. package/dist/css/field.css +165 -0
  163. package/dist/css/fieldset.css +122 -0
  164. package/dist/css/file-upload.css +462 -0
  165. package/dist/css/flex.css +441 -0
  166. package/dist/css/float-button.css +579 -0
  167. package/dist/css/floating-panel.css +429 -0
  168. package/dist/css/focus.css +46 -0
  169. package/dist/css/forced-colors.css +93 -0
  170. package/dist/css/form.css +407 -0
  171. package/dist/css/funnel-chart.css +106 -0
  172. package/dist/css/graph-chart.css +205 -0
  173. package/dist/css/grid-list.css +235 -0
  174. package/dist/css/grid.css +1201 -0
  175. package/dist/css/heatmap.css +552 -0
  176. package/dist/css/hierarchy-chart.css +298 -0
  177. package/dist/css/highlight.css +41 -0
  178. package/dist/css/hover-card.css +233 -0
  179. package/dist/css/icon.css +225 -0
  180. package/dist/css/image-cropper.css +373 -0
  181. package/dist/css/image-viewer.css +588 -0
  182. package/dist/css/image.css +106 -0
  183. package/dist/css/infinite-scroll.css +81 -0
  184. package/dist/css/input-group.css +323 -0
  185. package/dist/css/json-viewer.css +379 -0
  186. package/dist/css/kbd.css +72 -0
  187. package/dist/css/label.css +94 -0
  188. package/dist/css/layers.css +7 -0
  189. package/dist/css/layout.css +379 -0
  190. package/dist/css/liquid.css +106 -0
  191. package/dist/css/list.css +156 -0
  192. package/dist/css/listbox.css +395 -0
  193. package/dist/css/loading-bar.css +144 -0
  194. package/dist/css/log.css +306 -0
  195. package/dist/css/markdown-stream.css +149 -0
  196. package/dist/css/marquee.css +378 -0
  197. package/dist/css/masonry.css +70 -0
  198. package/dist/css/matrix-code.css +67 -0
  199. package/dist/css/mention.css +395 -0
  200. package/dist/css/menu.css +369 -0
  201. package/dist/css/menubar.css +461 -0
  202. package/dist/css/message-feed.css +318 -0
  203. package/dist/css/navigation-menu.css +513 -0
  204. package/dist/css/notification.css +865 -0
  205. package/dist/css/number-animation.css +44 -0
  206. package/dist/css/number-field.css +275 -0
  207. package/dist/css/overlay-arrow.css +56 -0
  208. package/dist/css/page-header.css +221 -0
  209. package/dist/css/pagination.css +447 -0
  210. package/dist/css/password-input.css +335 -0
  211. package/dist/css/pie-chart.css +247 -0
  212. package/dist/css/pin-input.css +191 -0
  213. package/dist/css/pointer.css +36 -0
  214. package/dist/css/popconfirm.css +329 -0
  215. package/dist/css/popover.css +285 -0
  216. package/dist/css/progress.css +502 -0
  217. package/dist/css/prompt-input.css +260 -0
  218. package/dist/css/question-flow.css +579 -0
  219. package/dist/css/radar-chart.css +233 -0
  220. package/dist/css/radio-group.css +663 -0
  221. package/dist/css/rating.css +311 -0
  222. package/dist/css/reasoning.css +343 -0
  223. package/dist/css/reset.css +117 -0
  224. package/dist/css/resizable.css +242 -0
  225. package/dist/css/sankey-chart.css +174 -0
  226. package/dist/css/scroll-area.css +240 -0
  227. package/dist/css/scrollbar.css +204 -0
  228. package/dist/css/select.css +616 -0
  229. package/dist/css/separator.css +140 -0
  230. package/dist/css/side-nav.css +481 -0
  231. package/dist/css/signature-pad.css +193 -0
  232. package/dist/css/skeleton.css +161 -0
  233. package/dist/css/slider.css +403 -0
  234. package/dist/css/sortable.css +228 -0
  235. package/dist/css/sparkline.css +170 -0
  236. package/dist/css/spinner.css +256 -0
  237. package/dist/css/splitter.css +159 -0
  238. package/dist/css/statistic.css +137 -0
  239. package/dist/css/steps.css +658 -0
  240. package/dist/css/switch.css +353 -0
  241. package/dist/css/table.css +1162 -0
  242. package/dist/css/tabs.css +967 -0
  243. package/dist/css/tag-group.css +258 -0
  244. package/dist/css/tag.css +335 -0
  245. package/dist/css/tags-input.css +341 -0
  246. package/dist/css/text-field.css +197 -0
  247. package/dist/css/time-field.css +277 -0
  248. package/dist/css/time-picker.css +793 -0
  249. package/dist/css/time-range-picker.css +775 -0
  250. package/dist/css/timeline.css +440 -0
  251. package/dist/css/timer.css +123 -0
  252. package/dist/css/timestamp.css +34 -0
  253. package/dist/css/toggle-group.css +424 -0
  254. package/dist/css/toggle.css +146 -0
  255. package/dist/css/tone.css +189 -0
  256. package/dist/css/tool-call.css +431 -0
  257. package/dist/css/toolbar.css +366 -0
  258. package/dist/css/tooltip.css +217 -0
  259. package/dist/css/tour.css +446 -0
  260. package/dist/css/transfer.css +644 -0
  261. package/dist/css/tree-select.css +878 -0
  262. package/dist/css/tree.css +734 -0
  263. package/dist/css/truncate.css +108 -0
  264. package/dist/css/typography.css +475 -0
  265. package/dist/css/undefined.css +58 -0
  266. package/dist/css/virtualizer.css +166 -0
  267. package/dist/css/visually-hidden.css +20 -0
  268. package/dist/css/watermark.css +82 -0
  269. package/dist/family/action-control.css +493 -0
  270. package/dist/family/chart.css +537 -0
  271. package/dist/family/check-mark.css +94 -0
  272. package/dist/family/choice-card.css +97 -0
  273. package/dist/family/collection-item.css +768 -0
  274. package/dist/family/field-chrome.css +296 -0
  275. package/dist/family/loading-ring.css +102 -0
  276. package/dist/family/material.css +72 -0
  277. package/dist/family/menu-choice.css +56 -0
  278. package/dist/family/motion.css +363 -0
  279. package/dist/family/swatch.css +59 -0
  280. package/dist/family/tag-list.css +65 -0
  281. package/family/action-control.css +33 -36
  282. package/family/chart.css +57 -0
  283. package/family/collection-item.css +12 -8
  284. package/family/field-chrome.css +28 -19
  285. package/family/loading-ring.css +20 -13
  286. package/family/swatch.css +4 -4
  287. package/family/tag-list.css +6 -0
  288. package/index.css +10349 -8756
  289. package/index.unlayered.css +10350 -8758
  290. package/package.json +165 -164
@@ -0,0 +1,1201 @@
1
+ /*
2
+ * Copyright (c) 2021-Present XiHanFun and contributors.
3
+ * Licensed under the MIT License. See LICENSE in the project root for license information.
4
+ */
5
+
6
+ /* 定义 grid 样式。 */
7
+
8
+ @layer xihan.components {
9
+ /* 皮肤在场的标记:开发模式下按 scope 探一次,取不到就说明这份皮肤没被引入。 */
10
+ .xh-scope-grid {
11
+ --xh-grid-skin: 1;
12
+ }
13
+
14
+ .xh-scope-grid[data-part='root'] {
15
+ display: grid;
16
+ /* 各列等宽;下限写 0 而不是 auto,一段长文本才不会把自己那列撑宽 */
17
+ /* 使用者槽位排在档位之前,写死一份轨道表即盖过所有列数档 */
18
+ grid-template-columns: var(--xh-grid-columns, repeat(var(--xh-_grid-cols), minmax(0, 1fr)));
19
+ /* 不写 gap 档位就不留间距 */
20
+ gap: var(--xh-grid-gap, var(--xh-space-0));
21
+ /* 列数、行数与自适应列宽下限都收在根上这几个槽位里,换档只改这里;
22
+ 每一层都声明一遍,嵌套时内层不吃外层的值 */
23
+ --xh-_grid-cols: 1;
24
+ --xh-_grid-rows: 1;
25
+ --xh-_grid-col-min: var(--xh-layout-col-min-md);
26
+ }
27
+
28
+ /* —— 列数 —— */
29
+ /* 一列是上面的缺省,这里从两列起逐档写 */
30
+ .xh-scope-grid[data-part='root'][data-cols='2'] {
31
+ --xh-_grid-cols: 2;
32
+ }
33
+
34
+ .xh-scope-grid[data-part='root'][data-cols='3'] {
35
+ --xh-_grid-cols: 3;
36
+ }
37
+
38
+ .xh-scope-grid[data-part='root'][data-cols='4'] {
39
+ --xh-_grid-cols: 4;
40
+ }
41
+
42
+ .xh-scope-grid[data-part='root'][data-cols='5'] {
43
+ --xh-_grid-cols: 5;
44
+ }
45
+
46
+ .xh-scope-grid[data-part='root'][data-cols='6'] {
47
+ --xh-_grid-cols: 6;
48
+ }
49
+
50
+ .xh-scope-grid[data-part='root'][data-cols='7'] {
51
+ --xh-_grid-cols: 7;
52
+ }
53
+
54
+ .xh-scope-grid[data-part='root'][data-cols='8'] {
55
+ --xh-_grid-cols: 8;
56
+ }
57
+
58
+ .xh-scope-grid[data-part='root'][data-cols='9'] {
59
+ --xh-_grid-cols: 9;
60
+ }
61
+
62
+ .xh-scope-grid[data-part='root'][data-cols='10'] {
63
+ --xh-_grid-cols: 10;
64
+ }
65
+
66
+ .xh-scope-grid[data-part='root'][data-cols='11'] {
67
+ --xh-_grid-cols: 11;
68
+ }
69
+
70
+ .xh-scope-grid[data-part='root'][data-cols='12'] {
71
+ --xh-_grid-cols: 12;
72
+ }
73
+
74
+ /* —— 逐档列数 —— */
75
+ /* 移动优先:先按 data-cols 排定,视口每宽到一档就换成那一档的列数,没写的档沿用比它窄的那一档。
76
+ 四档自窄到宽依次写,只用 min-width:媒体查询不改选择器权重,宽视口上同时命中好几档时由源码序决定谁生效。
77
+ 宽度写字面量:自定义属性在 @media 条件里不参与求值,令牌变量写在这里等于没写条件。
78
+ 每档都从一列写起:base 分多列、某一档收回一列同样是合法的一档。 */
79
+ @media (min-width: 640px) {
80
+ .xh-scope-grid[data-part='root'][data-cols-sm='1'] {
81
+ --xh-_grid-cols: 1;
82
+ }
83
+
84
+ .xh-scope-grid[data-part='root'][data-cols-sm='2'] {
85
+ --xh-_grid-cols: 2;
86
+ }
87
+
88
+ .xh-scope-grid[data-part='root'][data-cols-sm='3'] {
89
+ --xh-_grid-cols: 3;
90
+ }
91
+
92
+ .xh-scope-grid[data-part='root'][data-cols-sm='4'] {
93
+ --xh-_grid-cols: 4;
94
+ }
95
+
96
+ .xh-scope-grid[data-part='root'][data-cols-sm='5'] {
97
+ --xh-_grid-cols: 5;
98
+ }
99
+
100
+ .xh-scope-grid[data-part='root'][data-cols-sm='6'] {
101
+ --xh-_grid-cols: 6;
102
+ }
103
+
104
+ .xh-scope-grid[data-part='root'][data-cols-sm='7'] {
105
+ --xh-_grid-cols: 7;
106
+ }
107
+
108
+ .xh-scope-grid[data-part='root'][data-cols-sm='8'] {
109
+ --xh-_grid-cols: 8;
110
+ }
111
+
112
+ .xh-scope-grid[data-part='root'][data-cols-sm='9'] {
113
+ --xh-_grid-cols: 9;
114
+ }
115
+
116
+ .xh-scope-grid[data-part='root'][data-cols-sm='10'] {
117
+ --xh-_grid-cols: 10;
118
+ }
119
+
120
+ .xh-scope-grid[data-part='root'][data-cols-sm='11'] {
121
+ --xh-_grid-cols: 11;
122
+ }
123
+
124
+ .xh-scope-grid[data-part='root'][data-cols-sm='12'] {
125
+ --xh-_grid-cols: 12;
126
+ }
127
+ }
128
+
129
+ @media (min-width: 768px) {
130
+ .xh-scope-grid[data-part='root'][data-cols-md='1'] {
131
+ --xh-_grid-cols: 1;
132
+ }
133
+
134
+ .xh-scope-grid[data-part='root'][data-cols-md='2'] {
135
+ --xh-_grid-cols: 2;
136
+ }
137
+
138
+ .xh-scope-grid[data-part='root'][data-cols-md='3'] {
139
+ --xh-_grid-cols: 3;
140
+ }
141
+
142
+ .xh-scope-grid[data-part='root'][data-cols-md='4'] {
143
+ --xh-_grid-cols: 4;
144
+ }
145
+
146
+ .xh-scope-grid[data-part='root'][data-cols-md='5'] {
147
+ --xh-_grid-cols: 5;
148
+ }
149
+
150
+ .xh-scope-grid[data-part='root'][data-cols-md='6'] {
151
+ --xh-_grid-cols: 6;
152
+ }
153
+
154
+ .xh-scope-grid[data-part='root'][data-cols-md='7'] {
155
+ --xh-_grid-cols: 7;
156
+ }
157
+
158
+ .xh-scope-grid[data-part='root'][data-cols-md='8'] {
159
+ --xh-_grid-cols: 8;
160
+ }
161
+
162
+ .xh-scope-grid[data-part='root'][data-cols-md='9'] {
163
+ --xh-_grid-cols: 9;
164
+ }
165
+
166
+ .xh-scope-grid[data-part='root'][data-cols-md='10'] {
167
+ --xh-_grid-cols: 10;
168
+ }
169
+
170
+ .xh-scope-grid[data-part='root'][data-cols-md='11'] {
171
+ --xh-_grid-cols: 11;
172
+ }
173
+
174
+ .xh-scope-grid[data-part='root'][data-cols-md='12'] {
175
+ --xh-_grid-cols: 12;
176
+ }
177
+ }
178
+
179
+ @media (min-width: 1024px) {
180
+ .xh-scope-grid[data-part='root'][data-cols-lg='1'] {
181
+ --xh-_grid-cols: 1;
182
+ }
183
+
184
+ .xh-scope-grid[data-part='root'][data-cols-lg='2'] {
185
+ --xh-_grid-cols: 2;
186
+ }
187
+
188
+ .xh-scope-grid[data-part='root'][data-cols-lg='3'] {
189
+ --xh-_grid-cols: 3;
190
+ }
191
+
192
+ .xh-scope-grid[data-part='root'][data-cols-lg='4'] {
193
+ --xh-_grid-cols: 4;
194
+ }
195
+
196
+ .xh-scope-grid[data-part='root'][data-cols-lg='5'] {
197
+ --xh-_grid-cols: 5;
198
+ }
199
+
200
+ .xh-scope-grid[data-part='root'][data-cols-lg='6'] {
201
+ --xh-_grid-cols: 6;
202
+ }
203
+
204
+ .xh-scope-grid[data-part='root'][data-cols-lg='7'] {
205
+ --xh-_grid-cols: 7;
206
+ }
207
+
208
+ .xh-scope-grid[data-part='root'][data-cols-lg='8'] {
209
+ --xh-_grid-cols: 8;
210
+ }
211
+
212
+ .xh-scope-grid[data-part='root'][data-cols-lg='9'] {
213
+ --xh-_grid-cols: 9;
214
+ }
215
+
216
+ .xh-scope-grid[data-part='root'][data-cols-lg='10'] {
217
+ --xh-_grid-cols: 10;
218
+ }
219
+
220
+ .xh-scope-grid[data-part='root'][data-cols-lg='11'] {
221
+ --xh-_grid-cols: 11;
222
+ }
223
+
224
+ .xh-scope-grid[data-part='root'][data-cols-lg='12'] {
225
+ --xh-_grid-cols: 12;
226
+ }
227
+ }
228
+
229
+ @media (min-width: 1280px) {
230
+ .xh-scope-grid[data-part='root'][data-cols-xl='1'] {
231
+ --xh-_grid-cols: 1;
232
+ }
233
+
234
+ .xh-scope-grid[data-part='root'][data-cols-xl='2'] {
235
+ --xh-_grid-cols: 2;
236
+ }
237
+
238
+ .xh-scope-grid[data-part='root'][data-cols-xl='3'] {
239
+ --xh-_grid-cols: 3;
240
+ }
241
+
242
+ .xh-scope-grid[data-part='root'][data-cols-xl='4'] {
243
+ --xh-_grid-cols: 4;
244
+ }
245
+
246
+ .xh-scope-grid[data-part='root'][data-cols-xl='5'] {
247
+ --xh-_grid-cols: 5;
248
+ }
249
+
250
+ .xh-scope-grid[data-part='root'][data-cols-xl='6'] {
251
+ --xh-_grid-cols: 6;
252
+ }
253
+
254
+ .xh-scope-grid[data-part='root'][data-cols-xl='7'] {
255
+ --xh-_grid-cols: 7;
256
+ }
257
+
258
+ .xh-scope-grid[data-part='root'][data-cols-xl='8'] {
259
+ --xh-_grid-cols: 8;
260
+ }
261
+
262
+ .xh-scope-grid[data-part='root'][data-cols-xl='9'] {
263
+ --xh-_grid-cols: 9;
264
+ }
265
+
266
+ .xh-scope-grid[data-part='root'][data-cols-xl='10'] {
267
+ --xh-_grid-cols: 10;
268
+ }
269
+
270
+ .xh-scope-grid[data-part='root'][data-cols-xl='11'] {
271
+ --xh-_grid-cols: 11;
272
+ }
273
+
274
+ .xh-scope-grid[data-part='root'][data-cols-xl='12'] {
275
+ --xh-_grid-cols: 12;
276
+ }
277
+ }
278
+
279
+ /* —— 行数 —— */
280
+ /* 不写 data-rows 就不声明行轨道:行数由内容自己撑出来,这是缺省。
281
+ 写了就把这几行排成显式轨道,超出的项落进隐式行。
282
+ 使用者槽位排在档位之前,写死一份轨道表即盖过所有行数档 */
283
+ .xh-scope-grid[data-part='root'][data-rows] {
284
+ grid-template-rows: var(--xh-grid-rows, repeat(var(--xh-_grid-rows), minmax(0, auto)));
285
+ }
286
+
287
+ .xh-scope-grid[data-part='root'][data-rows='2'] {
288
+ --xh-_grid-rows: 2;
289
+ }
290
+
291
+ .xh-scope-grid[data-part='root'][data-rows='3'] {
292
+ --xh-_grid-rows: 3;
293
+ }
294
+
295
+ .xh-scope-grid[data-part='root'][data-rows='4'] {
296
+ --xh-_grid-rows: 4;
297
+ }
298
+
299
+ .xh-scope-grid[data-part='root'][data-rows='5'] {
300
+ --xh-_grid-rows: 5;
301
+ }
302
+
303
+ .xh-scope-grid[data-part='root'][data-rows='6'] {
304
+ --xh-_grid-rows: 6;
305
+ }
306
+
307
+ .xh-scope-grid[data-part='root'][data-rows='7'] {
308
+ --xh-_grid-rows: 7;
309
+ }
310
+
311
+ .xh-scope-grid[data-part='root'][data-rows='8'] {
312
+ --xh-_grid-rows: 8;
313
+ }
314
+
315
+ .xh-scope-grid[data-part='root'][data-rows='9'] {
316
+ --xh-_grid-rows: 9;
317
+ }
318
+
319
+ .xh-scope-grid[data-part='root'][data-rows='10'] {
320
+ --xh-_grid-rows: 10;
321
+ }
322
+
323
+ .xh-scope-grid[data-part='root'][data-rows='11'] {
324
+ --xh-_grid-rows: 11;
325
+ }
326
+
327
+ .xh-scope-grid[data-part='root'][data-rows='12'] {
328
+ --xh-_grid-rows: 12;
329
+ }
330
+
331
+ /* —— 自适应列宽 —— */
332
+ /* 写了下限就按「放得下几列就几列」排,data-cols 那条轨道表让位;
333
+ 下限只收档位名,四档各指一个令牌 */
334
+ .xh-scope-grid[data-part='root'][data-min-col] {
335
+ grid-template-columns: var(--xh-grid-columns, repeat(auto-fill, minmax(var(--xh-_grid-col-min), 1fr)));
336
+ }
337
+
338
+ .xh-scope-grid[data-part='root'][data-min-col='xs'] {
339
+ --xh-_grid-col-min: var(--xh-layout-col-min-xs);
340
+ }
341
+
342
+ .xh-scope-grid[data-part='root'][data-min-col='sm'] {
343
+ --xh-_grid-col-min: var(--xh-layout-col-min-sm);
344
+ }
345
+
346
+ .xh-scope-grid[data-part='root'][data-min-col='md'] {
347
+ --xh-_grid-col-min: var(--xh-layout-col-min-md);
348
+ }
349
+
350
+ .xh-scope-grid[data-part='root'][data-min-col='lg'] {
351
+ --xh-_grid-col-min: var(--xh-layout-col-min-lg);
352
+ }
353
+
354
+ /* —— 间距档位 —— */
355
+ /* 每一档指向一个间距令牌,行与行之间也吃这同一份间距 */
356
+ .xh-scope-grid[data-part='root'][data-gap='xs'] {
357
+ gap: var(--xh-grid-gap, var(--xh-layout-gap-xs));
358
+ }
359
+
360
+ .xh-scope-grid[data-part='root'][data-gap='sm'] {
361
+ gap: var(--xh-grid-gap, var(--xh-layout-gap-sm));
362
+ }
363
+
364
+ .xh-scope-grid[data-part='root'][data-gap='md'] {
365
+ gap: var(--xh-grid-gap, var(--xh-layout-gap-md));
366
+ }
367
+
368
+ .xh-scope-grid[data-part='root'][data-gap='lg'] {
369
+ gap: var(--xh-grid-gap, var(--xh-layout-gap-lg));
370
+ }
371
+
372
+ .xh-scope-grid[data-part='root'][data-gap='xl'] {
373
+ gap: var(--xh-grid-gap, var(--xh-layout-gap-xl));
374
+ }
375
+
376
+ /* —— 行间距与列间距 —— */
377
+ /* 只改一条轴上的间距,另一条仍跟着 gap 走。两组规则与 gap 档位同权重,
378
+ 靠源码序排在它之后取胜;根规则那条 gap 权重更低,恒盖得住 */
379
+
380
+ .xh-scope-grid[data-part='root'][data-row-gap='xs'] {
381
+ row-gap: var(--xh-grid-row-gap, var(--xh-layout-gap-xs));
382
+ }
383
+
384
+ .xh-scope-grid[data-part='root'][data-row-gap='sm'] {
385
+ row-gap: var(--xh-grid-row-gap, var(--xh-layout-gap-sm));
386
+ }
387
+
388
+ .xh-scope-grid[data-part='root'][data-row-gap='md'] {
389
+ row-gap: var(--xh-grid-row-gap, var(--xh-layout-gap-md));
390
+ }
391
+
392
+ .xh-scope-grid[data-part='root'][data-row-gap='lg'] {
393
+ row-gap: var(--xh-grid-row-gap, var(--xh-layout-gap-lg));
394
+ }
395
+
396
+ .xh-scope-grid[data-part='root'][data-row-gap='xl'] {
397
+ row-gap: var(--xh-grid-row-gap, var(--xh-layout-gap-xl));
398
+ }
399
+
400
+ .xh-scope-grid[data-part='root'][data-column-gap='xs'] {
401
+ column-gap: var(--xh-grid-column-gap, var(--xh-layout-gap-xs));
402
+ }
403
+
404
+ .xh-scope-grid[data-part='root'][data-column-gap='sm'] {
405
+ column-gap: var(--xh-grid-column-gap, var(--xh-layout-gap-sm));
406
+ }
407
+
408
+ .xh-scope-grid[data-part='root'][data-column-gap='md'] {
409
+ column-gap: var(--xh-grid-column-gap, var(--xh-layout-gap-md));
410
+ }
411
+
412
+ .xh-scope-grid[data-part='root'][data-column-gap='lg'] {
413
+ column-gap: var(--xh-grid-column-gap, var(--xh-layout-gap-lg));
414
+ }
415
+
416
+ .xh-scope-grid[data-part='root'][data-column-gap='xl'] {
417
+ column-gap: var(--xh-grid-column-gap, var(--xh-layout-gap-xl));
418
+ }
419
+
420
+ /* —— 块向对齐 —— */
421
+ /* 管的是每一项在自己那格里怎么摆,不是格子在容器里怎么摆:列宽由轨道表定死,容器不留富余 */
422
+ .xh-scope-grid[data-part='root'][data-align='start'] {
423
+ align-items: start;
424
+ }
425
+
426
+ .xh-scope-grid[data-part='root'][data-align='center'] {
427
+ align-items: center;
428
+ }
429
+
430
+ .xh-scope-grid[data-part='root'][data-align='end'] {
431
+ align-items: end;
432
+ }
433
+
434
+ .xh-scope-grid[data-part='root'][data-align='stretch'] {
435
+ align-items: stretch;
436
+ }
437
+
438
+ .xh-scope-grid[data-part='root'][data-align='baseline'] {
439
+ align-items: baseline;
440
+ }
441
+
442
+ /* —— 行内对齐 —— */
443
+ .xh-scope-grid[data-part='root'][data-justify-items='start'] {
444
+ justify-items: start;
445
+ }
446
+
447
+ .xh-scope-grid[data-part='root'][data-justify-items='center'] {
448
+ justify-items: center;
449
+ }
450
+
451
+ .xh-scope-grid[data-part='root'][data-justify-items='end'] {
452
+ justify-items: end;
453
+ }
454
+
455
+ .xh-scope-grid[data-part='root'][data-justify-items='stretch'] {
456
+ justify-items: stretch;
457
+ }
458
+
459
+ /* —— 格子 —— */
460
+ .xh-scope-grid[data-part='item'] {
461
+ grid-column-start: var(--xh-_grid-start);
462
+ grid-column-end: span var(--xh-_grid-span);
463
+ grid-row-end: span var(--xh-_grid-row-span);
464
+
465
+ /* 三个槽位在每一格上都声明一遍,嵌套时内层的格子不吃外层那一格的值 */
466
+ --xh-_grid-span: 1;
467
+ --xh-_grid-start: auto;
468
+ --xh-_grid-row-span: 1;
469
+ }
470
+
471
+ /* —— 跨列 —— */
472
+ /* 占一列是上面的缺省,这里从跨两列起逐档写 */
473
+ .xh-scope-grid[data-part='item'][data-span='2'] {
474
+ --xh-_grid-span: 2;
475
+ }
476
+
477
+ .xh-scope-grid[data-part='item'][data-span='3'] {
478
+ --xh-_grid-span: 3;
479
+ }
480
+
481
+ .xh-scope-grid[data-part='item'][data-span='4'] {
482
+ --xh-_grid-span: 4;
483
+ }
484
+
485
+ .xh-scope-grid[data-part='item'][data-span='5'] {
486
+ --xh-_grid-span: 5;
487
+ }
488
+
489
+ .xh-scope-grid[data-part='item'][data-span='6'] {
490
+ --xh-_grid-span: 6;
491
+ }
492
+
493
+ .xh-scope-grid[data-part='item'][data-span='7'] {
494
+ --xh-_grid-span: 7;
495
+ }
496
+
497
+ .xh-scope-grid[data-part='item'][data-span='8'] {
498
+ --xh-_grid-span: 8;
499
+ }
500
+
501
+ .xh-scope-grid[data-part='item'][data-span='9'] {
502
+ --xh-_grid-span: 9;
503
+ }
504
+
505
+ .xh-scope-grid[data-part='item'][data-span='10'] {
506
+ --xh-_grid-span: 10;
507
+ }
508
+
509
+ .xh-scope-grid[data-part='item'][data-span='11'] {
510
+ --xh-_grid-span: 11;
511
+ }
512
+
513
+ .xh-scope-grid[data-part='item'][data-span='12'] {
514
+ --xh-_grid-span: 12;
515
+ }
516
+
517
+ /* —— 错列 —— */
518
+ /* 错 N 列 = 改从第 N+1 条列线起排,前面那 N 列空着。
519
+ 列线跟着书写方向走,RTL 下自动从另一头数。
520
+ 错的是列线不是「相对上一格再往后几格」:同一行里前面已经排到更后面时,这一格落到下一行的那条列线上。 */
521
+ .xh-scope-grid[data-part='item'][data-offset='1'] {
522
+ --xh-_grid-start: 2;
523
+ }
524
+
525
+ .xh-scope-grid[data-part='item'][data-offset='2'] {
526
+ --xh-_grid-start: 3;
527
+ }
528
+
529
+ .xh-scope-grid[data-part='item'][data-offset='3'] {
530
+ --xh-_grid-start: 4;
531
+ }
532
+
533
+ .xh-scope-grid[data-part='item'][data-offset='4'] {
534
+ --xh-_grid-start: 5;
535
+ }
536
+
537
+ .xh-scope-grid[data-part='item'][data-offset='5'] {
538
+ --xh-_grid-start: 6;
539
+ }
540
+
541
+ .xh-scope-grid[data-part='item'][data-offset='6'] {
542
+ --xh-_grid-start: 7;
543
+ }
544
+
545
+ .xh-scope-grid[data-part='item'][data-offset='7'] {
546
+ --xh-_grid-start: 8;
547
+ }
548
+
549
+ .xh-scope-grid[data-part='item'][data-offset='8'] {
550
+ --xh-_grid-start: 9;
551
+ }
552
+
553
+ .xh-scope-grid[data-part='item'][data-offset='9'] {
554
+ --xh-_grid-start: 10;
555
+ }
556
+
557
+ .xh-scope-grid[data-part='item'][data-offset='10'] {
558
+ --xh-_grid-start: 11;
559
+ }
560
+
561
+ .xh-scope-grid[data-part='item'][data-offset='11'] {
562
+ --xh-_grid-start: 12;
563
+ }
564
+
565
+ /* —— 逐档跨列与错列 —— */
566
+ /* 与逐档列数逐字同构:移动优先,先按 data-span / data-offset 排定,
567
+ 视口每宽到一档就换成那一档的值,没写的档沿用比它窄的那一档。
568
+ 每档都从 1 写起:base 跨多列、某一档收回一列同样是合法的一档。
569
+ 宽度写字面量,理由同上面的逐档列数 */
570
+
571
+ @media (min-width: 640px) {
572
+ .xh-scope-grid[data-part='item'][data-span-sm='1'] {
573
+ --xh-_grid-span: 1;
574
+ }
575
+
576
+ .xh-scope-grid[data-part='item'][data-span-sm='2'] {
577
+ --xh-_grid-span: 2;
578
+ }
579
+
580
+ .xh-scope-grid[data-part='item'][data-span-sm='3'] {
581
+ --xh-_grid-span: 3;
582
+ }
583
+
584
+ .xh-scope-grid[data-part='item'][data-span-sm='4'] {
585
+ --xh-_grid-span: 4;
586
+ }
587
+
588
+ .xh-scope-grid[data-part='item'][data-span-sm='5'] {
589
+ --xh-_grid-span: 5;
590
+ }
591
+
592
+ .xh-scope-grid[data-part='item'][data-span-sm='6'] {
593
+ --xh-_grid-span: 6;
594
+ }
595
+
596
+ .xh-scope-grid[data-part='item'][data-span-sm='7'] {
597
+ --xh-_grid-span: 7;
598
+ }
599
+
600
+ .xh-scope-grid[data-part='item'][data-span-sm='8'] {
601
+ --xh-_grid-span: 8;
602
+ }
603
+
604
+ .xh-scope-grid[data-part='item'][data-span-sm='9'] {
605
+ --xh-_grid-span: 9;
606
+ }
607
+
608
+ .xh-scope-grid[data-part='item'][data-span-sm='10'] {
609
+ --xh-_grid-span: 10;
610
+ }
611
+
612
+ .xh-scope-grid[data-part='item'][data-span-sm='11'] {
613
+ --xh-_grid-span: 11;
614
+ }
615
+
616
+ .xh-scope-grid[data-part='item'][data-span-sm='12'] {
617
+ --xh-_grid-span: 12;
618
+ }
619
+
620
+ .xh-scope-grid[data-part='item'][data-offset-sm='1'] {
621
+ --xh-_grid-start: 2;
622
+ }
623
+
624
+ .xh-scope-grid[data-part='item'][data-offset-sm='2'] {
625
+ --xh-_grid-start: 3;
626
+ }
627
+
628
+ .xh-scope-grid[data-part='item'][data-offset-sm='3'] {
629
+ --xh-_grid-start: 4;
630
+ }
631
+
632
+ .xh-scope-grid[data-part='item'][data-offset-sm='4'] {
633
+ --xh-_grid-start: 5;
634
+ }
635
+
636
+ .xh-scope-grid[data-part='item'][data-offset-sm='5'] {
637
+ --xh-_grid-start: 6;
638
+ }
639
+
640
+ .xh-scope-grid[data-part='item'][data-offset-sm='6'] {
641
+ --xh-_grid-start: 7;
642
+ }
643
+
644
+ .xh-scope-grid[data-part='item'][data-offset-sm='7'] {
645
+ --xh-_grid-start: 8;
646
+ }
647
+
648
+ .xh-scope-grid[data-part='item'][data-offset-sm='8'] {
649
+ --xh-_grid-start: 9;
650
+ }
651
+
652
+ .xh-scope-grid[data-part='item'][data-offset-sm='9'] {
653
+ --xh-_grid-start: 10;
654
+ }
655
+
656
+ .xh-scope-grid[data-part='item'][data-offset-sm='10'] {
657
+ --xh-_grid-start: 11;
658
+ }
659
+
660
+ .xh-scope-grid[data-part='item'][data-offset-sm='11'] {
661
+ --xh-_grid-start: 12;
662
+ }
663
+ }
664
+
665
+ @media (min-width: 768px) {
666
+ .xh-scope-grid[data-part='item'][data-span-md='1'] {
667
+ --xh-_grid-span: 1;
668
+ }
669
+
670
+ .xh-scope-grid[data-part='item'][data-span-md='2'] {
671
+ --xh-_grid-span: 2;
672
+ }
673
+
674
+ .xh-scope-grid[data-part='item'][data-span-md='3'] {
675
+ --xh-_grid-span: 3;
676
+ }
677
+
678
+ .xh-scope-grid[data-part='item'][data-span-md='4'] {
679
+ --xh-_grid-span: 4;
680
+ }
681
+
682
+ .xh-scope-grid[data-part='item'][data-span-md='5'] {
683
+ --xh-_grid-span: 5;
684
+ }
685
+
686
+ .xh-scope-grid[data-part='item'][data-span-md='6'] {
687
+ --xh-_grid-span: 6;
688
+ }
689
+
690
+ .xh-scope-grid[data-part='item'][data-span-md='7'] {
691
+ --xh-_grid-span: 7;
692
+ }
693
+
694
+ .xh-scope-grid[data-part='item'][data-span-md='8'] {
695
+ --xh-_grid-span: 8;
696
+ }
697
+
698
+ .xh-scope-grid[data-part='item'][data-span-md='9'] {
699
+ --xh-_grid-span: 9;
700
+ }
701
+
702
+ .xh-scope-grid[data-part='item'][data-span-md='10'] {
703
+ --xh-_grid-span: 10;
704
+ }
705
+
706
+ .xh-scope-grid[data-part='item'][data-span-md='11'] {
707
+ --xh-_grid-span: 11;
708
+ }
709
+
710
+ .xh-scope-grid[data-part='item'][data-span-md='12'] {
711
+ --xh-_grid-span: 12;
712
+ }
713
+
714
+ .xh-scope-grid[data-part='item'][data-offset-md='1'] {
715
+ --xh-_grid-start: 2;
716
+ }
717
+
718
+ .xh-scope-grid[data-part='item'][data-offset-md='2'] {
719
+ --xh-_grid-start: 3;
720
+ }
721
+
722
+ .xh-scope-grid[data-part='item'][data-offset-md='3'] {
723
+ --xh-_grid-start: 4;
724
+ }
725
+
726
+ .xh-scope-grid[data-part='item'][data-offset-md='4'] {
727
+ --xh-_grid-start: 5;
728
+ }
729
+
730
+ .xh-scope-grid[data-part='item'][data-offset-md='5'] {
731
+ --xh-_grid-start: 6;
732
+ }
733
+
734
+ .xh-scope-grid[data-part='item'][data-offset-md='6'] {
735
+ --xh-_grid-start: 7;
736
+ }
737
+
738
+ .xh-scope-grid[data-part='item'][data-offset-md='7'] {
739
+ --xh-_grid-start: 8;
740
+ }
741
+
742
+ .xh-scope-grid[data-part='item'][data-offset-md='8'] {
743
+ --xh-_grid-start: 9;
744
+ }
745
+
746
+ .xh-scope-grid[data-part='item'][data-offset-md='9'] {
747
+ --xh-_grid-start: 10;
748
+ }
749
+
750
+ .xh-scope-grid[data-part='item'][data-offset-md='10'] {
751
+ --xh-_grid-start: 11;
752
+ }
753
+
754
+ .xh-scope-grid[data-part='item'][data-offset-md='11'] {
755
+ --xh-_grid-start: 12;
756
+ }
757
+ }
758
+
759
+ @media (min-width: 1024px) {
760
+ .xh-scope-grid[data-part='item'][data-span-lg='1'] {
761
+ --xh-_grid-span: 1;
762
+ }
763
+
764
+ .xh-scope-grid[data-part='item'][data-span-lg='2'] {
765
+ --xh-_grid-span: 2;
766
+ }
767
+
768
+ .xh-scope-grid[data-part='item'][data-span-lg='3'] {
769
+ --xh-_grid-span: 3;
770
+ }
771
+
772
+ .xh-scope-grid[data-part='item'][data-span-lg='4'] {
773
+ --xh-_grid-span: 4;
774
+ }
775
+
776
+ .xh-scope-grid[data-part='item'][data-span-lg='5'] {
777
+ --xh-_grid-span: 5;
778
+ }
779
+
780
+ .xh-scope-grid[data-part='item'][data-span-lg='6'] {
781
+ --xh-_grid-span: 6;
782
+ }
783
+
784
+ .xh-scope-grid[data-part='item'][data-span-lg='7'] {
785
+ --xh-_grid-span: 7;
786
+ }
787
+
788
+ .xh-scope-grid[data-part='item'][data-span-lg='8'] {
789
+ --xh-_grid-span: 8;
790
+ }
791
+
792
+ .xh-scope-grid[data-part='item'][data-span-lg='9'] {
793
+ --xh-_grid-span: 9;
794
+ }
795
+
796
+ .xh-scope-grid[data-part='item'][data-span-lg='10'] {
797
+ --xh-_grid-span: 10;
798
+ }
799
+
800
+ .xh-scope-grid[data-part='item'][data-span-lg='11'] {
801
+ --xh-_grid-span: 11;
802
+ }
803
+
804
+ .xh-scope-grid[data-part='item'][data-span-lg='12'] {
805
+ --xh-_grid-span: 12;
806
+ }
807
+
808
+ .xh-scope-grid[data-part='item'][data-offset-lg='1'] {
809
+ --xh-_grid-start: 2;
810
+ }
811
+
812
+ .xh-scope-grid[data-part='item'][data-offset-lg='2'] {
813
+ --xh-_grid-start: 3;
814
+ }
815
+
816
+ .xh-scope-grid[data-part='item'][data-offset-lg='3'] {
817
+ --xh-_grid-start: 4;
818
+ }
819
+
820
+ .xh-scope-grid[data-part='item'][data-offset-lg='4'] {
821
+ --xh-_grid-start: 5;
822
+ }
823
+
824
+ .xh-scope-grid[data-part='item'][data-offset-lg='5'] {
825
+ --xh-_grid-start: 6;
826
+ }
827
+
828
+ .xh-scope-grid[data-part='item'][data-offset-lg='6'] {
829
+ --xh-_grid-start: 7;
830
+ }
831
+
832
+ .xh-scope-grid[data-part='item'][data-offset-lg='7'] {
833
+ --xh-_grid-start: 8;
834
+ }
835
+
836
+ .xh-scope-grid[data-part='item'][data-offset-lg='8'] {
837
+ --xh-_grid-start: 9;
838
+ }
839
+
840
+ .xh-scope-grid[data-part='item'][data-offset-lg='9'] {
841
+ --xh-_grid-start: 10;
842
+ }
843
+
844
+ .xh-scope-grid[data-part='item'][data-offset-lg='10'] {
845
+ --xh-_grid-start: 11;
846
+ }
847
+
848
+ .xh-scope-grid[data-part='item'][data-offset-lg='11'] {
849
+ --xh-_grid-start: 12;
850
+ }
851
+ }
852
+
853
+ @media (min-width: 1280px) {
854
+ .xh-scope-grid[data-part='item'][data-span-xl='1'] {
855
+ --xh-_grid-span: 1;
856
+ }
857
+
858
+ .xh-scope-grid[data-part='item'][data-span-xl='2'] {
859
+ --xh-_grid-span: 2;
860
+ }
861
+
862
+ .xh-scope-grid[data-part='item'][data-span-xl='3'] {
863
+ --xh-_grid-span: 3;
864
+ }
865
+
866
+ .xh-scope-grid[data-part='item'][data-span-xl='4'] {
867
+ --xh-_grid-span: 4;
868
+ }
869
+
870
+ .xh-scope-grid[data-part='item'][data-span-xl='5'] {
871
+ --xh-_grid-span: 5;
872
+ }
873
+
874
+ .xh-scope-grid[data-part='item'][data-span-xl='6'] {
875
+ --xh-_grid-span: 6;
876
+ }
877
+
878
+ .xh-scope-grid[data-part='item'][data-span-xl='7'] {
879
+ --xh-_grid-span: 7;
880
+ }
881
+
882
+ .xh-scope-grid[data-part='item'][data-span-xl='8'] {
883
+ --xh-_grid-span: 8;
884
+ }
885
+
886
+ .xh-scope-grid[data-part='item'][data-span-xl='9'] {
887
+ --xh-_grid-span: 9;
888
+ }
889
+
890
+ .xh-scope-grid[data-part='item'][data-span-xl='10'] {
891
+ --xh-_grid-span: 10;
892
+ }
893
+
894
+ .xh-scope-grid[data-part='item'][data-span-xl='11'] {
895
+ --xh-_grid-span: 11;
896
+ }
897
+
898
+ .xh-scope-grid[data-part='item'][data-span-xl='12'] {
899
+ --xh-_grid-span: 12;
900
+ }
901
+
902
+ .xh-scope-grid[data-part='item'][data-offset-xl='1'] {
903
+ --xh-_grid-start: 2;
904
+ }
905
+
906
+ .xh-scope-grid[data-part='item'][data-offset-xl='2'] {
907
+ --xh-_grid-start: 3;
908
+ }
909
+
910
+ .xh-scope-grid[data-part='item'][data-offset-xl='3'] {
911
+ --xh-_grid-start: 4;
912
+ }
913
+
914
+ .xh-scope-grid[data-part='item'][data-offset-xl='4'] {
915
+ --xh-_grid-start: 5;
916
+ }
917
+
918
+ .xh-scope-grid[data-part='item'][data-offset-xl='5'] {
919
+ --xh-_grid-start: 6;
920
+ }
921
+
922
+ .xh-scope-grid[data-part='item'][data-offset-xl='6'] {
923
+ --xh-_grid-start: 7;
924
+ }
925
+
926
+ .xh-scope-grid[data-part='item'][data-offset-xl='7'] {
927
+ --xh-_grid-start: 8;
928
+ }
929
+
930
+ .xh-scope-grid[data-part='item'][data-offset-xl='8'] {
931
+ --xh-_grid-start: 9;
932
+ }
933
+
934
+ .xh-scope-grid[data-part='item'][data-offset-xl='9'] {
935
+ --xh-_grid-start: 10;
936
+ }
937
+
938
+ .xh-scope-grid[data-part='item'][data-offset-xl='10'] {
939
+ --xh-_grid-start: 11;
940
+ }
941
+
942
+ .xh-scope-grid[data-part='item'][data-offset-xl='11'] {
943
+ --xh-_grid-start: 12;
944
+ }
945
+ }
946
+
947
+ /* —— 跨行 —— */
948
+ /* 占一行是格子上的缺省,这里从跨两行起逐值写。行高由内容撑出时跨几行就占几条行轨道,
949
+ 同一行里其余的格子按各自内容排,不被拉成同高 */
950
+ .xh-scope-grid[data-part='item'][data-row-span='2'] {
951
+ --xh-_grid-row-span: 2;
952
+ }
953
+
954
+ .xh-scope-grid[data-part='item'][data-row-span='3'] {
955
+ --xh-_grid-row-span: 3;
956
+ }
957
+
958
+ .xh-scope-grid[data-part='item'][data-row-span='4'] {
959
+ --xh-_grid-row-span: 4;
960
+ }
961
+
962
+ .xh-scope-grid[data-part='item'][data-row-span='5'] {
963
+ --xh-_grid-row-span: 5;
964
+ }
965
+
966
+ .xh-scope-grid[data-part='item'][data-row-span='6'] {
967
+ --xh-_grid-row-span: 6;
968
+ }
969
+
970
+ .xh-scope-grid[data-part='item'][data-row-span='7'] {
971
+ --xh-_grid-row-span: 7;
972
+ }
973
+
974
+ .xh-scope-grid[data-part='item'][data-row-span='8'] {
975
+ --xh-_grid-row-span: 8;
976
+ }
977
+
978
+ .xh-scope-grid[data-part='item'][data-row-span='9'] {
979
+ --xh-_grid-row-span: 9;
980
+ }
981
+
982
+ .xh-scope-grid[data-part='item'][data-row-span='10'] {
983
+ --xh-_grid-row-span: 10;
984
+ }
985
+
986
+ .xh-scope-grid[data-part='item'][data-row-span='11'] {
987
+ --xh-_grid-row-span: 11;
988
+ }
989
+
990
+ .xh-scope-grid[data-part='item'][data-row-span='12'] {
991
+ --xh-_grid-row-span: 12;
992
+ }
993
+
994
+ /* —— 逐档跨行 —— */
995
+ /* 与逐档跨列逐字同构:移动优先,没写的档沿用比它窄的那一档;每档都从 1 写起,某一档收回一行同样合法 */
996
+ @media (min-width: 640px) {
997
+ .xh-scope-grid[data-part='item'][data-row-span-sm='1'] {
998
+ --xh-_grid-row-span: 1;
999
+ }
1000
+
1001
+ .xh-scope-grid[data-part='item'][data-row-span-sm='2'] {
1002
+ --xh-_grid-row-span: 2;
1003
+ }
1004
+
1005
+ .xh-scope-grid[data-part='item'][data-row-span-sm='3'] {
1006
+ --xh-_grid-row-span: 3;
1007
+ }
1008
+
1009
+ .xh-scope-grid[data-part='item'][data-row-span-sm='4'] {
1010
+ --xh-_grid-row-span: 4;
1011
+ }
1012
+
1013
+ .xh-scope-grid[data-part='item'][data-row-span-sm='5'] {
1014
+ --xh-_grid-row-span: 5;
1015
+ }
1016
+
1017
+ .xh-scope-grid[data-part='item'][data-row-span-sm='6'] {
1018
+ --xh-_grid-row-span: 6;
1019
+ }
1020
+
1021
+ .xh-scope-grid[data-part='item'][data-row-span-sm='7'] {
1022
+ --xh-_grid-row-span: 7;
1023
+ }
1024
+
1025
+ .xh-scope-grid[data-part='item'][data-row-span-sm='8'] {
1026
+ --xh-_grid-row-span: 8;
1027
+ }
1028
+
1029
+ .xh-scope-grid[data-part='item'][data-row-span-sm='9'] {
1030
+ --xh-_grid-row-span: 9;
1031
+ }
1032
+
1033
+ .xh-scope-grid[data-part='item'][data-row-span-sm='10'] {
1034
+ --xh-_grid-row-span: 10;
1035
+ }
1036
+
1037
+ .xh-scope-grid[data-part='item'][data-row-span-sm='11'] {
1038
+ --xh-_grid-row-span: 11;
1039
+ }
1040
+
1041
+ .xh-scope-grid[data-part='item'][data-row-span-sm='12'] {
1042
+ --xh-_grid-row-span: 12;
1043
+ }
1044
+ }
1045
+
1046
+ @media (min-width: 768px) {
1047
+ .xh-scope-grid[data-part='item'][data-row-span-md='1'] {
1048
+ --xh-_grid-row-span: 1;
1049
+ }
1050
+
1051
+ .xh-scope-grid[data-part='item'][data-row-span-md='2'] {
1052
+ --xh-_grid-row-span: 2;
1053
+ }
1054
+
1055
+ .xh-scope-grid[data-part='item'][data-row-span-md='3'] {
1056
+ --xh-_grid-row-span: 3;
1057
+ }
1058
+
1059
+ .xh-scope-grid[data-part='item'][data-row-span-md='4'] {
1060
+ --xh-_grid-row-span: 4;
1061
+ }
1062
+
1063
+ .xh-scope-grid[data-part='item'][data-row-span-md='5'] {
1064
+ --xh-_grid-row-span: 5;
1065
+ }
1066
+
1067
+ .xh-scope-grid[data-part='item'][data-row-span-md='6'] {
1068
+ --xh-_grid-row-span: 6;
1069
+ }
1070
+
1071
+ .xh-scope-grid[data-part='item'][data-row-span-md='7'] {
1072
+ --xh-_grid-row-span: 7;
1073
+ }
1074
+
1075
+ .xh-scope-grid[data-part='item'][data-row-span-md='8'] {
1076
+ --xh-_grid-row-span: 8;
1077
+ }
1078
+
1079
+ .xh-scope-grid[data-part='item'][data-row-span-md='9'] {
1080
+ --xh-_grid-row-span: 9;
1081
+ }
1082
+
1083
+ .xh-scope-grid[data-part='item'][data-row-span-md='10'] {
1084
+ --xh-_grid-row-span: 10;
1085
+ }
1086
+
1087
+ .xh-scope-grid[data-part='item'][data-row-span-md='11'] {
1088
+ --xh-_grid-row-span: 11;
1089
+ }
1090
+
1091
+ .xh-scope-grid[data-part='item'][data-row-span-md='12'] {
1092
+ --xh-_grid-row-span: 12;
1093
+ }
1094
+ }
1095
+
1096
+ @media (min-width: 1024px) {
1097
+ .xh-scope-grid[data-part='item'][data-row-span-lg='1'] {
1098
+ --xh-_grid-row-span: 1;
1099
+ }
1100
+
1101
+ .xh-scope-grid[data-part='item'][data-row-span-lg='2'] {
1102
+ --xh-_grid-row-span: 2;
1103
+ }
1104
+
1105
+ .xh-scope-grid[data-part='item'][data-row-span-lg='3'] {
1106
+ --xh-_grid-row-span: 3;
1107
+ }
1108
+
1109
+ .xh-scope-grid[data-part='item'][data-row-span-lg='4'] {
1110
+ --xh-_grid-row-span: 4;
1111
+ }
1112
+
1113
+ .xh-scope-grid[data-part='item'][data-row-span-lg='5'] {
1114
+ --xh-_grid-row-span: 5;
1115
+ }
1116
+
1117
+ .xh-scope-grid[data-part='item'][data-row-span-lg='6'] {
1118
+ --xh-_grid-row-span: 6;
1119
+ }
1120
+
1121
+ .xh-scope-grid[data-part='item'][data-row-span-lg='7'] {
1122
+ --xh-_grid-row-span: 7;
1123
+ }
1124
+
1125
+ .xh-scope-grid[data-part='item'][data-row-span-lg='8'] {
1126
+ --xh-_grid-row-span: 8;
1127
+ }
1128
+
1129
+ .xh-scope-grid[data-part='item'][data-row-span-lg='9'] {
1130
+ --xh-_grid-row-span: 9;
1131
+ }
1132
+
1133
+ .xh-scope-grid[data-part='item'][data-row-span-lg='10'] {
1134
+ --xh-_grid-row-span: 10;
1135
+ }
1136
+
1137
+ .xh-scope-grid[data-part='item'][data-row-span-lg='11'] {
1138
+ --xh-_grid-row-span: 11;
1139
+ }
1140
+
1141
+ .xh-scope-grid[data-part='item'][data-row-span-lg='12'] {
1142
+ --xh-_grid-row-span: 12;
1143
+ }
1144
+ }
1145
+
1146
+ @media (min-width: 1280px) {
1147
+ .xh-scope-grid[data-part='item'][data-row-span-xl='1'] {
1148
+ --xh-_grid-row-span: 1;
1149
+ }
1150
+
1151
+ .xh-scope-grid[data-part='item'][data-row-span-xl='2'] {
1152
+ --xh-_grid-row-span: 2;
1153
+ }
1154
+
1155
+ .xh-scope-grid[data-part='item'][data-row-span-xl='3'] {
1156
+ --xh-_grid-row-span: 3;
1157
+ }
1158
+
1159
+ .xh-scope-grid[data-part='item'][data-row-span-xl='4'] {
1160
+ --xh-_grid-row-span: 4;
1161
+ }
1162
+
1163
+ .xh-scope-grid[data-part='item'][data-row-span-xl='5'] {
1164
+ --xh-_grid-row-span: 5;
1165
+ }
1166
+
1167
+ .xh-scope-grid[data-part='item'][data-row-span-xl='6'] {
1168
+ --xh-_grid-row-span: 6;
1169
+ }
1170
+
1171
+ .xh-scope-grid[data-part='item'][data-row-span-xl='7'] {
1172
+ --xh-_grid-row-span: 7;
1173
+ }
1174
+
1175
+ .xh-scope-grid[data-part='item'][data-row-span-xl='8'] {
1176
+ --xh-_grid-row-span: 8;
1177
+ }
1178
+
1179
+ .xh-scope-grid[data-part='item'][data-row-span-xl='9'] {
1180
+ --xh-_grid-row-span: 9;
1181
+ }
1182
+
1183
+ .xh-scope-grid[data-part='item'][data-row-span-xl='10'] {
1184
+ --xh-_grid-row-span: 10;
1185
+ }
1186
+
1187
+ .xh-scope-grid[data-part='item'][data-row-span-xl='11'] {
1188
+ --xh-_grid-row-span: 11;
1189
+ }
1190
+
1191
+ .xh-scope-grid[data-part='item'][data-row-span-xl='12'] {
1192
+ --xh-_grid-row-span: 12;
1193
+ }
1194
+ }
1195
+
1196
+ /* 声明过任何 display 就盖掉了 UA 的 [hidden]{display:none},收起态得自己还回去。
1197
+ 写在文件末尾:兜底必须排在该部件所有 display 声明之后 */
1198
+ .xh-scope-grid[data-part='root'][hidden] {
1199
+ display: none;
1200
+ }
1201
+ }