@leftium/nimble.css 0.1.0 → 0.3.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,867 @@
1
+ @charset "UTF-8";
2
+ @layer nimble.reset, nimble.base, nimble.utilities;
3
+ @layer nimble.reset {
4
+ :where(*:not(progress)),
5
+ :where(*::before),
6
+ :where(*::after) {
7
+ box-sizing: border-box;
8
+ background-repeat: no-repeat;
9
+ }
10
+ :where(html) {
11
+ line-height: 1.5;
12
+ -webkit-text-size-adjust: 100%;
13
+ tab-size: 4;
14
+ }
15
+ :where(body) {
16
+ margin: 0;
17
+ }
18
+ :where(h1) {
19
+ font-size: 2em;
20
+ margin-block: 0.67em;
21
+ }
22
+ :where(hr) {
23
+ height: 0;
24
+ color: inherit;
25
+ }
26
+ :where(nav) :where(ol, ul) {
27
+ list-style-type: none;
28
+ padding: 0;
29
+ }
30
+ :where(pre) {
31
+ font-family: monospace, monospace;
32
+ font-size: 1em;
33
+ }
34
+ :where(abbr[title]) {
35
+ text-decoration: underline dotted;
36
+ }
37
+ :where(b, strong) {
38
+ font-weight: bolder;
39
+ }
40
+ :where(code, kbd, samp) {
41
+ font-family: monospace, monospace;
42
+ font-size: 1em;
43
+ }
44
+ :where(small) {
45
+ font-size: 80%;
46
+ }
47
+ :where(sub, sup) {
48
+ font-size: 75%;
49
+ line-height: 0;
50
+ position: relative;
51
+ vertical-align: baseline;
52
+ }
53
+ :where(sub) {
54
+ bottom: -0.25em;
55
+ }
56
+ :where(sup) {
57
+ top: -0.5em;
58
+ }
59
+ :where(iframe) {
60
+ border-style: none;
61
+ }
62
+ :where(table) {
63
+ border-collapse: collapse;
64
+ border-color: currentColor;
65
+ text-indent: 0;
66
+ }
67
+ :where(button, input, select, textarea) {
68
+ font: inherit;
69
+ letter-spacing: inherit;
70
+ }
71
+ :where(button, [type=button], [type=reset], [type=submit]) {
72
+ -webkit-appearance: button;
73
+ }
74
+ :where(fieldset) {
75
+ border: 1px solid #a0a0a0;
76
+ }
77
+ :where(progress) {
78
+ vertical-align: baseline;
79
+ }
80
+ :where(textarea) {
81
+ resize: vertical;
82
+ overflow: auto;
83
+ }
84
+ :where([type=search]) {
85
+ -webkit-appearance: textfield;
86
+ outline-offset: -2px;
87
+ }
88
+ :where(::-webkit-search-decoration) {
89
+ -webkit-appearance: none;
90
+ }
91
+ :where(::-webkit-inner-spin-button),
92
+ :where(::-webkit-outer-spin-button) {
93
+ height: auto;
94
+ }
95
+ :where(::-webkit-file-upload-button) {
96
+ -webkit-appearance: button;
97
+ font: inherit;
98
+ }
99
+ :where(summary) {
100
+ display: list-item;
101
+ }
102
+ :where(a, area, button, input, label, select, summary, textarea, [tabindex]) {
103
+ touch-action: manipulation;
104
+ -webkit-tap-highlight-color: transparent;
105
+ }
106
+ :where([aria-busy=true]) {
107
+ cursor: progress;
108
+ }
109
+ :where([aria-disabled=true], [disabled]) {
110
+ cursor: not-allowed;
111
+ }
112
+ @media (prefers-reduced-motion: reduce) {
113
+ :where(*),
114
+ :where(*::before),
115
+ :where(*::after) {
116
+ animation-duration: 0.01ms !important;
117
+ animation-iteration-count: 1 !important;
118
+ transition-duration: 0.01ms !important;
119
+ scroll-behavior: auto !important;
120
+ }
121
+ }
122
+ }
123
+ @layer nimble.base {
124
+ :root {
125
+ color-scheme: light dark;
126
+ --nc-surface-hue: 250;
127
+ --nc-surface-1: light-dark(oklch(0.985 0.002 var(--nc-surface-hue)), oklch(0.17 0.005 calc(var(--nc-surface-hue) + 10)));
128
+ --nc-surface-2: light-dark(oklch(0.955 0.002 var(--nc-surface-hue)), oklch(0.2 0.005 calc(var(--nc-surface-hue) + 10)));
129
+ --nc-surface-3: light-dark(oklch(0.925 0.002 var(--nc-surface-hue)), oklch(0.23 0.005 calc(var(--nc-surface-hue) + 10)));
130
+ --nc-surface-4: light-dark(oklch(0.885 0.002 var(--nc-surface-hue)), oklch(0.27 0.005 calc(var(--nc-surface-hue) + 10)));
131
+ --nc-text: light-dark(oklch(0.28 0.005 var(--nc-surface-hue)), oklch(0.86 0.005 var(--nc-surface-hue)));
132
+ --nc-border: light-dark(oklch(0.83 0.005 var(--nc-surface-hue)), oklch(0.28 0.005 calc(var(--nc-surface-hue) + 10)));
133
+ --nc-primary: light-dark(oklch(0.5 0.2 250), oklch(0.6 0.2 250));
134
+ --nc-primary-hover: light-dark(oklch(from var(--nc-primary) calc(l - 0.1) c h), oklch(from var(--nc-primary) calc(l + 0.1) c h));
135
+ --nc-primary-focus: oklch(from var(--nc-primary) l c h / 0.4);
136
+ --nc-primary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
137
+ --nc-secondary: light-dark(oklch(0.45 0.05 250), oklch(0.6 0.05 250));
138
+ --nc-secondary-hover: light-dark(oklch(from var(--nc-secondary) calc(l - 0.1) c h), oklch(from var(--nc-secondary) calc(l + 0.1) c h));
139
+ --nc-secondary-focus: oklch(from var(--nc-secondary) l c h / 0.3);
140
+ --nc-secondary-contrast: light-dark(#fff, oklch(0.15 0.005 250));
141
+ --nc-valid: light-dark(oklch(0.52 0.17 145), oklch(0.65 0.2 145));
142
+ --nc-invalid: light-dark(oklch(0.55 0.22 25), oklch(0.65 0.22 25));
143
+ --nc-font-sans: system-ui, sans-serif;
144
+ --nc-font-mono: ui-monospace, Cascadia Code, Source Code Pro, Menlo, Consolas, DejaVu Sans Mono, monospace;
145
+ --nc-spacing: 1rem;
146
+ --nc-radius: 0.25rem;
147
+ --nc-content-width: 720px;
148
+ }
149
+ [data-theme=dark] {
150
+ color-scheme: dark;
151
+ }
152
+ [data-theme=light] {
153
+ color-scheme: light;
154
+ }
155
+ }
156
+ @layer nimble.base {
157
+ html {
158
+ font-family: var(--nc-font-sans);
159
+ font-size: 100%;
160
+ line-height: 1.5;
161
+ color: var(--nc-text);
162
+ background-color: var(--nc-surface-1);
163
+ }
164
+ body {
165
+ display: grid;
166
+ grid-template-columns: 1fr min(var(--nc-content-width), calc(100% - 2 * var(--nc-spacing))) 1fr;
167
+ min-height: 100dvh;
168
+ }
169
+ body > * {
170
+ grid-column: 2;
171
+ min-width: 0;
172
+ }
173
+ body > [style*="display: contents"] > * {
174
+ grid-column: 2;
175
+ min-width: 0;
176
+ }
177
+ ::selection {
178
+ background-color: var(--nc-primary-focus);
179
+ color: var(--nc-text);
180
+ }
181
+ }
182
+ @layer nimble.base {
183
+ h1 {
184
+ font-size: 2rem;
185
+ line-height: 1.1;
186
+ margin-top: 0;
187
+ margin-bottom: var(--nc-spacing);
188
+ font-weight: 700;
189
+ text-wrap: balance;
190
+ }
191
+ h2 {
192
+ font-size: 1.75rem;
193
+ line-height: 1.15;
194
+ margin-top: 2rem;
195
+ margin-bottom: var(--nc-spacing);
196
+ font-weight: 700;
197
+ text-wrap: balance;
198
+ }
199
+ h3 {
200
+ font-size: 1.5rem;
201
+ line-height: 1.2;
202
+ margin-top: 1.5rem;
203
+ margin-bottom: var(--nc-spacing);
204
+ font-weight: 700;
205
+ text-wrap: balance;
206
+ }
207
+ h4 {
208
+ font-size: 1.25rem;
209
+ line-height: 1.3;
210
+ margin-top: 1.5rem;
211
+ margin-bottom: var(--nc-spacing);
212
+ font-weight: 700;
213
+ text-wrap: balance;
214
+ }
215
+ h5 {
216
+ font-size: 1.125rem;
217
+ line-height: 1.4;
218
+ margin-top: 1.5rem;
219
+ margin-bottom: var(--nc-spacing);
220
+ font-weight: 700;
221
+ text-wrap: balance;
222
+ }
223
+ h6 {
224
+ font-size: 1rem;
225
+ line-height: 1.5;
226
+ margin-top: 1.5rem;
227
+ margin-bottom: var(--nc-spacing);
228
+ font-weight: 700;
229
+ text-wrap: balance;
230
+ }
231
+ @media (max-width: 720px) {
232
+ h1 {
233
+ font-size: 1.75rem;
234
+ }
235
+ h2 {
236
+ font-size: 1.5rem;
237
+ }
238
+ h3 {
239
+ font-size: 1.3rem;
240
+ }
241
+ }
242
+ p, ul, ol, dl, blockquote, pre, table, figure, form, fieldset {
243
+ margin-top: 0;
244
+ margin-bottom: var(--nc-spacing);
245
+ }
246
+ ul, ol {
247
+ padding-inline-start: 1.5em;
248
+ }
249
+ li {
250
+ margin-bottom: 0.25em;
251
+ }
252
+ :where(li) > :where(ul, ol) {
253
+ margin-bottom: 0;
254
+ }
255
+ dt {
256
+ font-weight: 600;
257
+ }
258
+ dd {
259
+ margin-inline-start: 1.5em;
260
+ margin-bottom: 0.5em;
261
+ }
262
+ blockquote {
263
+ margin-block: var(--nc-spacing);
264
+ margin-inline: 0;
265
+ padding: 0.25em var(--nc-spacing);
266
+ border-inline-start: 0.25rem solid var(--nc-border);
267
+ font-style: italic;
268
+ }
269
+ :where(blockquote) footer,
270
+ :where(blockquote) cite {
271
+ font-style: normal;
272
+ font-size: 0.9em;
273
+ color: color-mix(in oklch, var(--nc-text), transparent 40%);
274
+ }
275
+ hr {
276
+ border: none;
277
+ height: 1px;
278
+ background-color: color-mix(in oklch, var(--nc-border), transparent 40%);
279
+ margin: calc(var(--nc-spacing) * 2) 0;
280
+ }
281
+ mark {
282
+ padding: 0.1em 0.25em;
283
+ background-color: light-dark(#fde68a, oklch(0.55 0.12 85));
284
+ color: light-dark(inherit, oklch(0.95 0.01 85));
285
+ border-radius: 2px;
286
+ }
287
+ address {
288
+ font-style: normal;
289
+ }
290
+ }
291
+ @layer nimble.base {
292
+ :where(a:not([role=button])) {
293
+ color: var(--nc-primary);
294
+ text-decoration: underline;
295
+ text-underline-offset: 0.15em;
296
+ text-decoration-color: color-mix(in oklch, var(--nc-primary), transparent 50%);
297
+ transition: color 0.2s, text-decoration-color 0.2s;
298
+ }
299
+ :where(a:not([role=button])):visited {
300
+ color: color-mix(in oklch, var(--nc-primary) 40%, oklch(0.38 0.15 310));
301
+ text-decoration-color: color-mix(in oklch, var(--nc-primary) 40%, oklch(0.38 0.15 310) 30%);
302
+ }
303
+ :where(a:not([role=button])):hover {
304
+ color: var(--nc-primary-hover);
305
+ text-decoration-color: var(--nc-primary-hover);
306
+ }
307
+ }
308
+ @layer nimble.base {
309
+ :where(button, [type=submit], [type=reset], [type=button], [role=button]) {
310
+ --_btn-padding-v: 0.5em;
311
+ --_btn-padding-h: 1em;
312
+ padding: var(--_btn-padding-v) var(--_btn-padding-h);
313
+ background-color: var(--nc-primary);
314
+ color: var(--nc-primary-contrast);
315
+ border: 1px solid var(--nc-primary);
316
+ border-radius: var(--nc-radius);
317
+ font: inherit;
318
+ font-size: 1rem;
319
+ line-height: 1.5;
320
+ cursor: pointer;
321
+ text-decoration: none;
322
+ display: inline-block;
323
+ text-align: center;
324
+ margin: 0 0.25em 0.25em 0;
325
+ transition: background-color 0.2s, border-color 0.2s;
326
+ }
327
+ :where(button, [type=submit], [type=reset], [type=button], [role=button]):hover {
328
+ background-color: var(--nc-primary-hover);
329
+ border-color: var(--nc-primary-hover);
330
+ }
331
+ :where(button, [type=submit], [type=reset], [type=button], [role=button]):focus-visible {
332
+ box-shadow: 0 0 0 2px var(--nc-primary-focus);
333
+ outline: none;
334
+ }
335
+ :where([type=reset]) {
336
+ background-color: var(--nc-secondary);
337
+ border-color: var(--nc-secondary);
338
+ color: var(--nc-secondary-contrast);
339
+ }
340
+ :where([type=reset]):hover {
341
+ background-color: var(--nc-secondary-hover);
342
+ border-color: var(--nc-secondary-hover);
343
+ }
344
+ :where([type=reset]):focus-visible {
345
+ box-shadow: 0 0 0 2px var(--nc-secondary-focus);
346
+ }
347
+ :where(button, [type=submit], [type=reset], [type=button], [role=button]).inline {
348
+ --_btn-padding-v: 0.05em;
349
+ --_btn-padding-h: 0.4em;
350
+ margin: 0.1em 0.15em;
351
+ font-size: 0.875em;
352
+ vertical-align: baseline;
353
+ }
354
+ :where(button, [type=submit], [type=reset], [type=button], [role=button]):disabled {
355
+ opacity: 0.5;
356
+ cursor: not-allowed;
357
+ pointer-events: none;
358
+ }
359
+ :where([role=group]) {
360
+ display: inline-flex;
361
+ margin-bottom: var(--nc-spacing);
362
+ }
363
+ [role=group] > * {
364
+ border-radius: 0;
365
+ margin: 0;
366
+ position: relative;
367
+ }
368
+ [role=group] > * + * {
369
+ --_divider: "";
370
+ }
371
+ [role=group] > * + *::before {
372
+ content: var(--_divider);
373
+ position: absolute;
374
+ inset-inline-start: 0;
375
+ top: 20%;
376
+ bottom: 20%;
377
+ width: 1px;
378
+ background: rgba(255, 255, 255, 0.3);
379
+ pointer-events: none;
380
+ }
381
+ [role=group] > :not(.secondary):not(.outline) + .secondary,
382
+ [role=group] > .secondary + :not(.secondary):not(.outline) {
383
+ --_divider: none;
384
+ }
385
+ [role=group] > :not(.secondary):not(.outline) + .outline,
386
+ [role=group] > .outline + :not(.secondary):not(.outline) {
387
+ --_divider: none;
388
+ }
389
+ [role=group] > .secondary + .outline,
390
+ [role=group] > .outline + .secondary {
391
+ --_divider: none;
392
+ }
393
+ [role=group] > input + *,
394
+ [role=group] > select + * {
395
+ --_divider: none;
396
+ }
397
+ [role=group] > :first-child {
398
+ border-start-start-radius: var(--nc-radius);
399
+ border-end-start-radius: var(--nc-radius);
400
+ }
401
+ [role=group] > :last-child {
402
+ border-start-end-radius: var(--nc-radius);
403
+ border-end-end-radius: var(--nc-radius);
404
+ }
405
+ [role=group]:has(.outline):not(:has(> :not(.outline))) {
406
+ border: 1px solid var(--nc-primary);
407
+ border-radius: var(--nc-radius);
408
+ }
409
+ [role=group]:has(.outline):not(:has(> :not(.outline))) > .outline {
410
+ border: none;
411
+ }
412
+ [role=group] > .outline + .outline::before {
413
+ background: var(--nc-primary);
414
+ }
415
+ [role=search] [role=group] > :first-child {
416
+ border-start-start-radius: 5rem;
417
+ border-end-start-radius: 5rem;
418
+ padding-inline-start: 1.25em;
419
+ }
420
+ [role=search] [role=group] > :last-child {
421
+ border-start-end-radius: 5rem;
422
+ border-end-end-radius: 5rem;
423
+ padding-inline-end: 1.25em;
424
+ }
425
+ }
426
+ @layer nimble.utilities {
427
+ .secondary:not(a:not([role=button])) {
428
+ background-color: var(--nc-secondary);
429
+ border-color: var(--nc-secondary);
430
+ color: var(--nc-secondary-contrast);
431
+ }
432
+ .secondary:not(a:not([role=button])):hover {
433
+ background-color: var(--nc-secondary-hover);
434
+ border-color: var(--nc-secondary-hover);
435
+ }
436
+ .secondary:not(a:not([role=button])):focus-visible {
437
+ box-shadow: 0 0 0 2px var(--nc-secondary-focus);
438
+ }
439
+ a:not([role=button]).secondary {
440
+ color: var(--nc-secondary);
441
+ text-decoration-color: color-mix(in oklch, var(--nc-secondary), transparent 50%);
442
+ }
443
+ a:not([role=button]).secondary:hover {
444
+ color: var(--nc-secondary-hover);
445
+ text-decoration-color: var(--nc-secondary-hover);
446
+ }
447
+ .outline:not(a:not([role=button])) {
448
+ background-color: transparent;
449
+ color: var(--nc-primary);
450
+ }
451
+ .outline:not(a:not([role=button])):hover {
452
+ background-color: var(--nc-primary-focus);
453
+ color: var(--nc-primary-hover);
454
+ border-color: var(--nc-primary-hover);
455
+ }
456
+ }
457
+ @layer nimble.base {
458
+ :where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=submit], [type=button], [type=reset]),
459
+ select, textarea) {
460
+ --_input-bg: color-mix(in oklch, var(--nc-surface-1), var(--nc-surface-2) 20%);
461
+ padding: 0.5em 0.75em;
462
+ min-height: calc(2.5em + 2px);
463
+ background-color: var(--_input-bg);
464
+ border: 1px solid var(--nc-border);
465
+ border-radius: var(--nc-radius);
466
+ color: var(--nc-text);
467
+ font: inherit;
468
+ font-size: 1rem;
469
+ transition: border-color 0.2s, box-shadow 0.2s;
470
+ }
471
+ :where(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=submit], [type=button], [type=reset], [type=date], [type=month], [type=week], [type=time], [type=datetime-local]),
472
+ select, textarea) {
473
+ width: 100%;
474
+ margin-bottom: var(--nc-spacing);
475
+ }
476
+ :where(input, select, textarea):focus-visible {
477
+ border-color: var(--nc-primary);
478
+ box-shadow: 0 0 0 2px var(--nc-primary-focus);
479
+ outline: none;
480
+ }
481
+ :where(input, select, textarea) + :where(small) {
482
+ display: block;
483
+ margin-top: calc(var(--nc-spacing) * -0.75);
484
+ margin-bottom: var(--nc-spacing);
485
+ font-size: 0.875em;
486
+ color: color-mix(in oklch, var(--nc-text), transparent 40%);
487
+ }
488
+ :where(input, select, textarea)[aria-invalid=false] {
489
+ border-color: var(--nc-valid);
490
+ }
491
+ :where(input, select, textarea)[aria-invalid=true] {
492
+ border-color: var(--nc-invalid);
493
+ }
494
+ :where(input, select, textarea)[aria-invalid=false] + :where(small) {
495
+ color: var(--nc-valid);
496
+ }
497
+ :where(input, select, textarea)[aria-invalid=true] + :where(small) {
498
+ color: var(--nc-invalid);
499
+ }
500
+ :where(label) {
501
+ display: block;
502
+ margin-bottom: 0.25em;
503
+ }
504
+ :where(label:has(+ input, + select, + textarea)) {
505
+ font-weight: 600;
506
+ }
507
+ :where(label:has(+ [type=file], + [type=range])) {
508
+ margin-bottom: 0.5em;
509
+ }
510
+ :where(fieldset) {
511
+ border: 1px solid var(--nc-border);
512
+ border-radius: var(--nc-radius);
513
+ padding: var(--nc-spacing);
514
+ min-width: 0;
515
+ max-width: 100%;
516
+ }
517
+ :where(legend) {
518
+ font-weight: 600;
519
+ padding-inline: 0.25em;
520
+ }
521
+ :where([type=checkbox], [type=radio]) {
522
+ accent-color: var(--nc-primary);
523
+ width: 1.125em;
524
+ height: 1.125em;
525
+ margin: 0;
526
+ }
527
+ :where(label:has([type=checkbox], [type=radio])) {
528
+ display: flex;
529
+ align-items: center;
530
+ gap: 0.35em;
531
+ margin-bottom: 0.5em;
532
+ }
533
+ :where(label:has([type=checkbox], [type=radio]):last-child) {
534
+ margin-bottom: 0;
535
+ }
536
+ :where([type=search]) {
537
+ border-radius: 5rem;
538
+ padding-inline: 1.25em;
539
+ }
540
+ :where([type=range]) {
541
+ accent-color: var(--nc-primary);
542
+ width: 100%;
543
+ margin-bottom: var(--nc-spacing);
544
+ }
545
+ :where(input[list]) {
546
+ width: auto;
547
+ }
548
+ :where([type=file]) {
549
+ color: var(--nc-text);
550
+ font: inherit;
551
+ cursor: pointer;
552
+ max-width: 100%;
553
+ margin-bottom: var(--nc-spacing);
554
+ }
555
+ :where([type=file])::file-selector-button {
556
+ padding: 0.5em 1em;
557
+ margin-right: 0.75em;
558
+ margin-inline-end: 0.75em;
559
+ background-color: var(--nc-primary);
560
+ color: var(--nc-primary-contrast);
561
+ border: 1px solid var(--nc-primary);
562
+ border-radius: var(--nc-radius);
563
+ font: inherit;
564
+ cursor: pointer;
565
+ transition: background-color 0.2s, border-color 0.2s;
566
+ }
567
+ :where([type=file])::file-selector-button:hover {
568
+ background-color: var(--nc-primary-hover);
569
+ border-color: var(--nc-primary-hover);
570
+ }
571
+ :where([type=date], [type=month], [type=week], [type=time], [type=datetime-local]) {
572
+ min-width: 10em;
573
+ margin-bottom: var(--nc-spacing);
574
+ }
575
+ :where([type=color]) {
576
+ --_color-size: calc(1em * 1.5 + 1em + 2px);
577
+ margin-bottom: var(--nc-spacing);
578
+ --_color-pad: 0.25em;
579
+ height: var(--_color-size);
580
+ width: calc((var(--_color-size) - 2 * var(--_color-pad)) * 1.618 + 2 * var(--_color-pad));
581
+ padding: var(--_color-pad);
582
+ background-color: color-mix(in oklch, var(--nc-surface-1), var(--nc-surface-2) 20%);
583
+ border: 1px solid var(--nc-border);
584
+ border-radius: var(--nc-radius);
585
+ cursor: pointer;
586
+ }
587
+ :where([type=color])::-webkit-color-swatch-wrapper {
588
+ padding: 0;
589
+ }
590
+ :where([type=color])::-webkit-color-swatch {
591
+ border: none;
592
+ border-radius: calc(var(--nc-radius) * 0.5);
593
+ }
594
+ :where(label:has([type=checkbox][role=switch])) {
595
+ display: flex;
596
+ align-items: center;
597
+ gap: 0.5em;
598
+ }
599
+ :where([type=checkbox][role=switch]) {
600
+ appearance: none;
601
+ width: 2.5em;
602
+ height: 1.25em;
603
+ border-radius: 1em;
604
+ background-color: var(--nc-border);
605
+ position: relative;
606
+ cursor: pointer;
607
+ flex-shrink: 0;
608
+ margin: 0;
609
+ transition: background-color 0.2s;
610
+ }
611
+ :where([type=checkbox][role=switch])::before {
612
+ content: "";
613
+ position: absolute;
614
+ top: 2px;
615
+ left: 2px;
616
+ width: calc(1.25em - 4px);
617
+ height: calc(1.25em - 4px);
618
+ border-radius: 50%;
619
+ background-color: #fff;
620
+ transition: transform 0.2s;
621
+ }
622
+ :where([type=checkbox][role=switch]):checked {
623
+ background-color: var(--nc-primary);
624
+ }
625
+ :where([type=checkbox][role=switch]):checked::before {
626
+ transform: translateX(1.25em);
627
+ }
628
+ }
629
+ [type=date],
630
+ [type=month],
631
+ [type=week],
632
+ [type=time],
633
+ [type=datetime-local] {
634
+ -webkit-appearance: none;
635
+ appearance: none;
636
+ }
637
+
638
+ @layer nimble.base {
639
+ :where(table) {
640
+ width: 100%;
641
+ border-collapse: collapse;
642
+ }
643
+ :where(th, td) {
644
+ padding: 0.5em 0.75em;
645
+ border-bottom: 1px solid color-mix(in oklch, var(--nc-border), transparent 40%);
646
+ text-align: start;
647
+ }
648
+ :where(thead th, thead td) {
649
+ font-weight: 600;
650
+ border-bottom-width: 2px;
651
+ background-color: var(--nc-surface-2);
652
+ text-wrap: balance;
653
+ }
654
+ :where(figure:has(table)) {
655
+ overflow-x: auto;
656
+ }
657
+ }
658
+ @layer nimble.base {
659
+ :where(code, kbd, samp) {
660
+ font-family: var(--nc-font-mono);
661
+ font-size: 0.875em;
662
+ background-color: var(--nc-surface-2);
663
+ border-radius: var(--nc-radius);
664
+ padding: 0.15em 0.35em;
665
+ }
666
+ :where(pre) {
667
+ background-color: var(--nc-surface-2);
668
+ border-radius: var(--nc-radius);
669
+ padding: var(--nc-spacing);
670
+ overflow-x: auto;
671
+ }
672
+ :where(pre code) {
673
+ background: none;
674
+ padding: 0;
675
+ font-size: inherit;
676
+ }
677
+ :where(kbd) {
678
+ border: 1px solid var(--nc-border);
679
+ border-bottom-width: 2px;
680
+ }
681
+ }
682
+ @layer nimble.base {
683
+ :where(img, video, canvas, svg) {
684
+ max-width: 100%;
685
+ height: auto;
686
+ }
687
+ :where(figure) {
688
+ margin: 0;
689
+ }
690
+ :where(figcaption) {
691
+ font-size: 0.9em;
692
+ color: color-mix(in oklch, var(--nc-text), transparent 40%);
693
+ margin-top: 0.5em;
694
+ }
695
+ }
696
+ @layer nimble.base {
697
+ :where(article) {
698
+ background-color: var(--nc-surface-1);
699
+ border: 1px solid var(--nc-border);
700
+ border-radius: var(--nc-radius);
701
+ padding: var(--nc-spacing);
702
+ margin-bottom: var(--nc-spacing);
703
+ }
704
+ :where(article > header),
705
+ :where(article > footer) {
706
+ background-color: color-mix(in oklch, var(--nc-surface-1), var(--nc-surface-2) 20%);
707
+ padding: var(--nc-spacing);
708
+ }
709
+ :where(article > header) {
710
+ margin: calc(var(--nc-spacing) * -1) calc(var(--nc-spacing) * -1) var(--nc-spacing);
711
+ border-bottom: 1px solid var(--nc-border);
712
+ border-radius: var(--nc-radius) var(--nc-radius) 0 0;
713
+ }
714
+ :where(article > footer) {
715
+ margin: var(--nc-spacing) calc(var(--nc-spacing) * -1) calc(var(--nc-spacing) * -1);
716
+ border-top: 1px solid var(--nc-border);
717
+ border-radius: 0 0 var(--nc-radius) var(--nc-radius);
718
+ }
719
+ :where(article) > :last-child:not(footer) {
720
+ margin-bottom: 0;
721
+ }
722
+ :where(article > header, article > footer) > :last-child {
723
+ margin-bottom: 0;
724
+ }
725
+ :where(article > header, article > footer) > h1,
726
+ :where(article > header, article > footer) > h2,
727
+ :where(article > header, article > footer) > h3,
728
+ :where(article > header, article > footer) > h4,
729
+ :where(article > header, article > footer) > h5,
730
+ :where(article > header, article > footer) > h6 {
731
+ margin-top: 0;
732
+ margin-bottom: 0;
733
+ }
734
+ }
735
+ @layer nimble.base {
736
+ :where(details) {
737
+ border: 1px solid var(--nc-border);
738
+ border-radius: var(--nc-radius);
739
+ padding: 0 1em;
740
+ }
741
+ :where(details) {
742
+ margin-bottom: 0.5em;
743
+ }
744
+ :where(summary) {
745
+ cursor: pointer;
746
+ font-weight: 600;
747
+ margin: 0 -1em;
748
+ padding: 0.75em 1em;
749
+ list-style-type: "▶ ";
750
+ }
751
+ :where(details[open] > summary) {
752
+ list-style-type: "▼ ";
753
+ }
754
+ :where(details[open]) {
755
+ padding-bottom: 0.75em;
756
+ }
757
+ details :last-child {
758
+ margin-bottom: 0;
759
+ }
760
+ }
761
+ @supports selector(details::details-content) {
762
+ details::details-content {
763
+ transition: opacity 0.3s ease, content-visibility 0.3s ease allow-discrete;
764
+ opacity: 0;
765
+ }
766
+ details[open]::details-content {
767
+ opacity: 1;
768
+ }
769
+ @supports (interpolate-size: allow-keywords) {
770
+ details {
771
+ interpolate-size: allow-keywords;
772
+ }
773
+ details::details-content {
774
+ transition: height 0.3s ease, opacity 0.3s ease, content-visibility 0.3s ease allow-discrete;
775
+ height: 0;
776
+ overflow: clip;
777
+ }
778
+ details[open]::details-content {
779
+ height: auto;
780
+ }
781
+ }
782
+ }
783
+ @layer nimble.base {
784
+ :where(dialog) {
785
+ background-color: var(--nc-surface-4);
786
+ border: 1px solid var(--nc-border);
787
+ border-radius: var(--nc-radius);
788
+ max-width: min(90vw, 40rem);
789
+ padding: var(--nc-spacing);
790
+ }
791
+ dialog::backdrop {
792
+ background: rgba(0, 0, 0, 0.5);
793
+ backdrop-filter: blur(4px);
794
+ animation: nc-backdrop-in 0.2s ease;
795
+ }
796
+ @keyframes nc-backdrop-in {
797
+ from {
798
+ opacity: 0;
799
+ }
800
+ }
801
+ }
802
+ @media print {
803
+ body {
804
+ background: #fff;
805
+ color: #000;
806
+ }
807
+ a[href]::after {
808
+ content: " (" attr(href) ")";
809
+ font-size: 0.85em;
810
+ color: #555;
811
+ }
812
+ a[href^="#"]::after,
813
+ a[href^="javascript:"]::after {
814
+ content: none;
815
+ }
816
+ pre, blockquote {
817
+ page-break-inside: avoid;
818
+ }
819
+ h2, h3, h4 {
820
+ page-break-after: avoid;
821
+ }
822
+ img {
823
+ max-width: 100% !important;
824
+ }
825
+ @page {
826
+ margin: 2cm;
827
+ }
828
+ }
829
+ @layer nimble.utilities {
830
+ .container {
831
+ max-width: var(--nc-content-width);
832
+ margin-inline: auto;
833
+ padding-inline: var(--nc-spacing);
834
+ }
835
+ .fluid {
836
+ display: block;
837
+ max-width: none;
838
+ padding-inline: var(--nc-spacing);
839
+ }
840
+ .full-bleed {
841
+ grid-column: 1/-1;
842
+ }
843
+ .wide {
844
+ grid-column: 1/-1;
845
+ width: 100%;
846
+ max-width: 1200px;
847
+ margin-inline: auto;
848
+ padding-inline: var(--nc-spacing);
849
+ }
850
+ .striped :where(tbody tr:nth-child(even)) {
851
+ background-color: var(--nc-surface-2);
852
+ }
853
+ .visually-hidden {
854
+ position: absolute;
855
+ width: 1px;
856
+ height: 1px;
857
+ padding: 0;
858
+ margin: -1px;
859
+ overflow: hidden;
860
+ clip-path: inset(50%);
861
+ white-space: nowrap;
862
+ border: 0;
863
+ }
864
+ .overflow-auto {
865
+ overflow: auto;
866
+ }
867
+ }