enr 0.2.3-alpha.2

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 (109) hide show
  1. package/209.mjs +10 -0
  2. package/209.mjs.map +1 -0
  3. package/LICENSE +25 -0
  4. package/README.md +139 -0
  5. package/client.mjs +10 -0
  6. package/components/ThemeContext/index.d.ts +11 -0
  7. package/components/ThemeContext/types.d.ts +26 -0
  8. package/components/button/button.d.ts +10 -0
  9. package/components/button/index.d.ts +9 -0
  10. package/components/image/index.d.ts +11 -0
  11. package/components/image/types.d.ts +13 -0
  12. package/components/image/useSrcChange.d.ts +11 -0
  13. package/components/layout/content.d.ts +17 -0
  14. package/components/layout/footer.d.ts +21 -0
  15. package/components/layout/get-value.d.ts +10 -0
  16. package/components/layout/header.d.ts +23 -0
  17. package/components/layout/index.d.ts +8 -0
  18. package/components/layout/is-fragment.d.ts +9 -0
  19. package/components/layout/layout.d.ts +55 -0
  20. package/components/layout/sidebar.d.ts +29 -0
  21. package/components/layout/types.d.ts +99 -0
  22. package/components/marquee/MarqueeEle.d.ts +15 -0
  23. package/components/marquee/index.d.ts +7 -0
  24. package/components/marquee/type.d.ts +9 -0
  25. package/components/menu/index.d.ts +6 -0
  26. package/components/menu/menu.d.ts +6 -0
  27. package/components/ripples/Content.d.ts +8 -0
  28. package/components/ripples/LazyRippleEle.d.ts +42 -0
  29. package/components/ripples/RipplesEle.d.ts +42 -0
  30. package/components/ripples/index.d.ts +11 -0
  31. package/components/ripples/types.d.ts +17 -0
  32. package/components/ripples/useOptionUpdate.d.ts +12 -0
  33. package/components/shared/EnLayoutContent/index.d.ts +19 -0
  34. package/components/shared/EnLayoutContent/types.d.ts +17 -0
  35. package/components/switch/SwitchContainer.d.ts +7 -0
  36. package/components/switch/SwitchContent.d.ts +10 -0
  37. package/components/switch/SwitchLabel.d.ts +9 -0
  38. package/components/switch/index.d.ts +14 -0
  39. package/customHooks/use-xcn/index.d.ts +14 -0
  40. package/customHooks/useAnimationFrame.d.ts +58 -0
  41. package/customHooks/useInputIsComposing.d.ts +44 -0
  42. package/customHooks/useRipples/buildBackground/create-background-color.d.ts +9 -0
  43. package/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +9 -0
  44. package/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +13 -0
  45. package/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +24 -0
  46. package/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +8 -0
  47. package/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +8 -0
  48. package/customHooks/useRipples/buildBackground/default-background/index.d.ts +18 -0
  49. package/customHooks/useRipples/buildBackground/load-image.d.ts +19 -0
  50. package/customHooks/useRipples/buildBackground/run-side.d.ts +15 -0
  51. package/customHooks/useRipples/buildBackground/type.d.ts +37 -0
  52. package/customHooks/useRipples/buildBackground/utils/bind-image.d.ts +10 -0
  53. package/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +9 -0
  54. package/customHooks/useRipples/buildBackground/utils/create-image-by-src.d.ts +8 -0
  55. package/customHooks/useRipples/buildBackground/utils/get-background-style.d.ts +9 -0
  56. package/customHooks/useRipples/buildBackground/utils/hide-css-background.d.ts +16 -0
  57. package/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +13 -0
  58. package/customHooks/useRipples/callback/can-side.d.ts +14 -0
  59. package/customHooks/useRipples/callback/destroy.d.ts +9 -0
  60. package/customHooks/useRipples/callback/drop.d.ts +9 -0
  61. package/customHooks/useRipples/callback/extract-url.d.ts +8 -0
  62. package/customHooks/useRipples/callback/fade.d.ts +9 -0
  63. package/customHooks/useRipples/callback/get-new-image.d.ts +14 -0
  64. package/customHooks/useRipples/callback/reload-background.d.ts +12 -0
  65. package/customHooks/useRipples/callback/scale.d.ts +8 -0
  66. package/customHooks/useRipples/index.d.ts +45 -0
  67. package/customHooks/useRipples/init/index.d.ts +11 -0
  68. package/customHooks/useRipples/init/initEvent.d.ts +11 -0
  69. package/customHooks/useRipples/init/initShaders.d.ts +13 -0
  70. package/customHooks/useRipples/init/initTexture.d.ts +13 -0
  71. package/customHooks/useRipples/render/computeTextureBoundaries.d.ts +9 -0
  72. package/customHooks/useRipples/render/draw.d.ts +13 -0
  73. package/customHooks/useRipples/render/drawQuad.d.ts +13 -0
  74. package/customHooks/useRipples/render/dropAtPointer.d.ts +13 -0
  75. package/customHooks/useRipples/render/index.d.ts +12 -0
  76. package/customHooks/useRipples/render/swapBufferIndices.d.ts +11 -0
  77. package/customHooks/useRipples/render/update.d.ts +11 -0
  78. package/customHooks/useRipples/rippersData/defaultData.d.ts +11 -0
  79. package/customHooks/useRipples/rippersData/fadeData.d.ts +51 -0
  80. package/customHooks/useRipples/rippersData/index.d.ts +46 -0
  81. package/customHooks/useRipples/rippersData/loadConfig.d.ts +25 -0
  82. package/customHooks/useRipples/rippersData/renderData.d.ts +80 -0
  83. package/customHooks/useRipples/rippersData/useOptions.d.ts +91 -0
  84. package/customHooks/useRipples/rippersData/vertexSource.d.ts +34 -0
  85. package/customHooks/useRipples/ripple.html.d.ts +12 -0
  86. package/customHooks/useRipples/ripplesClass.d.ts +57 -0
  87. package/customHooks/useRipples/tools.d.ts +37 -0
  88. package/customHooks/useRipples/types.d.ts +209 -0
  89. package/customHooks/useRipples/use-lazy-ripple.d.ts +15 -0
  90. package/customHooks/useTimeId.d.ts +50 -0
  91. package/index.client.d.ts +20 -0
  92. package/index.d.ts +8 -0
  93. package/index.mjs +3 -0
  94. package/index.server.d.ts +8 -0
  95. package/layoutUtil.mjs +10 -0
  96. package/layoutUtil.mjs.map +1 -0
  97. package/package.json +82 -0
  98. package/server.mjs +8 -0
  99. package/server.mjs.map +1 -0
  100. package/storage/main-logic .d.ts +26 -0
  101. package/storage/storage-store.d.ts +14 -0
  102. package/styles/common.css +1012 -0
  103. package/styles/common.scss +453 -0
  104. package/styles/reset.scss +93 -0
  105. package/styles/respond.scss +54 -0
  106. package/styles/root.scss +212 -0
  107. package/styles/vars-color.scss +247 -0
  108. package/utilities/cookie.d.ts +28 -0
  109. package/utilities/sys.d.ts +41 -0
@@ -0,0 +1,453 @@
1
+ @use "./vars-color.scss" as *;
2
+ @use "./respond" as rp;
3
+ @use "root.scss";
4
+
5
+ .en-full-container {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+
10
+ @for $i from 1 through 10 {
11
+ $v: #{calc($i * 4)};
12
+ // 水平方向的 padding
13
+ .en-padding-horizontal-#{$v} {
14
+ padding-left: #{$v}px;
15
+ padding-right: #{$v}px;
16
+ }
17
+
18
+ // 垂直方向的 padding
19
+ .en-padding-vertical-#{$v} {
20
+ padding-top: #{$v}px;
21
+ padding-bottom: #{$v}px;
22
+ }
23
+
24
+ // 全方向的 padding 值
25
+ .en-padding-#{$v} {
26
+ padding: #{$v}px;
27
+ }
28
+
29
+ // 水平方向的 margin
30
+ .en-margin-horizontal-#{$v} {
31
+ margin-left: #{$v}px;
32
+ margin-right: #{$v}px;
33
+ }
34
+
35
+ // 垂直方向的 margin
36
+ .en-margin-vertical-#{$v} {
37
+ margin-top: #{$v}px;
38
+ margin-bottom: #{$v}px;
39
+ }
40
+
41
+ // 全方向的 margin 值
42
+ .en-margin-#{$v} {
43
+ margin: #{$v}px;
44
+ }
45
+
46
+ // 圆角
47
+ .en-border-radius-#{$v} {
48
+ border-radius: #{$v}px;
49
+ }
50
+ }
51
+
52
+ .en-inline-block {
53
+ display: inline-block;
54
+ }
55
+
56
+ .en-relative {
57
+ position: relative;
58
+ }
59
+
60
+ .en-flex,
61
+ .en-flex-row,
62
+ .en-flex-column,
63
+ .en-flex-row-reverse,
64
+ .en-flex-column-reverse {
65
+ display: flex;
66
+ flex-wrap: nowrap;
67
+ }
68
+
69
+ .en-flex,
70
+ .en-flex-row {
71
+ flex-direction: row;
72
+ }
73
+
74
+ .en-flex-row-reverse {
75
+ flex-direction: row-reverse;
76
+ }
77
+
78
+ .en-flex-column {
79
+ flex-direction: column;
80
+ }
81
+
82
+ .en-flex-column {
83
+ flex-direction: column-reverse;
84
+ }
85
+
86
+ .en-flex-wrap {
87
+ flex-wrap: wrap;
88
+ }
89
+
90
+ .en-flex-nowrap {
91
+ flex-wrap: nowrap;
92
+ }
93
+
94
+ .en-flex-warp-reverse {
95
+ flex-wrap: wrap-reverse;
96
+ }
97
+
98
+ .en-center {
99
+ position: absolute;
100
+ left: 50%;
101
+ top: 50%;
102
+ transform: translate(-50%, -50%);
103
+ }
104
+
105
+ .en-dust {
106
+ color: var(--primary-dust);
107
+ }
108
+
109
+ /** 文本显示一行,超出点点点 */
110
+ .en-text-in-one-line {
111
+ white-space: nowrap;
112
+ text-overflow: ellipsis;
113
+ overflow: hidden;
114
+ word-break: break-all;
115
+ }
116
+
117
+ .en-text-in-one-line-hide {
118
+ white-space: nowrap;
119
+ text-overflow: clip;
120
+ overflow: hidden;
121
+ word-break: break-all;
122
+ }
123
+
124
+ /** 文本显示两行,超出点点点 */
125
+ .en-text-in-two-line {
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ display: -webkit-box;
129
+ -webkit-line-clamp: 2;
130
+ line-clamp: 2;
131
+ -webkit-box-orient: vertical;
132
+ }
133
+
134
+ /* 彩色字 */
135
+ .en-color-text {
136
+ color: transparent;
137
+ background-image: linear-gradient(45deg, #ff0, #0f0, #f00, #0ff, #00f, #f0f, #ff0);
138
+ background-position: 0% 0%;
139
+ background-size: 400% 200%;
140
+ background-clip: text;
141
+ animation: 6s ease-in 0s infinite colorText alternate;
142
+ }
143
+
144
+ .en-red-bg {
145
+ background-color: #f12;
146
+ }
147
+
148
+ .en-float-left {
149
+ float: left;
150
+ }
151
+
152
+ .en-float-right,
153
+ .en-float {
154
+ float: right;
155
+ }
156
+
157
+ .en-clear-float,
158
+ .en-clear {
159
+ clear: both;
160
+ }
161
+
162
+ .en-loading {
163
+ position: relative;
164
+ width: 100%;
165
+ height: 100%;
166
+ background-color: transparent;
167
+ background-image:
168
+ radial-gradient(#f00, #f00 50%, transparent 50%, transparent),
169
+ radial-gradient(#af1, #af1 50%, transparent 50%, transparent),
170
+ radial-gradient(#0ff, #0ff 50%, transparent 50%, transparent),
171
+ radial-gradient(#f0f, #f0f 50%, transparent 50%, transparent);
172
+ background-repeat: no-repeat;
173
+ animation: 2.4s ease-in-out 0s infinite loading;
174
+ }
175
+
176
+ // 文本剧中
177
+ .en-text-center {
178
+ text-align: center;
179
+ }
180
+
181
+ // 文本靠右
182
+ .en-text-right {
183
+ text-align: end;
184
+ }
185
+ //小文本
186
+ .en-text-small {
187
+ font-size: 0.6rem;
188
+ }
189
+
190
+ // 用户可操作
191
+ .en-user-select-text {
192
+ -khtml-user-select: text;
193
+ -moz-user-select: text;
194
+ -ms-user-select: text;
195
+ user-select: text;
196
+ }
197
+
198
+ .en-cursor-pointer {
199
+ cursor: pointer;
200
+ }
201
+
202
+ @keyframes loading {
203
+ // 45 - 25 * Math.sin((Math.PI * 5) / 12)
204
+ // 位置公式 35 - 25 * Math.cos((Math.PI * 5) / 12)
205
+
206
+ 100%,
207
+ 0% {
208
+ background-size:
209
+ 10% 10%,
210
+ 10% 10%,
211
+ 10% 10%,
212
+ 10% 10%;
213
+ background-position:
214
+ 25% 45%,
215
+ 41.7% 45%,
216
+ 58.3% 45%,
217
+ 75% 45%;
218
+ }
219
+
220
+ 20%,
221
+ 80% {
222
+ background-size: 2.5% 2.5%;
223
+ background-position: 25% 45%;
224
+ }
225
+
226
+ 22% {
227
+ background-size:
228
+ 3.75% 3.75%,
229
+ 2.5% 2.5%,
230
+ 2.5% 2.5%,
231
+ 2.5% 2.5%;
232
+ background-position:
233
+ // 位置 1
234
+ 25.85% 38.53%,
235
+ 25% 45%,
236
+ 25% 45%,
237
+ 25% 45%;
238
+ }
239
+
240
+ 24% {
241
+ background-size:
242
+ 5% 5%,
243
+ 2.5% 2.5%,
244
+ 2.5% 2.5%,
245
+ 2.5% 2.5%;
246
+ background-position:
247
+ // 位置 2
248
+ 28.35% 32.5%,
249
+ 25% 45%,
250
+ 25% 45%,
251
+ 25% 45%;
252
+ }
253
+
254
+ 26% {
255
+ background-size:
256
+ 6.25% 6.25%,
257
+ 2.5% 2.5%,
258
+ 2.5% 2.5%,
259
+ 2.5% 2.5%;
260
+ background-position:
261
+ // 位置 3
262
+ 32.32% 27.32%,
263
+ 25% 45%,
264
+ 25% 45%,
265
+ 25% 45%;
266
+ }
267
+
268
+ 28% {
269
+ background-size:
270
+ 7.5% 7.5%,
271
+ 3.75% 3.75%,
272
+ 2.5% 2.5%,
273
+ 2.5% 2.5%;
274
+ background-position:
275
+ // 位置 4
276
+ 37.5% 23.35%,
277
+ // 位置 1
278
+ 25.85% 38.53%,
279
+ 25% 45%,
280
+ 25% 45%;
281
+ }
282
+
283
+ 30% {
284
+ background-size:
285
+ 8.75% 8.75%,
286
+ 5% 5%,
287
+ 2.5% 2.5%,
288
+ 2.5% 2.5%;
289
+ background-position:
290
+ // 位置 5
291
+ 43.53% 20.85%,
292
+ // 位置 2
293
+ 28.35% 32.5%,
294
+ 25% 45%,
295
+ 25% 45%;
296
+ }
297
+
298
+ 32% {
299
+ background-size:
300
+ 10% 10%,
301
+ 6.25% 6.25%,
302
+ 3.75% 3.75%,
303
+ 2.5% 2.5%;
304
+ background-position:
305
+ // 位置 6
306
+ 50% 20%,
307
+ // 位置 3
308
+ 32.32% 27.32%,
309
+ // 位置 1
310
+ 25.85% 38.53%,
311
+ 25% 45%;
312
+ }
313
+
314
+ 34% {
315
+ background-size:
316
+ 10% 10%,
317
+ 7.5% 7.5%,
318
+ 5% 5%,
319
+ 2.5% 2.5%;
320
+ background-position:
321
+ // 位置 7
322
+ 56.47% 20.85%,
323
+ // 位置 4
324
+ 37.32% 23.35%,
325
+ // 位置 2
326
+ 28.35% 32.5%,
327
+ // 位置 1
328
+ 25.85% 38.53%;
329
+ }
330
+
331
+ $Pi: 3.1415926;
332
+
333
+ @for $i from 18 through 33 {
334
+ #{calc($i / 50 * 100%)} {
335
+ background-position:
336
+ #{(50 - (25 * cos(($Pi * ($i - 10)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 10)) / 12)) * 1%},
337
+ #{(50 - (25 * cos(($Pi * ($i - 13)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 13)) / 12)) * 1%},
338
+ #{(50 - (25 * cos(($Pi * ($i - 15)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 15)) / 12)) * 1%},
339
+ #{(50 - (25 * cos(($Pi * ($i - 17)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 17)) / 12)) * 1%};
340
+ }
341
+ }
342
+
343
+ 68% {
344
+ background-size:
345
+ 10% 10%,
346
+ 7.5% 7.5%,
347
+ 5% 5%,
348
+ 2.5% 2.5%;
349
+ background-position:
350
+ // 位置 0
351
+ 25% 45%,
352
+ // 位置 22
353
+ 28.35% 57.45%,
354
+ // 位置 20
355
+ 37.45% 66.65%,
356
+ // 位置 18
357
+ 48% 70%;
358
+ }
359
+
360
+ 70% {
361
+ background-size:
362
+ 8.75% 8.75%,
363
+ 7.5% 7.5%,
364
+ 5% 5%,
365
+ 2.5% 2.5%;
366
+ background-position:
367
+ // 位置 0
368
+ 25% 45%,
369
+ // 位置 23
370
+ 25.85% 51.47%,
371
+ // 位置 21
372
+ 32.32% 62.68%,
373
+ // 位置 19
374
+ 43.53% 69.15%;
375
+ }
376
+
377
+ 72% {
378
+ background-size:
379
+ 7.5% 7.5%,
380
+ 7.5% 7.5%,
381
+ 5% 5%,
382
+ 2.5% 2.5%;
383
+ background-position:
384
+ // 位置 0
385
+ 25% 45%,
386
+ // 位置 0
387
+ 25% 45%,
388
+ // 位置 22
389
+ 28.35% 57.45%,
390
+ // 位置 20
391
+ 37.45% 66.65%;
392
+ }
393
+ 74% {
394
+ background-size:
395
+ 6.25% 6.25%,
396
+ 6.25% 6.25%,
397
+ 5% 5%,
398
+ 2.5% 2.5%;
399
+ background-position:
400
+ // 位置 0
401
+ 25% 45%,
402
+ // 位置 0
403
+ 25% 45%,
404
+ // 位置 23
405
+ 25.85% 51.47%,
406
+ // 位置 21
407
+ 32.32% 62.68%;
408
+ }
409
+
410
+ 76% {
411
+ background-size:
412
+ 5% 5%,
413
+ 5% 5%,
414
+ 5% 5%,
415
+ 2.5% 2.5%;
416
+ background-position:
417
+ // 位置 0
418
+ 25% 45%,
419
+ // 位置 0
420
+ 25% 45%,
421
+ // 位置 0
422
+ 25% 45%,
423
+ // 位置 22
424
+ 28.35% 57.45%;
425
+ }
426
+
427
+ 78% {
428
+ background-size:
429
+ 3.75% 3.75%,
430
+ 3.75% 3.75%,
431
+ 3.75% 3.75%,
432
+ 2.5% 2.5%;
433
+ background-position:
434
+ // 位置 0
435
+ 25% 45%,
436
+ // 位置 0
437
+ 25% 45%,
438
+ // 位置 0
439
+ 25% 45%,
440
+ // 位置 23
441
+ 25.85% 51.47%;
442
+ }
443
+ }
444
+
445
+ @keyframes colorText {
446
+ 0% {
447
+ background-position: 400% 0%;
448
+ }
449
+
450
+ 100% {
451
+ background-position: 0% 0%;
452
+ }
453
+ }
@@ -0,0 +1,93 @@
1
+ @use "./vars-color.scss" as *;
2
+
3
+ /* 盒模型 规则 */
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ /* 移除默认的 margin 外边距 */
11
+ html,
12
+ body,
13
+ p,
14
+ figure,
15
+ blockquote,
16
+ dl,
17
+ dd {
18
+ margin: 0;
19
+ }
20
+
21
+ /* 设置根元素 html 默认样式 */
22
+ html {
23
+ scroll-behavior: smooth;
24
+ }
25
+
26
+ /* 设置默认的 body 元素的样式 */
27
+ body {
28
+ font-family: var(--en-font-body);
29
+ font-size: var(--en-base-font-size);
30
+ line-height: var(--en-font-content-line-height);
31
+ text-rendering: optimizeSpeed; // 文本渲染,是快速还是清晰
32
+ }
33
+
34
+ /* 链接元素没有 class 类时的展示 */
35
+ a:not([class]) {
36
+ text-decoration-skip-ink: auto;
37
+ }
38
+
39
+ a {
40
+ text-decoration: none;
41
+ }
42
+
43
+ /* 设置图片样式 */
44
+ img,
45
+ picture {
46
+ display: block;
47
+ max-width: 100%;
48
+ }
49
+
50
+ /* Fix Inter font bug: 'em' not slanted in Safari. See issue: https://github.com/mdn/yari/issues/7203 */
51
+ em {
52
+ font-variation-settings: "slnt" -10;
53
+ }
54
+
55
+ /* Inherit fonts for inputs and buttons */
56
+ input,
57
+ button,
58
+ textarea,
59
+ select {
60
+ font: inherit;
61
+ }
62
+
63
+ /* 自动填充的密码的背景色设置动画已取消背景色 */
64
+ input:-webkit-autofill,
65
+ input:-webkit-autofill:hover,
66
+ input:-webkit-autofill:focus,
67
+ input:-webkit-autofill:active {
68
+ transition-delay: 99999s;
69
+ transition:
70
+ color 99999s ease-out,
71
+ background-color 99999s ease-out;
72
+ -webkit-transition-delay: 99999s;
73
+ -webkit-transition:
74
+ color 99999s ease-out,
75
+ background-color 99999s ease-out;
76
+ -webkit-text-fill-color: var(--text-primary);
77
+ }
78
+
79
+ /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
80
+ @media (prefers-reduced-motion: reduce) {
81
+ html {
82
+ scroll-behavior: auto;
83
+ }
84
+
85
+ *,
86
+ *::before,
87
+ *::after {
88
+ animation-duration: 0.01ms !important;
89
+ animation-iteration-count: 1 !important;
90
+ scroll-behavior: auto !important;
91
+ transition-duration: 0.01ms !important;
92
+ }
93
+ }
@@ -0,0 +1,54 @@
1
+ @use "./vars-color.scss" as *;
2
+
3
+ // 响应式断点变量
4
+ $breakpoints: (
5
+ // 手机竖屏
6
+ sm: 576px,
7
+ // 平板,大手机
8
+ md: 768px,
9
+ // 小桌面
10
+ lg: 992px,
11
+ // 标准桌面
12
+ xl: 1200px,
13
+ // 大桌面
14
+ xxl: 1400px
15
+ );
16
+
17
+ // 移动优先
18
+ // 基础媒体查询混入
19
+ @mixin respond-to($breakpoint) {
20
+ $value: map-get($breakpoints, $breakpoint);
21
+
22
+ @if $value {
23
+ @media screen and (min-width: $value) {
24
+ @content;
25
+ }
26
+ } @else {
27
+ @error "为定义的断点:`#{$breakpoint}`。";
28
+ }
29
+ }
30
+
31
+ // 悬停能力检测混入 - 移动优先
32
+ @mixin hover-supported {
33
+ @media (hover: hover) and (pointer: fine) {
34
+ &:hover {
35
+ @content;
36
+ }
37
+ }
38
+ }
39
+
40
+ // 混合响应式和悬停的复合混入
41
+ @mixin respond-with-hover($breakpoint) {
42
+ @include respond-to($breakpoint) {
43
+ @include hover-supported {
44
+ @content;
45
+ }
46
+ }
47
+ }
48
+
49
+ // 禁用动画
50
+ @mixin hover-forbidden {
51
+ @media (hover: none) {
52
+ @content;
53
+ }
54
+ }