@weapp-tailwindcss/reset 0.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.
@@ -0,0 +1,459 @@
1
+ /* Document
2
+ * ========================================================================== */
3
+
4
+ /**
5
+ * 1. Add border box sizing in all browsers (opinionated).
6
+ * 2. Backgrounds do not repeat by default (opinionated).
7
+ */
8
+
9
+ /* #ifdef h5 */
10
+ *,
11
+ ::before,
12
+ ::after {
13
+ box-sizing: border-box; /* 1 */
14
+ background-repeat: no-repeat; /* 2 */
15
+ }
16
+ /* #endif */
17
+ /* #ifndef h5 */
18
+ page,
19
+ cover-image,
20
+ cover-view,
21
+ grid-view,
22
+ list-view,
23
+ match-media,
24
+ movable-area,
25
+ movable-view,
26
+ page-container,
27
+ root-portal,
28
+ scroll-view,
29
+ share-element,
30
+ snapshot,
31
+ span,
32
+ sticky-header,
33
+ sticky-section,
34
+ swiper,
35
+ swiper-item,
36
+ view,
37
+ icon,
38
+ progress,
39
+ rich-text,
40
+ text,
41
+ button,
42
+ checkbox,
43
+ checkbox-group,
44
+ editor,
45
+ form,
46
+ input,
47
+ keyboard-accessory,
48
+ label,
49
+ picker,
50
+ picker-view,
51
+ picker-view-column,
52
+ radio,
53
+ radio-group,
54
+ slider,
55
+ switch,
56
+ textarea,
57
+ functional-page-navigator,
58
+ navigator,
59
+ ::before,
60
+ ::after {
61
+ box-sizing: border-box; /* 1 */
62
+ background-repeat: no-repeat; /* 2 */
63
+ }
64
+ /* #endif */
65
+
66
+ /**
67
+ * 1. Add text decoration inheritance in all browsers (opinionated).
68
+ * 2. Add vertical alignment inheritance in all browsers (opinionated).
69
+ */
70
+
71
+ ::before,
72
+ ::after {
73
+ text-decoration: inherit; /* 1 */
74
+ vertical-align: inherit; /* 2 */
75
+ }
76
+
77
+ /**
78
+ * 1. Use the default cursor in all browsers (opinionated).
79
+ * 2. Change the line height in all browsers (opinionated).
80
+ * 3. Breaks words to prevent overflow in all browsers (opinionated).
81
+ * 4. Use a 4-space tab width in all browsers (opinionated).
82
+ * 5. Remove the grey highlight on links in iOS (opinionated).
83
+ * 6. Prevent adjustments of font size after orientation changes in iOS.
84
+ */
85
+
86
+ :where(:root) {
87
+ cursor: default; /* 1 */
88
+ line-height: 1.5; /* 2 */
89
+ overflow-wrap: break-word; /* 3 */
90
+ -moz-tab-size: 4; /* 4 */
91
+ tab-size: 4; /* 4 */
92
+ -webkit-tap-highlight-color: transparent; /* 5 */
93
+ -webkit-text-size-adjust: 100%; /* 6 */
94
+ text-size-adjust: 100%; /* 6 */
95
+ }
96
+
97
+ /* Sections
98
+ * ========================================================================== */
99
+
100
+ /**
101
+ * Remove the margin in all browsers (opinionated).
102
+ */
103
+
104
+ /* #ifdef h5 */
105
+ :where(body) {
106
+ margin: 0;
107
+ }
108
+ /* #endif */
109
+ /* #ifdef h5 */
110
+ :where(page) {
111
+ margin: 0;
112
+ }
113
+ /* #endif */
114
+
115
+ /**
116
+ * Correct the font size and margin on `h1` elements within `section` and
117
+ * `article` contexts in Chrome, Edge, Firefox, and Safari.
118
+ */
119
+
120
+ /* #ifdef h5 */
121
+ :where(h1) {
122
+ font-size: 2em;
123
+ margin: 0.67em 0;
124
+ }
125
+ /* #endif */
126
+
127
+ /* Grouping content
128
+ * ========================================================================== */
129
+
130
+ /**
131
+ * Remove the margin on nested lists in Chrome, Edge, and Safari.
132
+ */
133
+
134
+ /* #ifdef h5 */
135
+ :where(dl, ol, ul) :where(dl, ol, ul) {
136
+ margin: 0;
137
+ }
138
+ /* #endif */
139
+
140
+ /**
141
+ * 1. Correct the inheritance of border color in Firefox.
142
+ * 2. Add the correct box sizing in Firefox.
143
+ */
144
+
145
+ /* #ifdef h5 */
146
+ :where(hr) {
147
+ color: inherit; /* 1 */
148
+ height: 0; /* 2 */
149
+ }
150
+ /* #endif */
151
+
152
+ /**
153
+ * Remove the list style on navigation lists in all browsers (opinionated).
154
+ */
155
+
156
+ /* #ifdef h5 */
157
+ :where(nav) :where(ol, ul) {
158
+ list-style-type: none;
159
+ padding: 0;
160
+ }
161
+ /* #endif */
162
+
163
+ /**
164
+ * Prevent VoiceOver from ignoring list semantics in Safari (opinionated).
165
+ */
166
+
167
+ /* #ifdef h5 */
168
+ :where(nav li)::before {
169
+ content: '\200B';
170
+ float: left;
171
+ }
172
+ /* #endif */
173
+
174
+ /**
175
+ * 1. Correct the inheritance and scaling of font size in all browsers.
176
+ * 2. Correct the odd `em` font sizing in all browsers.
177
+ * 3. Prevent overflow of the container in all browsers (opinionated).
178
+ */
179
+
180
+ /* #ifdef h5 */
181
+ :where(pre) {
182
+ font-family: monospace, monospace; /* 1 */
183
+ font-size: 1em; /* 2 */
184
+ overflow: auto; /* 3 */
185
+ }
186
+ /* #endif */
187
+
188
+ /* Text-level semantics
189
+ * ========================================================================== */
190
+
191
+ /**
192
+ * Add the correct text decoration in Safari.
193
+ */
194
+
195
+ /* #ifdef h5 */
196
+ :where(abbr[title]) {
197
+ text-decoration: underline;
198
+ text-decoration: underline dotted;
199
+ }
200
+ /* #endif */
201
+
202
+ /**
203
+ * Add the correct font weight in Chrome, Edge, and Safari.
204
+ */
205
+
206
+ /* #ifdef h5 */
207
+ :where(b, strong) {
208
+ font-weight: bolder;
209
+ }
210
+ /* #endif */
211
+
212
+ /**
213
+ * 1. Correct the inheritance and scaling of font size in all browsers.
214
+ * 2. Correct the odd `em` font sizing in all browsers.
215
+ */
216
+
217
+ /* #ifdef h5 */
218
+ :where(code, kbd, samp) {
219
+ font-family: monospace, monospace; /* 1 */
220
+ font-size: 1em; /* 2 */
221
+ }
222
+ /* #endif */
223
+
224
+ /**
225
+ * Add the correct font size in all browsers.
226
+ */
227
+
228
+ /* #ifdef h5 */
229
+ :where(small) {
230
+ font-size: 80%;
231
+ }
232
+ /* #endif */
233
+
234
+ /* Embedded content
235
+ * ========================================================================== */
236
+
237
+ /*
238
+ * Change the alignment on media elements in all browsers (opinionated).
239
+ */
240
+
241
+ /* #ifdef h5 */
242
+ :where(audio, canvas, iframe, img, svg, video) {
243
+ vertical-align: middle;
244
+ }
245
+ /* #endif */
246
+ /* #ifndef h5 */
247
+ :where(audio, canvas, image, video) {
248
+ vertical-align: middle;
249
+ }
250
+ /* #endif */
251
+
252
+ /**
253
+ * Remove the border on iframes in all browsers (opinionated).
254
+ */
255
+
256
+ /* #ifdef h5 */
257
+ :where(iframe) {
258
+ border-style: none;
259
+ }
260
+ /* #endif */
261
+
262
+ /**
263
+ * Change the fill color to match the text color in all browsers (opinionated).
264
+ */
265
+
266
+ /* #ifdef h5 */
267
+ :where(svg:not([fill])) {
268
+ fill: currentColor;
269
+ }
270
+ /* #endif */
271
+
272
+ /* Tabular data
273
+ * ========================================================================== */
274
+
275
+ /**
276
+ * 1. Collapse border spacing in all browsers (opinionated).
277
+ * 2. Correct table border color in Chrome, Edge, and Safari.
278
+ * 3. Remove text indentation from table contents in Chrome, Edge, and Safari.
279
+ */
280
+
281
+ /* #ifdef h5 */
282
+ :where(table) {
283
+ border-collapse: collapse; /* 1 */
284
+ border-color: currentColor; /* 2 */
285
+ text-indent: 0; /* 3 */
286
+ }
287
+ /* #endif */
288
+
289
+ /* Forms
290
+ * ========================================================================== */
291
+
292
+ /**
293
+ * Remove the margin on controls in Safari.
294
+ */
295
+
296
+ /* #ifdef h5 */
297
+ :where(button, input, select) {
298
+ margin: 0;
299
+ }
300
+ /* #endif */
301
+ /* #ifndef h5 */
302
+ :where(button, input) {
303
+ margin: 0;
304
+ }
305
+ /* #endif */
306
+
307
+ /**
308
+ * Correct the inability to style buttons in iOS and Safari.
309
+ */
310
+
311
+ :where(button, [type='button' i], [type='reset' i], [type='submit' i]) {
312
+ -webkit-appearance: button;
313
+ }
314
+
315
+ /**
316
+ * Change the inconsistent appearance in all browsers (opinionated).
317
+ */
318
+
319
+ /* #ifdef h5 */
320
+ :where(fieldset) {
321
+ border: 1px solid #a0a0a0;
322
+ }
323
+ /* #endif */
324
+
325
+ /**
326
+ * Add the correct vertical alignment in Chrome, Edge, and Firefox.
327
+ */
328
+
329
+ :where(progress) {
330
+ vertical-align: baseline;
331
+ }
332
+
333
+ /**
334
+ * 1. Remove the margin in Firefox and Safari.
335
+ * 3. Change the resize direction in all browsers (opinionated).
336
+ */
337
+
338
+ :where(textarea) {
339
+ margin: 0; /* 1 */
340
+ resize: vertical; /* 3 */
341
+ }
342
+
343
+ /**
344
+ * 1. Correct the odd appearance in Chrome, Edge, and Safari.
345
+ * 2. Correct the outline style in Safari.
346
+ */
347
+
348
+ :where([type='search' i]) {
349
+ -webkit-appearance: textfield; /* 1 */
350
+ outline-offset: -2px; /* 2 */
351
+ }
352
+
353
+ /**
354
+ * Correct the cursor style of increment and decrement buttons in Safari.
355
+ */
356
+
357
+ ::-webkit-inner-spin-button,
358
+ ::-webkit-outer-spin-button {
359
+ height: auto;
360
+ }
361
+
362
+ /**
363
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
364
+ */
365
+
366
+ ::-webkit-input-placeholder {
367
+ color: inherit;
368
+ opacity: 0.54;
369
+ }
370
+
371
+ /**
372
+ * Remove the inner padding in Chrome, Edge, and Safari on macOS.
373
+ */
374
+
375
+ ::-webkit-search-decoration {
376
+ -webkit-appearance: none;
377
+ }
378
+
379
+ /**
380
+ * 1. Correct the inability to style upload buttons in iOS and Safari.
381
+ * 2. Change font properties to `inherit` in Safari.
382
+ */
383
+
384
+ ::-webkit-file-upload-button {
385
+ -webkit-appearance: button; /* 1 */
386
+ font: inherit; /* 2 */
387
+ }
388
+
389
+ /* Interactive
390
+ * ========================================================================== */
391
+
392
+ /*
393
+ * Add the correct styles in Safari.
394
+ */
395
+
396
+ /* #ifdef h5 */
397
+ :where(dialog) {
398
+ background-color: white;
399
+ border: solid;
400
+ color: black;
401
+ height: -moz-fit-content;
402
+ height: fit-content;
403
+ left: 0;
404
+ margin: auto;
405
+ padding: 1em;
406
+ position: absolute;
407
+ right: 0;
408
+ width: -moz-fit-content;
409
+ width: fit-content;
410
+ }
411
+
412
+ :where(dialog:not([open])) {
413
+ display: none;
414
+ }
415
+ /* #endif */
416
+
417
+ /*
418
+ * Add the correct display in Safari.
419
+ */
420
+
421
+ /* #ifdef h5 */
422
+ :where(details > summary:first-of-type) {
423
+ display: list-item;
424
+ }
425
+ /* #endif */
426
+
427
+ /* Accessibility
428
+ * ========================================================================== */
429
+
430
+ /**
431
+ * Change the cursor on busy elements in all browsers (opinionated).
432
+ */
433
+
434
+ :where([aria-busy='true' i]) {
435
+ cursor: progress;
436
+ }
437
+
438
+ /*
439
+ * Change the cursor on disabled, not-editable, or otherwise
440
+ * inoperable elements in all browsers (opinionated).
441
+ */
442
+
443
+ :where([aria-disabled='true' i], [disabled]) {
444
+ cursor: not-allowed;
445
+ }
446
+
447
+ /*
448
+ * Change the display on visually hidden accessible elements
449
+ * in all browsers (opinionated).
450
+ */
451
+
452
+ :where([aria-hidden='false' i][hidden]) {
453
+ display: initial;
454
+ }
455
+
456
+ :where([aria-hidden='false' i][hidden]:not(:focus)) {
457
+ clip: rect(0, 0, 0, 0);
458
+ position: absolute;
459
+ }