gridy 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8dda01ccf56bc2c2a1bbce11a8255e53bbdf29e2e00cce66c6d3a7be89434d73
4
+ data.tar.gz: d045f910f97777dac23b85ebb35c6a74e3104fc5022f578ca8e81f2129dec49f
5
+ SHA512:
6
+ metadata.gz: b7a4d1cbba84d5a6489fb269d4c9af247d09b8b9c0d6b57b98bb8bca40383d4482fafcde67a085ed836815adb0cbbaf3e9323c0c3822357e6858dc65aa3afe31
7
+ data.tar.gz: e66d39c68309e05d8d97f8e964002e7a449516f41f92651eb92d973f782befabcd322c5419432f2448864733ae250edf01f102d6551218d8bded2227cdc1f33e
data/CHANGELOG.md ADDED
File without changes
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright Melvin Sembrano
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Gridy
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "gridy"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install gridy
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/setup"
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,172 @@
1
+ :where(html) {
2
+ --gray-0-hsl: 210 17% 98%;
3
+ --gray-1-hsl: 210 17% 95%;
4
+ --gray-2-hsl: 210 16% 93%;
5
+ --gray-3-hsl: 210 14% 89%;
6
+ --gray-4-hsl: 210 14% 83%;
7
+ --gray-5-hsl: 210 11% 71%;
8
+ --gray-6-hsl: 210 7% 56%;
9
+ --gray-7-hsl: 210 9% 31%;
10
+ --gray-8-hsl: 210 10% 23%;
11
+ --gray-9-hsl: 210 11% 15%;
12
+ --gray-10-hsl: 214 14% 10%;
13
+ --gray-11-hsl: 216 16% 6%;
14
+ --gray-12-hsl: 210 40% 2%;
15
+ }
16
+ :where(
17
+ .btn,
18
+ button,
19
+ input:is([type="button"], [type="submit"], [type="reset"])
20
+ ),
21
+ :where(input[type="file"])::-webkit-file-upload-button,
22
+ :where(input[type="file"])::file-selector-button {
23
+ --_accent: initial;
24
+ --_text: initial;
25
+ --_size: initial;
26
+ --_bg-light: #fff;
27
+ --_bg-dark: var(--surface-3);
28
+ --_bg: var(--_bg-light);
29
+ --_border: var(--surface-3);
30
+ --_highlight-size: 0;
31
+ --_highlight-light: hsl(var(--gray-5-hsl) / 25%);
32
+ --_highlight-dark: hsl(var(--gray-12-hsl) / 25%);
33
+ --_highlight: var(--_highlight-light);
34
+ --_ink-shadow-light: 0 1px 0 var(--gray-3);
35
+ --_ink-shadow-dark: 0 1px 0 var(--surface-1);
36
+ --_ink-shadow: var(--_ink-shadow-light);
37
+ --_icon-size: var(--size-relative-7);
38
+ --_icon-color: var(--_accent, var(--link));
39
+ -webkit-tap-highlight-color: transparent;
40
+ -webkit-touch-callout: none;
41
+ align-items: center;
42
+ background: var(--_bg);
43
+ border: var(--border-size-2) solid var(--_border);
44
+ border-radius: var(--radius-2);
45
+ box-shadow:
46
+ var(--shadow-2),
47
+ 0 1px var(--surface-3),
48
+ 0 0 0 var(--_highlight-size) var(--_highlight);
49
+ color: var(--_text);
50
+ display: inline-flex;
51
+ font-size: var(--_size);
52
+ font-weight: var(--font-weight-7);
53
+ gap: var(--size-2);
54
+ justify-content: center;
55
+ padding-block: 0.75ch;
56
+ padding-inline: var(--size-relative-6);
57
+ text-align: center;
58
+ text-shadow: var(--_ink-shadow);
59
+ transition: border-color 0.5s var(--ease-3);
60
+ user-select: none;
61
+ }
62
+ @media (prefers-color-scheme: dark) {
63
+ :where(
64
+ .btn,
65
+ button,
66
+ input:is([type="button"], [type="submit"], [type="reset"])
67
+ ),
68
+ :where(input[type="file"])::-webkit-file-upload-button,
69
+ :where(input[type="file"])::file-selector-button {
70
+ --_highlight: var(--_highlight-dark);
71
+ --_bg: var(--_bg-dark);
72
+ --_ink-shadow: var(--_ink-shadow-dark);
73
+ }
74
+ }
75
+ @media (prefers-reduced-motion: no-preference) {
76
+ :where(
77
+ .btn,
78
+ button,
79
+ input:is([type="button"], [type="submit"], [type="reset"])
80
+ ),
81
+ :where(input[type="file"])::-webkit-file-upload-button,
82
+ :where(input[type="file"])::file-selector-button {
83
+ transition:
84
+ border-color 0.5s var(--ease-3),
85
+ box-shadow 145ms var(--ease-4),
86
+ outline-offset 145ms var(--ease-4);
87
+ }
88
+ }
89
+ :where(
90
+ .btn,
91
+ button,
92
+ input:is([type="button"], [type="submit"], [type="reset"])
93
+ )[disabled] {
94
+ --_bg: none;
95
+ --_text: var(--gray-6);
96
+ box-shadow: var(--shadow-1);
97
+ cursor: not-allowed;
98
+ }
99
+ @media (prefers-color-scheme: dark) {
100
+ :where(
101
+ .btn,
102
+ button,
103
+ input:is([type="button"], [type="submit"], [type="reset"])
104
+ )[disabled] {
105
+ --_text: var(--gray-5);
106
+ }
107
+ }
108
+ :where(
109
+ .btn,
110
+ button,
111
+ input:is([type="button"], [type="submit"], [type="reset"])
112
+ ):where(:not(:active):hover) {
113
+ --_highlight-size: var(--size-2);
114
+ transition-duration: 0.25s;
115
+ }
116
+ :where(.btn, button, input:is([type="button"], [type="submit"], [type="reset"]))
117
+ > :where(svg) {
118
+ block-size: var(--_icon-size);
119
+ filter: drop-shadow(var(--_ink-shadow));
120
+ flex-shrink: 0;
121
+ inline-size: var(--_icon-size);
122
+ }
123
+ :where(.btn, button, input:is([type="button"], [type="submit"], [type="reset"]))
124
+ > :where(svg > *) {
125
+ stroke: var(--_icon-color);
126
+ stroke-width: var(--border-size-2);
127
+ }
128
+ :where([type="submit"], form button:not([type], [disabled])) {
129
+ --_text: var(--_accent, var(--link));
130
+ }
131
+ :where([type="reset"]) {
132
+ --_text: var(--red-6);
133
+ --_border: var(--red-3);
134
+ }
135
+ :where([type="reset"]):focus-visible {
136
+ outline-color: var(--red-6);
137
+ }
138
+ @media (prefers-color-scheme: dark) {
139
+ :where([type="reset"]) {
140
+ --_text: var(--red-2);
141
+ --_border: var(--surface-3);
142
+ }
143
+ }
144
+ :where([type="submit"], [type="reset"], form button:not([type])):is(
145
+ :hover,
146
+ :focus-visible
147
+ ):not([disabled]) {
148
+ --_border: currentColor;
149
+ }
150
+ :where(input[type="file"]) {
151
+ align-self: flex-start;
152
+ border: var(--border-size-1) solid var(--surface-2);
153
+ border-radius: var(--radius-2);
154
+ box-shadow: var(--inner-shadow-4);
155
+ color: var(--text-2);
156
+ cursor: auto;
157
+ max-inline-size: 100%;
158
+ padding: 0;
159
+ }
160
+ :where(input[type="file"])::-webkit-file-upload-button,
161
+ :where(input[type="file"])::file-selector-button {
162
+ cursor: pointer;
163
+ margin-inline-end: var(--size-relative-6);
164
+ }
165
+ @media (prefers-color-scheme: dark) {
166
+ :where([disabled]),
167
+ :where([type="reset"]),
168
+ :where([type="submit"]),
169
+ :where(form button:not([type="button"])) {
170
+ --_bg: var(--surface-1);
171
+ }
172
+ }
@@ -0,0 +1,457 @@
1
+ :where(html) {
2
+ --link: var(--indigo-7);
3
+ --link-visited: var(--purple-7);
4
+ --text-1: var(--gray-12);
5
+ --text-2: var(--gray-7);
6
+ --surface-1: var(--gray-0);
7
+ --surface-2: var(--gray-2);
8
+ --surface-3: var(--gray-3);
9
+ --surface-4: var(--gray-4);
10
+ --scrollthumb-color: var(--gray-7);
11
+ -webkit-text-size-adjust: none;
12
+ accent-color: var(--brand, var(--link));
13
+ background-color: var(--surface-1);
14
+ block-size: 100%;
15
+ caret-color: var(--brand, var(--link));
16
+ color: var(--text-1);
17
+ color-scheme: light;
18
+ font-family: var(--font-system-ui);
19
+ line-height: var(--font-lineheight-3);
20
+ scrollbar-color: var(--scrollthumb-color) transparent;
21
+ }
22
+ @media (dynamic-range: high) or (color-gamut: p3) {
23
+ @supports (color: color(display-p3 0 0 0)) {
24
+ :where(html) {
25
+ --link: color(display-p3 0.1 0.4 1);
26
+ --link-visited: color(display-p3 0.6 0.2 1);
27
+ }
28
+ }
29
+ }
30
+ :where(html) :where(dialog) {
31
+ background-color: var(--surface-1);
32
+ }
33
+ :where(html) :where(button, .btn) {
34
+ --_highlight: var(--_highlight-light);
35
+ --_bg: var(--_bg-light);
36
+ --_ink-shadow: var(--_ink-shadow-light);
37
+ }
38
+ :where(html) :where(button, .btn) :where([type="reset"]) {
39
+ --_text: var(--red-6);
40
+ --_border: var(--red-3);
41
+ }
42
+ :where(html)
43
+ :where(
44
+ button,
45
+ .btn,
46
+ input:is([type="button"], [type="submit"], [type="reset"])
47
+ )[disabled] {
48
+ --_text: var(--gray-6);
49
+ }
50
+ :where(html)
51
+ :where(
52
+ textarea,
53
+ select,
54
+ input:not([type="button"], [type="submit"], [type="reset"])
55
+ ) {
56
+ background-color: var(--surface-2);
57
+ }
58
+ @media (prefers-color-scheme: dark) {
59
+ :where(html) {
60
+ --link: var(--indigo-3);
61
+ --link-visited: var(--purple-3);
62
+ --text-1: var(--gray-1);
63
+ --text-2: var(--gray-4);
64
+ --surface-1: var(--gray-9);
65
+ --surface-2: var(--gray-8);
66
+ --surface-3: var(--gray-7);
67
+ --surface-4: var(--gray-6);
68
+ --scrollthumb-color: var(--gray-6);
69
+ --shadow-strength: 10%;
70
+ --shadow-color: 220 40% 2%;
71
+ color-scheme: dark;
72
+ }
73
+ }
74
+ :where(a[href]) {
75
+ color: var(--brand, var(--link));
76
+ }
77
+ :where(a[href]):where(:visited) {
78
+ color: var(--link-visited);
79
+ }
80
+ :focus-visible {
81
+ outline-color: var(--brand, var(--link));
82
+ }
83
+ *,
84
+ :after,
85
+ :before {
86
+ box-sizing: border-box;
87
+ }
88
+ :where(:not(dialog)) {
89
+ margin: 0;
90
+ }
91
+ :where(:not(fieldset, progress, meter)) {
92
+ background-origin: border-box;
93
+ background-repeat: no-repeat;
94
+ border-style: solid;
95
+ border-width: 0;
96
+ }
97
+ @media (prefers-reduced-motion: no-preference) {
98
+ :where(html) {
99
+ scroll-behavior: smooth;
100
+ }
101
+ }
102
+ @media (prefers-reduced-motion: no-preference) {
103
+ :where(:focus-visible) {
104
+ transition: outline-offset 145ms var(--ease-2);
105
+ }
106
+ :where(:not(:active):focus-visible) {
107
+ transition-duration: 0.25s;
108
+ }
109
+ }
110
+ :where(:not(:active):focus-visible) {
111
+ outline-offset: 5px;
112
+ }
113
+ :where(body) {
114
+ min-block-size: 100%;
115
+ }
116
+ :where(h1, h2, h3, h4, h5, h6) {
117
+ text-wrap: balance;
118
+ font-weight: var(--font-weight-9);
119
+ line-height: var(--font-lineheight-1);
120
+ }
121
+ :where(h1) {
122
+ font-size: var(--font-size-8);
123
+ max-inline-size: var(--size-header-1);
124
+ }
125
+ :where(h2) {
126
+ font-size: var(--font-size-6);
127
+ max-inline-size: var(--size-header-2);
128
+ }
129
+ :where(h3) {
130
+ font-size: var(--font-size-5);
131
+ }
132
+ :where(h4) {
133
+ font-size: var(--font-size-4);
134
+ }
135
+ :where(h5) {
136
+ font-size: var(--font-size-3);
137
+ }
138
+ :where(h3, h4, h5, h6, dt) {
139
+ max-inline-size: var(--size-header-3);
140
+ }
141
+ :where(p, ul, ol, dl, h6) {
142
+ font-size: var(--font-size-2);
143
+ }
144
+ :where(a, u, ins, abbr) {
145
+ text-underline-offset: 1px;
146
+ }
147
+ @supports (-moz-appearance: none) {
148
+ :where(a, u, ins, abbr) {
149
+ text-underline-offset: 2px;
150
+ }
151
+ }
152
+ :where(
153
+ a[href],
154
+ area,
155
+ button,
156
+ input:not(
157
+ [type="text"],
158
+ [type="email"],
159
+ [type="number"],
160
+ [type="password"],
161
+ [type=""],
162
+ [type="tel"],
163
+ [type="url"]
164
+ ),
165
+ label[for],
166
+ select,
167
+ summary,
168
+ [tabindex]:not([tabindex*="-"])
169
+ ) {
170
+ cursor: pointer;
171
+ }
172
+ :where(
173
+ a[href],
174
+ area,
175
+ button,
176
+ input,
177
+ label[for],
178
+ select,
179
+ summary,
180
+ textarea,
181
+ [tabindex]:not([tabindex*="-"])
182
+ ) {
183
+ -webkit-tap-highlight-color: transparent;
184
+ touch-action: manipulation;
185
+ }
186
+ :where(a):where([href]) {
187
+ text-decoration-color: var(--indigo-2);
188
+ }
189
+ :where(a):where([href]):where(:visited) {
190
+ text-decoration-color: var(--purple-2);
191
+ }
192
+ :where(a):where(:not(:hover)) {
193
+ text-decoration: inherit;
194
+ }
195
+ :where(img, svg, video, canvas, audio, iframe, embed, object) {
196
+ display: block;
197
+ }
198
+ :where(img, svg, video) {
199
+ block-size: auto;
200
+ max-inline-size: 100%;
201
+ }
202
+ :where(input, button, textarea, select),
203
+ :where(input[type="file"])::-webkit-file-upload-button {
204
+ color: inherit;
205
+ font: inherit;
206
+ font-size: inherit;
207
+ letter-spacing: inherit;
208
+ }
209
+ ::placeholder {
210
+ color: var(--gray-7);
211
+ opacity: 0.75;
212
+ }
213
+ :where(input:not([type="range"]), textarea) {
214
+ padding-block: var(--size-1);
215
+ padding-inline: var(--size-2);
216
+ }
217
+ :where(select) {
218
+ padding-block: 0.75ch;
219
+ padding-inline: var(--size-relative-4) 0;
220
+ }
221
+ :where(
222
+ textarea,
223
+ select,
224
+ input:not([type="button"], [type="submit"], [type="reset"])
225
+ ) {
226
+ background-color: var(--surface-2);
227
+ border-radius: var(--radius-2);
228
+ }
229
+ :where(textarea) {
230
+ resize: block;
231
+ }
232
+ :where(input[type="checkbox"], input[type="radio"]) {
233
+ block-size: var(--size-3);
234
+ inline-size: var(--size-3);
235
+ }
236
+ :where(svg:not([width])) {
237
+ inline-size: var(--size-10);
238
+ }
239
+ :where(code, kbd, samp, pre) {
240
+ font-family: var(--font-monospace-code), monospace;
241
+ }
242
+ :where(:not(pre) > code, kbd) {
243
+ white-space: nowrap;
244
+ }
245
+ :where(pre) {
246
+ direction: ltr;
247
+ max-inline-size: max-content;
248
+ min-inline-size: 0;
249
+ white-space: pre;
250
+ writing-mode: lr;
251
+ }
252
+ :where(:not(pre) > code) {
253
+ background: var(--surface-2);
254
+ border-radius: var(--radius-2);
255
+ padding: var(--size-1) var(--size-2);
256
+ writing-mode: lr;
257
+ }
258
+ :where(kbd, var) {
259
+ border-color: var(--surface-4);
260
+ border-radius: var(--radius-2);
261
+ border-width: var(--border-size-1);
262
+ padding: var(--size-1) var(--size-2);
263
+ }
264
+ :where(mark) {
265
+ border-radius: var(--radius-2);
266
+ padding-inline: var(--size-1);
267
+ }
268
+ :where(ol, ul) {
269
+ padding-inline-start: var(--size-8);
270
+ }
271
+ :where(li) {
272
+ padding-inline-start: var(--size-2);
273
+ }
274
+ :where(li, dd, figcaption) {
275
+ max-inline-size: var(--size-content-2);
276
+ }
277
+ :where(p) {
278
+ text-wrap: pretty;
279
+ max-inline-size: var(--size-content-3);
280
+ }
281
+ :where(dt, summary) {
282
+ font-weight: var(--font-weight-7);
283
+ }
284
+ :where(dt:not(:first-of-type)) {
285
+ margin-block-start: var(--size-5);
286
+ }
287
+ :where(small) {
288
+ font-size: max(0.5em, var(--font-size-0));
289
+ max-inline-size: var(--size-content-1);
290
+ }
291
+ :where(hr) {
292
+ background-color: var(--surface-3);
293
+ height: var(--border-size-2);
294
+ margin-block: var(--size-fluid-5);
295
+ }
296
+ :where(figure) {
297
+ display: grid;
298
+ gap: var(--size-2);
299
+ place-items: center;
300
+ }
301
+ :where(figure) > :where(figcaption) {
302
+ text-wrap: balance;
303
+ font-size: var(--font-size-1);
304
+ }
305
+ :where(blockquote, :not(blockquote) > cite) {
306
+ border-inline-start-width: var(--border-size-3);
307
+ }
308
+ :where(blockquote) {
309
+ display: grid;
310
+ gap: var(--size-3);
311
+ max-inline-size: var(--size-content-2);
312
+ padding-block: var(--size-3);
313
+ padding-inline: var(--size-4);
314
+ }
315
+ :where(:not(blockquote) > cite) {
316
+ padding-inline-start: var(--size-2);
317
+ }
318
+ :where(summary) {
319
+ background: var(--surface-3);
320
+ border-radius: var(--radius-2);
321
+ margin: calc(var(--size-2) * -1) calc(var(--size-3) * -1);
322
+ padding: var(--size-2) var(--size-3);
323
+ }
324
+ :where(details) {
325
+ background: var(--surface-2);
326
+ border-radius: var(--radius-2);
327
+ padding-block: var(--size-2);
328
+ padding-inline: var(--size-3);
329
+ }
330
+ :where(details[open] > summary) {
331
+ border-end-end-radius: 0;
332
+ border-end-start-radius: 0;
333
+ margin-bottom: var(--size-2);
334
+ }
335
+ :where(fieldset) {
336
+ border: var(--border-size-1) solid var(--surface-4);
337
+ border-radius: var(--radius-2);
338
+ }
339
+ :where(del) {
340
+ background: var(--red-9);
341
+ color: var(--red-2);
342
+ }
343
+ :where(ins) {
344
+ background: var(--green-9);
345
+ color: var(--green-1);
346
+ }
347
+ :where(abbr) {
348
+ text-decoration-color: var(--blue-5);
349
+ }
350
+ :where(dialog) {
351
+ background-color: var(--surface-1);
352
+ border-radius: var(--radius-3);
353
+ box-shadow: var(--shadow-6);
354
+ color: inherit;
355
+ }
356
+ :where(dialog)::backdrop {
357
+ backdrop-filter: blur(25px);
358
+ }
359
+ :where(html[\:has\(dialog\[open\]\)]) {
360
+ overflow: hidden;
361
+ }
362
+ :where(html:has(dialog[open])) {
363
+ overflow: hidden;
364
+ }
365
+ :where(menu) {
366
+ display: flex;
367
+ gap: var(--size-3);
368
+ padding-inline-start: 0;
369
+ }
370
+ :where(sup) {
371
+ font-size: 0.5em;
372
+ }
373
+ :where(table) {
374
+ --nice-inner-radius: calc(var(--radius-3) - 2px);
375
+ background: var(--surface-2);
376
+ border: 1px solid var(--surface-2);
377
+ border-radius: var(--radius-3);
378
+ width: fit-content;
379
+ }
380
+ :where(table[\:not-has\(tfoot\)] tr:last-child td:first-child) {
381
+ border-end-start-radius: var(--nice-inner-radius);
382
+ }
383
+ :where(table:not(:has(tfoot)) tr:last-child td:first-child) {
384
+ border-end-start-radius: var(--nice-inner-radius);
385
+ }
386
+ :where(table[\:not-has\(tfoot\)] tr:last-child td:last-child) {
387
+ border-end-end-radius: var(--nice-inner-radius);
388
+ }
389
+ :where(table:not(:has(tfoot)) tr:last-child td:last-child) {
390
+ border-end-end-radius: var(--nice-inner-radius);
391
+ }
392
+ :where(table thead tr:first-child th:first-child) {
393
+ border-start-start-radius: var(--nice-inner-radius);
394
+ }
395
+ :where(table thead tr:first-child th:last-child) {
396
+ border-start-end-radius: var(--nice-inner-radius);
397
+ }
398
+ :where(tfoot tr:last-child :is(th, td):first-of-type) {
399
+ border-end-start-radius: var(--nice-inner-radius);
400
+ }
401
+ :where(tfoot tr:last-child :is(th, td):last-of-type) {
402
+ border-end-end-radius: var(--nice-inner-radius);
403
+ }
404
+ :where(th) {
405
+ background-color: var(--surface-2);
406
+ color: var(--text-1);
407
+ }
408
+ :where(table :is(a, button, [contenteditable]):is(:focus-visible)) {
409
+ outline-offset: -2px;
410
+ }
411
+ :where(td) {
412
+ text-wrap: pretty;
413
+ background: var(--surface-1);
414
+ max-inline-size: var(--size-content-2);
415
+ }
416
+ :where(td, th) {
417
+ padding: var(--size-2);
418
+ text-align: left;
419
+ }
420
+ :where(:is(td, th):not([align])) {
421
+ text-align: center;
422
+ }
423
+ :where(thead) {
424
+ border-collapse: collapse;
425
+ }
426
+ :where(table tr:hover td),
427
+ :where(tbody tr:nth-child(2n):hover td) {
428
+ background-color: var(--gray-10);
429
+ }
430
+ @media (prefers-color-scheme: light) {
431
+ :where(table tr:hover td),
432
+ :where(tbody tr:nth-child(2n):hover td) {
433
+ background-color: #fff;
434
+ }
435
+ }
436
+ :where(table > caption) {
437
+ margin: var(--size-3);
438
+ }
439
+ :where(tfoot button) {
440
+ padding-block: var(--size-1);
441
+ padding-inline: var(--size-3);
442
+ }
443
+ @media (prefers-color-scheme: dark) {
444
+ :where(
445
+ textarea,
446
+ select,
447
+ input:not([type="button"], [type="submit"], [type="reset"])
448
+ ) {
449
+ background-color: #171a1c;
450
+ }
451
+ :where(dialog) {
452
+ background-color: var(--surface-2);
453
+ }
454
+ ::placeholder {
455
+ color: var(--gray-6);
456
+ }
457
+ }