nish-ui 1.8.0 → 1.9.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.
- package/README.md +4 -2
- package/dist/chart.js.map +1 -1
- package/dist/elements-charts.d.ts +53 -2
- package/dist/elements-charts.js +131 -0
- package/dist/elements-charts.js.map +1 -1
- package/dist/elements-data.d.ts +95 -2
- package/dist/elements-data.js +46 -0
- package/dist/elements-data.js.map +1 -1
- package/dist/elements.js +3 -3
- package/dist/elements.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/nish-components.css +1390 -1
- package/dist/theme.d.ts +3 -0
- package/dist/theme.global.js +1 -1
- package/dist/theme.global.js.map +1 -1
- package/dist/theme.js +1 -1
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
package/dist/nish-components.css
CHANGED
|
@@ -2155,6 +2155,15 @@
|
|
|
2155
2155
|
background-color 150ms,
|
|
2156
2156
|
color 150ms;
|
|
2157
2157
|
}
|
|
2158
|
+
/* <nish-section-nav> draws the SectionNav chips: 32px with a mouse, 44px on a touch screen (the Chip). */
|
|
2159
|
+
:where(nish-section-nav) :where(.nish-subnav) > :where(a, button) {
|
|
2160
|
+
min-height: 32px;
|
|
2161
|
+
}
|
|
2162
|
+
@media (pointer: coarse) {
|
|
2163
|
+
:where(nish-section-nav) :where(.nish-subnav) > :where(a, button) {
|
|
2164
|
+
min-height: var(--nish-tap-min, 44px);
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2158
2167
|
:where(.nish-subnav) > :where(a:hover, button:hover) {
|
|
2159
2168
|
background: var(--nish-elevated);
|
|
2160
2169
|
color: var(--nish-hi);
|
|
@@ -2853,6 +2862,47 @@
|
|
|
2853
2862
|
height: 16px;
|
|
2854
2863
|
color: var(--nish-ghost);
|
|
2855
2864
|
}
|
|
2865
|
+
/* MoreSheet: a list straight in a sheet body is the overflow sheet: 8px around the rows, 52px rows with a 24px icon,
|
|
2866
|
+
a medium title and a one-line 12px hint. */
|
|
2867
|
+
:where(.nish-sheet-body > .nish-list) {
|
|
2868
|
+
/* The sheet's 1px border sits outside the body: the rows still span the width the Drawer gives them. */
|
|
2869
|
+
margin-inline: -1px;
|
|
2870
|
+
padding: 8px;
|
|
2871
|
+
}
|
|
2872
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-row) {
|
|
2873
|
+
padding-block: 0;
|
|
2874
|
+
color: var(--nish-hi);
|
|
2875
|
+
}
|
|
2876
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-row[aria-current]:not([aria-current='false'])) {
|
|
2877
|
+
color: var(--nish-accent);
|
|
2878
|
+
}
|
|
2879
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-icon) {
|
|
2880
|
+
position: relative;
|
|
2881
|
+
justify-content: center;
|
|
2882
|
+
width: 24px;
|
|
2883
|
+
height: 24px;
|
|
2884
|
+
}
|
|
2885
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-icon) > :where(svg) {
|
|
2886
|
+
width: 24px;
|
|
2887
|
+
height: 24px;
|
|
2888
|
+
}
|
|
2889
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-title) {
|
|
2890
|
+
color: inherit;
|
|
2891
|
+
font-size: var(--nish-text-sm);
|
|
2892
|
+
font-weight: var(--nish-weight-medium);
|
|
2893
|
+
line-height: 1.25rem;
|
|
2894
|
+
}
|
|
2895
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-subtitle) {
|
|
2896
|
+
display: block;
|
|
2897
|
+
overflow: hidden;
|
|
2898
|
+
font-size: var(--nish-text-xs);
|
|
2899
|
+
line-height: 1rem;
|
|
2900
|
+
text-overflow: ellipsis;
|
|
2901
|
+
white-space: nowrap;
|
|
2902
|
+
}
|
|
2903
|
+
:where(.nish-sheet-body > .nish-list) :where(.nish-list-row[aria-current]:not([aria-current='false'])) :where(.nish-list-subtitle) {
|
|
2904
|
+
color: color-mix(in srgb, var(--nish-accent) 80%, transparent);
|
|
2905
|
+
}
|
|
2856
2906
|
:where(.nish-list-row--compact .nish-list-title) {
|
|
2857
2907
|
font-size: var(--nish-text-2xs);
|
|
2858
2908
|
font-weight: var(--nish-weight-medium);
|
|
@@ -3250,7 +3300,7 @@
|
|
|
3250
3300
|
min-width: var(--nish-tap-min);
|
|
3251
3301
|
min-height: var(--nish-tap-min);
|
|
3252
3302
|
}
|
|
3253
|
-
:where(.nish-tab, .nish-chip) {
|
|
3303
|
+
:where(.nish-tab, .nish-chip, .nish-th-sort) {
|
|
3254
3304
|
min-width: var(--nish-tap-min);
|
|
3255
3305
|
}
|
|
3256
3306
|
:where(span.nish-chip) {
|
|
@@ -3273,3 +3323,1342 @@
|
|
|
3273
3323
|
:where([data-dragging] iframe) {
|
|
3274
3324
|
pointer-events: none;
|
|
3275
3325
|
}
|
|
3326
|
+
|
|
3327
|
+
/* ======================================================================================
|
|
3328
|
+
Wave 3: tables, filter bars, media rows, split panes, the nav rail, scroll rows,
|
|
3329
|
+
settings, the command palette and charts (Stage E).
|
|
3330
|
+
====================================================================================== */
|
|
3331
|
+
|
|
3332
|
+
/* --- Table (.nish-table) ---------------------------------------------------------------
|
|
3333
|
+
The Table, Th, Td, Tr and TableWrap components. Everything sits in .nish-table-wrap,
|
|
3334
|
+
the bordered scroll box (--sticky: header stays while the body scrolls, pair it with
|
|
3335
|
+
--nish-table-max-h; --sticky-first: the first column stays while the table scrolls
|
|
3336
|
+
sideways; --fade: edge fades from data-at-start / data-at-end on the wrap, which a
|
|
3337
|
+
script sets; --nish-table-min is the table's minimum width). Rows are not striped
|
|
3338
|
+
unless the table has --zebra.
|
|
3339
|
+
<div class="nish-table-wrap">
|
|
3340
|
+
<table class="nish-table nish-table--dense nish-table--zebra">
|
|
3341
|
+
<thead><tr>
|
|
3342
|
+
<th class="nish-th" scope="col" aria-sort="none"><button class="nish-th-sort" type="button">Name
|
|
3343
|
+
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true"><path d="M2 4 5 1l3 3" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M2 6l3 3 3-3" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></button></th>
|
|
3344
|
+
<th class="nish-th nish-th--num" scope="col">Size</th>
|
|
3345
|
+
</tr></thead>
|
|
3346
|
+
<tbody>
|
|
3347
|
+
<tr class="nish-tr--interactive nish-tr--ok"><td>Backups</td><td class="nish-td--num">12 GB</td></tr>
|
|
3348
|
+
</tbody>
|
|
3349
|
+
</table>
|
|
3350
|
+
</div>
|
|
3351
|
+
The sort svg is the two arrows of the React Th: the up arrow lights for
|
|
3352
|
+
aria-sort="ascending", the down arrow for "descending", both stay faint for "none".
|
|
3353
|
+
--ok, --warn and --loss draw a 3px status edge on the row's first cell; say the status
|
|
3354
|
+
in a cell too. */
|
|
3355
|
+
:where(.nish-table-wrap) {
|
|
3356
|
+
position: relative;
|
|
3357
|
+
}
|
|
3358
|
+
:where(.nish-table-wrap) > :where(table) {
|
|
3359
|
+
min-width: var(--nish-table-min, 0px);
|
|
3360
|
+
}
|
|
3361
|
+
:where(.nish-table) {
|
|
3362
|
+
width: 100%;
|
|
3363
|
+
margin: 0;
|
|
3364
|
+
border-collapse: collapse;
|
|
3365
|
+
color: var(--nish-hi2);
|
|
3366
|
+
font-size: var(--nish-text-sm);
|
|
3367
|
+
line-height: 1.25rem;
|
|
3368
|
+
font-variant-numeric: tabular-nums;
|
|
3369
|
+
}
|
|
3370
|
+
:where(.nish-table) :where(th, td) {
|
|
3371
|
+
padding: 10px 12px;
|
|
3372
|
+
border-bottom: 1px solid var(--nish-line);
|
|
3373
|
+
text-align: left;
|
|
3374
|
+
vertical-align: middle;
|
|
3375
|
+
}
|
|
3376
|
+
:where(.nish-table) :where(td) {
|
|
3377
|
+
color: inherit;
|
|
3378
|
+
}
|
|
3379
|
+
:where(.nish-table--dense) :where(th, td) {
|
|
3380
|
+
padding-block: 6px;
|
|
3381
|
+
}
|
|
3382
|
+
:where(.nish-table) :where(tbody tr:last-child) > :where(th, td) {
|
|
3383
|
+
border-bottom: 0;
|
|
3384
|
+
}
|
|
3385
|
+
:where(.nish-th) {
|
|
3386
|
+
color: var(--nish-hi3);
|
|
3387
|
+
font-size: var(--nish-text-xs);
|
|
3388
|
+
font-weight: var(--nish-weight-medium);
|
|
3389
|
+
line-height: 1rem;
|
|
3390
|
+
letter-spacing: 0.05em;
|
|
3391
|
+
text-transform: uppercase;
|
|
3392
|
+
white-space: nowrap;
|
|
3393
|
+
}
|
|
3394
|
+
:where(.nish-th--num, .nish-td--num) {
|
|
3395
|
+
text-align: right;
|
|
3396
|
+
white-space: nowrap;
|
|
3397
|
+
font-variant-numeric: tabular-nums;
|
|
3398
|
+
}
|
|
3399
|
+
/* A table in the wrap is not striped unless it asks (the older wrap stripes every table). */
|
|
3400
|
+
:where(.nish-table:not(.nish-table--zebra)) :where(tbody tr:nth-child(even)) {
|
|
3401
|
+
background: transparent;
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3404
|
+
/* The sort button inside a header cell. */
|
|
3405
|
+
:where(.nish-th-sort) {
|
|
3406
|
+
box-sizing: border-box;
|
|
3407
|
+
display: inline-flex;
|
|
3408
|
+
align-items: center;
|
|
3409
|
+
gap: 4px;
|
|
3410
|
+
margin: 0 -4px;
|
|
3411
|
+
padding: 0 4px;
|
|
3412
|
+
border: 0;
|
|
3413
|
+
border-radius: var(--nish-radius-xs);
|
|
3414
|
+
background: transparent;
|
|
3415
|
+
color: inherit;
|
|
3416
|
+
font: inherit;
|
|
3417
|
+
letter-spacing: inherit;
|
|
3418
|
+
text-transform: inherit;
|
|
3419
|
+
cursor: pointer;
|
|
3420
|
+
transition: color 150ms;
|
|
3421
|
+
}
|
|
3422
|
+
:where(.nish-th-sort:hover) {
|
|
3423
|
+
color: var(--nish-hi);
|
|
3424
|
+
}
|
|
3425
|
+
:where(.nish-th-sort:focus-visible) {
|
|
3426
|
+
outline: var(--nish-focus-width, 2px) solid var(--nish-focus, var(--nish-accent));
|
|
3427
|
+
outline-offset: 0;
|
|
3428
|
+
}
|
|
3429
|
+
:where(.nish-th-sort) > :where(svg) {
|
|
3430
|
+
flex-shrink: 0;
|
|
3431
|
+
width: 10px;
|
|
3432
|
+
height: 10px;
|
|
3433
|
+
}
|
|
3434
|
+
:where(.nish-th-sort) :where(path) {
|
|
3435
|
+
opacity: 0.35;
|
|
3436
|
+
}
|
|
3437
|
+
:where([aria-sort='ascending'] .nish-th-sort, [aria-sort='descending'] .nish-th-sort) {
|
|
3438
|
+
color: var(--nish-hi);
|
|
3439
|
+
}
|
|
3440
|
+
:where([aria-sort='ascending'] .nish-th-sort path:nth-of-type(1)) {
|
|
3441
|
+
opacity: 1;
|
|
3442
|
+
}
|
|
3443
|
+
:where([aria-sort='descending'] .nish-th-sort path:nth-of-type(2)) {
|
|
3444
|
+
opacity: 1;
|
|
3445
|
+
}
|
|
3446
|
+
:where(.nish-th--num .nish-th-sort) {
|
|
3447
|
+
flex-direction: row-reverse;
|
|
3448
|
+
}
|
|
3449
|
+
|
|
3450
|
+
/* Wrap modifiers. --sticky (above) pins the header; --sticky-first pins the first column
|
|
3451
|
+
with an opaque fill and a soft edge that shows once the table has scrolled sideways. */
|
|
3452
|
+
:where(.nish-table-wrap--sticky-first) :where(thead tr, tbody tr) {
|
|
3453
|
+
background: var(--nish-surface);
|
|
3454
|
+
}
|
|
3455
|
+
:where(.nish-table-wrap--sticky-first) :where(tr > :first-child) {
|
|
3456
|
+
position: sticky;
|
|
3457
|
+
left: 0;
|
|
3458
|
+
z-index: 10;
|
|
3459
|
+
background: inherit;
|
|
3460
|
+
}
|
|
3461
|
+
:where(.nish-table-wrap--sticky-first) :where(tr > :first-child)::after {
|
|
3462
|
+
content: '';
|
|
3463
|
+
position: absolute;
|
|
3464
|
+
top: 0;
|
|
3465
|
+
bottom: 0;
|
|
3466
|
+
left: 100%;
|
|
3467
|
+
width: 10px;
|
|
3468
|
+
background: linear-gradient(to right, color-mix(in srgb, var(--nish-hi) 14%, transparent), transparent);
|
|
3469
|
+
opacity: 0;
|
|
3470
|
+
transition: opacity 150ms;
|
|
3471
|
+
pointer-events: none;
|
|
3472
|
+
}
|
|
3473
|
+
:where(.nish-table-wrap--sticky-first[data-at-start='false']) :where(tr > :first-child)::after {
|
|
3474
|
+
opacity: 1;
|
|
3475
|
+
}
|
|
3476
|
+
:where(.nish-table--zebra) :where(tbody tr:nth-child(even)) {
|
|
3477
|
+
background: color-mix(in srgb, var(--nish-elevated) 50%, transparent);
|
|
3478
|
+
}
|
|
3479
|
+
/* A pinned column cannot be see-through: the stripe is mixed into the surface instead. */
|
|
3480
|
+
:where(.nish-table-wrap--sticky-first .nish-table--zebra) :where(tbody tr:nth-child(even)) {
|
|
3481
|
+
background: color-mix(in srgb, var(--nish-elevated) 50%, var(--nish-surface));
|
|
3482
|
+
}
|
|
3483
|
+
:where(.nish-table-wrap--fade) {
|
|
3484
|
+
--nish-fade-start: #000;
|
|
3485
|
+
--nish-fade-end: #000;
|
|
3486
|
+
-webkit-mask-image: linear-gradient(to right, var(--nish-fade-start), #000 24px, #000 calc(100% - 24px), var(--nish-fade-end));
|
|
3487
|
+
mask-image: linear-gradient(to right, var(--nish-fade-start), #000 24px, #000 calc(100% - 24px), var(--nish-fade-end));
|
|
3488
|
+
}
|
|
3489
|
+
:where(.nish-table-wrap--fade[data-at-start='false']) {
|
|
3490
|
+
--nish-fade-start: transparent;
|
|
3491
|
+
}
|
|
3492
|
+
:where(.nish-table-wrap--fade[data-at-end='false']) {
|
|
3493
|
+
--nish-fade-end: transparent;
|
|
3494
|
+
}
|
|
3495
|
+
/* With a pinned first column the left fade would wash it out, so only the right edge fades. */
|
|
3496
|
+
:where(.nish-table-wrap--sticky-first.nish-table-wrap--fade[data-at-start='false']) {
|
|
3497
|
+
--nish-fade-start: #000;
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3500
|
+
/* Rows. */
|
|
3501
|
+
:where(.nish-tr--interactive) {
|
|
3502
|
+
cursor: pointer;
|
|
3503
|
+
transition: background-color 150ms;
|
|
3504
|
+
}
|
|
3505
|
+
:where(.nish-tr--interactive:hover, .nish-tr--interactive:focus-within) {
|
|
3506
|
+
background: var(--nish-elevated);
|
|
3507
|
+
}
|
|
3508
|
+
:where(.nish-tr--muted) {
|
|
3509
|
+
color: var(--nish-hi3);
|
|
3510
|
+
}
|
|
3511
|
+
:where(.nish-tr--ok) > :where(:first-child) {
|
|
3512
|
+
box-shadow: inset 3px 0 0 var(--nish-ok-fill);
|
|
3513
|
+
}
|
|
3514
|
+
:where(.nish-tr--warn) > :where(:first-child) {
|
|
3515
|
+
box-shadow: inset 3px 0 0 var(--nish-warn-fill);
|
|
3516
|
+
}
|
|
3517
|
+
:where(.nish-tr--loss) > :where(:first-child) {
|
|
3518
|
+
box-shadow: inset 3px 0 0 var(--nish-loss-fill);
|
|
3519
|
+
}
|
|
3520
|
+
@media (pointer: coarse) {
|
|
3521
|
+
:where(.nish-th-sort) {
|
|
3522
|
+
min-height: var(--nish-tap-min);
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3526
|
+
/* --- Filter bar (.nish-filter-bar) -------------------------------------------------------
|
|
3527
|
+
The FilterBar component: a search box and the filter controls in one wrapping row, extras
|
|
3528
|
+
on the right (-trailing), a result count under it (-summary). <nish-filter-bar> moves
|
|
3529
|
+
-chips into a sheet below its breakpoint and shows .nish-filter-btn; it sets data-compact
|
|
3530
|
+
on the bar then (the search box fills the row). A bar written by hand gets the same
|
|
3531
|
+
search layout below 768px from the media query.
|
|
3532
|
+
<div class="nish-filter-bar">
|
|
3533
|
+
<label class="nish-search nish-filter-bar-search">…</label>
|
|
3534
|
+
<div class="nish-filter-bar-chips"><div class="nish-chips">…</div></div>
|
|
3535
|
+
<div class="nish-filter-bar-trailing"><select class="nish-select">…</select></div>
|
|
3536
|
+
<div class="nish-filter-bar-summary" aria-live="polite">42 jobs</div>
|
|
3537
|
+
</div>
|
|
3538
|
+
On a phone the chips live in a sheet next to a filter button:
|
|
3539
|
+
<button class="nish-btn nish-filter-btn" type="button" aria-haspopup="dialog">
|
|
3540
|
+
<svg …/>Filters <span class="nish-badge nish-badge--accent" aria-label="2 active">2</span></button> */
|
|
3541
|
+
:where(.nish-filter-bar) {
|
|
3542
|
+
box-sizing: border-box;
|
|
3543
|
+
display: flex;
|
|
3544
|
+
flex-wrap: wrap;
|
|
3545
|
+
align-items: center;
|
|
3546
|
+
gap: 8px;
|
|
3547
|
+
}
|
|
3548
|
+
:where(.nish-filter-bar--sticky) {
|
|
3549
|
+
position: sticky;
|
|
3550
|
+
top: var(--nish-header-h, 0px);
|
|
3551
|
+
z-index: var(--nish-z-sticky, 20);
|
|
3552
|
+
padding-block: 8px;
|
|
3553
|
+
border-bottom: 1px solid var(--nish-line);
|
|
3554
|
+
background: var(--nish-bg);
|
|
3555
|
+
}
|
|
3556
|
+
:where(.nish-filter-bar-search) {
|
|
3557
|
+
width: 100%;
|
|
3558
|
+
max-width: 20rem;
|
|
3559
|
+
}
|
|
3560
|
+
/* Inline, the controls are items of the bar's own row. In a sheet they stack. */
|
|
3561
|
+
:where(.nish-filter-bar-chips) {
|
|
3562
|
+
display: flex;
|
|
3563
|
+
flex-direction: column;
|
|
3564
|
+
gap: 16px;
|
|
3565
|
+
}
|
|
3566
|
+
:where(.nish-filter-bar > .nish-filter-bar-chips) {
|
|
3567
|
+
display: contents;
|
|
3568
|
+
}
|
|
3569
|
+
/* The sheet element holds a closed dialog: it must not become a flex item that adds a row gap. */
|
|
3570
|
+
:where(.nish-filter-bar) > :where(nish-sheet) {
|
|
3571
|
+
display: contents;
|
|
3572
|
+
}
|
|
3573
|
+
/* The element hides the Filters button, Clear filters and the count with `hidden`; .nish-btn and .nish-badge set display. */
|
|
3574
|
+
:where(.nish-filter-bar) :where([hidden]) {
|
|
3575
|
+
display: none !important;
|
|
3576
|
+
}
|
|
3577
|
+
:where(.nish-filter-bar-trailing) {
|
|
3578
|
+
display: flex;
|
|
3579
|
+
align-items: center;
|
|
3580
|
+
gap: 8px;
|
|
3581
|
+
margin-left: auto;
|
|
3582
|
+
}
|
|
3583
|
+
/* React's ghost Clear button has no border (the shared ghost keeps a transparent one). */
|
|
3584
|
+
:where(.nish-filter-bar-clear) {
|
|
3585
|
+
border-width: 0;
|
|
3586
|
+
}
|
|
3587
|
+
:where(.nish-filter-bar-summary) {
|
|
3588
|
+
flex: 1 0 100%;
|
|
3589
|
+
color: var(--nish-hi3);
|
|
3590
|
+
font-size: var(--nish-text-sm);
|
|
3591
|
+
line-height: 1.25rem;
|
|
3592
|
+
}
|
|
3593
|
+
:where(.nish-filter-bar-summary:empty) {
|
|
3594
|
+
display: none;
|
|
3595
|
+
}
|
|
3596
|
+
:where(.nish-filter-bar[data-compact="true"]) > :where(.nish-filter-bar-search) {
|
|
3597
|
+
flex: 1 1 10rem;
|
|
3598
|
+
width: auto;
|
|
3599
|
+
min-width: 10rem;
|
|
3600
|
+
max-width: none;
|
|
3601
|
+
}
|
|
3602
|
+
@media (max-width: 767.98px) {
|
|
3603
|
+
:where(.nish-filter-bar) > :where(.nish-filter-bar-search) {
|
|
3604
|
+
flex: 1 1 10rem;
|
|
3605
|
+
width: auto;
|
|
3606
|
+
min-width: 10rem;
|
|
3607
|
+
max-width: none;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
/* The Filters button: the secondary medium Button with a funnel icon and a count badge. */
|
|
3611
|
+
:where(.nish-filter-btn) {
|
|
3612
|
+
box-sizing: border-box;
|
|
3613
|
+
display: inline-flex;
|
|
3614
|
+
flex-shrink: 0;
|
|
3615
|
+
align-items: center;
|
|
3616
|
+
justify-content: center;
|
|
3617
|
+
gap: 8px;
|
|
3618
|
+
height: 36px;
|
|
3619
|
+
min-height: var(--nish-tap-min, 44px);
|
|
3620
|
+
padding: 0 14px;
|
|
3621
|
+
border: 1px solid var(--nish-line-strong);
|
|
3622
|
+
border-radius: var(--nish-radius-sm);
|
|
3623
|
+
background: var(--nish-surface);
|
|
3624
|
+
color: var(--nish-hi);
|
|
3625
|
+
font: inherit;
|
|
3626
|
+
font-size: var(--nish-text-sm);
|
|
3627
|
+
font-weight: var(--nish-weight-medium);
|
|
3628
|
+
line-height: 1.25rem;
|
|
3629
|
+
white-space: nowrap;
|
|
3630
|
+
cursor: pointer;
|
|
3631
|
+
transition:
|
|
3632
|
+
background-color 150ms,
|
|
3633
|
+
border-color 150ms;
|
|
3634
|
+
}
|
|
3635
|
+
:where(.nish-filter-btn:hover) {
|
|
3636
|
+
background: var(--nish-elevated);
|
|
3637
|
+
}
|
|
3638
|
+
:where(.nish-filter-btn:focus-visible) {
|
|
3639
|
+
outline: var(--nish-focus-width, 2px) solid var(--nish-focus, var(--nish-accent));
|
|
3640
|
+
outline-offset: 2px;
|
|
3641
|
+
}
|
|
3642
|
+
:where(.nish-filter-btn) > :where(svg) {
|
|
3643
|
+
flex-shrink: 0;
|
|
3644
|
+
width: 16px;
|
|
3645
|
+
height: 16px;
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
/* --- Media thumb, media row and media chip (.nish-media-*) -------------------------------
|
|
3649
|
+
MediaThumb, MediaRow and MediaChip. The thumb is a fixed box: 16:9 (--wide, the default;
|
|
3650
|
+
72px, 96px from 420px wide, 64px with --sm), or --round or --square (48px, 36px with
|
|
3651
|
+
--sm). Put an <img loading="lazy" alt=""> in it, or an icon svg for the quiet fallback
|
|
3652
|
+
fill. Only https and relative image URLs belong in src.
|
|
3653
|
+
<ul class="nish-list"><li><a class="nish-media-row" href="/v/1">
|
|
3654
|
+
<span class="nish-media-thumb"><img src="/t/1.jpg" alt="" loading="lazy"></span>
|
|
3655
|
+
<span class="nish-list-text">
|
|
3656
|
+
<span class="nish-media-row-title">A long title that wraps to two lines</span>
|
|
3657
|
+
<span class="nish-media-row-meta">Channel name</span>
|
|
3658
|
+
<span class="nish-media-row-detail">12K views</span></span>
|
|
3659
|
+
<span class="nish-list-trailing"><span class="nish-media-row-badges"><span class="nish-badge">New</span></span></span>
|
|
3660
|
+
<svg class="nish-list-chevron" …/>
|
|
3661
|
+
</a></li></ul>
|
|
3662
|
+
The row is an <a>, a <button> or a <div>. --live puts the loss-colored "Live" badge first
|
|
3663
|
+
in .nish-media-row-badges (keep that element, even empty); for "Offline" write a neutral
|
|
3664
|
+
.nish-badge yourself. --dense is a 44px row with a small thumb, --compact is dense with
|
|
3665
|
+
11px titles and 10px meta. The chip is a 44px pill button:
|
|
3666
|
+
<button class="nish-media-chip" type="button"><span class="nish-media-chip-thumb"><img …></span>
|
|
3667
|
+
<span class="nish-media-chip-label">Title</span><span class="nish-media-chip-action">Bring back</span></button> */
|
|
3668
|
+
:where(.nish-media-thumb) {
|
|
3669
|
+
box-sizing: border-box;
|
|
3670
|
+
position: relative;
|
|
3671
|
+
display: flex;
|
|
3672
|
+
flex-shrink: 0;
|
|
3673
|
+
align-items: center;
|
|
3674
|
+
justify-content: center;
|
|
3675
|
+
width: 72px;
|
|
3676
|
+
aspect-ratio: 16 / 9;
|
|
3677
|
+
overflow: hidden;
|
|
3678
|
+
border-radius: var(--nish-radius-sm);
|
|
3679
|
+
background: var(--nish-elevated);
|
|
3680
|
+
color: var(--nish-hi3);
|
|
3681
|
+
}
|
|
3682
|
+
@media (min-width: 420px) {
|
|
3683
|
+
:where(.nish-media-thumb) {
|
|
3684
|
+
width: 96px;
|
|
3685
|
+
}
|
|
3686
|
+
}
|
|
3687
|
+
:where(.nish-media-thumb--sm) {
|
|
3688
|
+
width: 64px;
|
|
3689
|
+
}
|
|
3690
|
+
:where(.nish-media-thumb--round, .nish-media-thumb--square) {
|
|
3691
|
+
width: 48px;
|
|
3692
|
+
height: 48px;
|
|
3693
|
+
aspect-ratio: auto;
|
|
3694
|
+
}
|
|
3695
|
+
:where(.nish-media-thumb--round) {
|
|
3696
|
+
border-radius: 9999px;
|
|
3697
|
+
}
|
|
3698
|
+
:where(.nish-media-thumb--round.nish-media-thumb--sm, .nish-media-thumb--square.nish-media-thumb--sm) {
|
|
3699
|
+
width: 36px;
|
|
3700
|
+
height: 36px;
|
|
3701
|
+
}
|
|
3702
|
+
:where(.nish-media-thumb) > :where(img) {
|
|
3703
|
+
display: block;
|
|
3704
|
+
width: 100%;
|
|
3705
|
+
height: 100%;
|
|
3706
|
+
object-fit: cover;
|
|
3707
|
+
}
|
|
3708
|
+
:where(.nish-media-thumb) > :where(svg) {
|
|
3709
|
+
width: 20px;
|
|
3710
|
+
height: 20px;
|
|
3711
|
+
}
|
|
3712
|
+
|
|
3713
|
+
:where(.nish-media-row) {
|
|
3714
|
+
box-sizing: border-box;
|
|
3715
|
+
display: flex;
|
|
3716
|
+
align-items: center;
|
|
3717
|
+
gap: 12px;
|
|
3718
|
+
width: 100%;
|
|
3719
|
+
min-height: 52px;
|
|
3720
|
+
margin: 0;
|
|
3721
|
+
padding: 8px 12px;
|
|
3722
|
+
border: 0;
|
|
3723
|
+
border-radius: var(--nish-radius-sm);
|
|
3724
|
+
background: transparent;
|
|
3725
|
+
color: inherit;
|
|
3726
|
+
font: inherit;
|
|
3727
|
+
line-height: 1.5;
|
|
3728
|
+
text-align: left;
|
|
3729
|
+
text-decoration: none;
|
|
3730
|
+
}
|
|
3731
|
+
:where(a.nish-media-row, button.nish-media-row) {
|
|
3732
|
+
cursor: pointer;
|
|
3733
|
+
transition: background-color 150ms;
|
|
3734
|
+
}
|
|
3735
|
+
:where(a.nish-media-row:hover, button.nish-media-row:hover) {
|
|
3736
|
+
background: var(--nish-elevated);
|
|
3737
|
+
}
|
|
3738
|
+
:where(a.nish-media-row:focus-visible, button.nish-media-row:focus-visible) {
|
|
3739
|
+
outline: 2px solid var(--nish-accent);
|
|
3740
|
+
outline-offset: -2px;
|
|
3741
|
+
}
|
|
3742
|
+
:where(.nish-media-row[aria-current]:not([aria-current='false'])) {
|
|
3743
|
+
background: var(--nish-accent-soft);
|
|
3744
|
+
}
|
|
3745
|
+
:where(.nish-media-row--dense, .nish-media-row--compact) {
|
|
3746
|
+
min-height: 44px;
|
|
3747
|
+
}
|
|
3748
|
+
:where(.nish-media-row--compact) {
|
|
3749
|
+
gap: 10px;
|
|
3750
|
+
padding-block: 6px;
|
|
3751
|
+
}
|
|
3752
|
+
/* Dense and compact rows take the small thumb. */
|
|
3753
|
+
:where(.nish-media-row--dense, .nish-media-row--compact) :where(.nish-media-thumb) {
|
|
3754
|
+
width: 64px;
|
|
3755
|
+
}
|
|
3756
|
+
:where(.nish-media-row--dense, .nish-media-row--compact) :where(.nish-media-thumb--round, .nish-media-thumb--square) {
|
|
3757
|
+
width: 36px;
|
|
3758
|
+
height: 36px;
|
|
3759
|
+
}
|
|
3760
|
+
:where(.nish-media-row-title) {
|
|
3761
|
+
display: -webkit-box;
|
|
3762
|
+
-webkit-box-orient: vertical;
|
|
3763
|
+
-webkit-line-clamp: 2;
|
|
3764
|
+
line-clamp: 2;
|
|
3765
|
+
overflow: hidden;
|
|
3766
|
+
overflow-wrap: break-word;
|
|
3767
|
+
color: var(--nish-hi);
|
|
3768
|
+
}
|
|
3769
|
+
:where(.nish-media-row--compact .nish-media-row-title) {
|
|
3770
|
+
font-size: var(--nish-text-2xs);
|
|
3771
|
+
font-weight: var(--nish-weight-medium);
|
|
3772
|
+
line-height: 1.375;
|
|
3773
|
+
}
|
|
3774
|
+
:where(.nish-media-row-meta, .nish-media-row-detail) {
|
|
3775
|
+
display: block;
|
|
3776
|
+
overflow: hidden;
|
|
3777
|
+
color: var(--nish-hi3);
|
|
3778
|
+
text-overflow: ellipsis;
|
|
3779
|
+
white-space: nowrap;
|
|
3780
|
+
}
|
|
3781
|
+
:where(.nish-media-row-meta) {
|
|
3782
|
+
font-size: var(--nish-text-sm);
|
|
3783
|
+
line-height: 1.25rem;
|
|
3784
|
+
}
|
|
3785
|
+
:where(.nish-media-row-detail) {
|
|
3786
|
+
font-size: var(--nish-text-xs);
|
|
3787
|
+
line-height: 1rem;
|
|
3788
|
+
}
|
|
3789
|
+
:where(.nish-media-row--compact .nish-media-row-meta, .nish-media-row--compact .nish-media-row-detail) {
|
|
3790
|
+
font-size: var(--nish-text-3xs);
|
|
3791
|
+
line-height: 0.9rem;
|
|
3792
|
+
}
|
|
3793
|
+
:where(.nish-media-row--compact .nish-media-row-title + *) {
|
|
3794
|
+
margin-top: 2px;
|
|
3795
|
+
}
|
|
3796
|
+
:where(.nish-media-row) :where(.nish-list-trailing) {
|
|
3797
|
+
gap: 8px;
|
|
3798
|
+
}
|
|
3799
|
+
:where(.nish-media-row--compact .nish-list-chevron) {
|
|
3800
|
+
width: 13px;
|
|
3801
|
+
height: 13px;
|
|
3802
|
+
}
|
|
3803
|
+
:where(.nish-media-row-badges) {
|
|
3804
|
+
display: flex;
|
|
3805
|
+
flex-direction: column;
|
|
3806
|
+
align-items: flex-end;
|
|
3807
|
+
gap: 4px;
|
|
3808
|
+
}
|
|
3809
|
+
:where(.nish-media-row--live .nish-media-row-badges)::before {
|
|
3810
|
+
content: 'Live';
|
|
3811
|
+
box-sizing: border-box;
|
|
3812
|
+
padding: 2px 8px;
|
|
3813
|
+
border: 1px solid color-mix(in srgb, var(--nish-loss) 30%, transparent);
|
|
3814
|
+
border-radius: var(--nish-radius-pill);
|
|
3815
|
+
background: var(--nish-loss-soft);
|
|
3816
|
+
color: var(--nish-loss);
|
|
3817
|
+
font-size: var(--nish-text-xs);
|
|
3818
|
+
font-weight: var(--nish-weight-medium);
|
|
3819
|
+
line-height: 1rem;
|
|
3820
|
+
white-space: nowrap;
|
|
3821
|
+
}
|
|
3822
|
+
:where(.nish-media-row--dense.nish-media-row--live .nish-media-row-badges, .nish-media-row--compact.nish-media-row--live .nish-media-row-badges)::before {
|
|
3823
|
+
padding: 0 6px;
|
|
3824
|
+
font-size: var(--nish-text-3xs, 0.625rem);
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
:where(.nish-media-chip) {
|
|
3828
|
+
box-sizing: border-box;
|
|
3829
|
+
display: inline-flex;
|
|
3830
|
+
max-width: 100%;
|
|
3831
|
+
height: 44px;
|
|
3832
|
+
align-items: center;
|
|
3833
|
+
gap: 8px;
|
|
3834
|
+
padding: 0 16px 0 4px;
|
|
3835
|
+
border: 1px solid var(--nish-line);
|
|
3836
|
+
border-radius: 9999px;
|
|
3837
|
+
background: var(--nish-surface);
|
|
3838
|
+
color: var(--nish-hi);
|
|
3839
|
+
font: inherit;
|
|
3840
|
+
font-size: var(--nish-text-sm);
|
|
3841
|
+
line-height: 1.25rem;
|
|
3842
|
+
cursor: pointer;
|
|
3843
|
+
transition: background-color 150ms;
|
|
3844
|
+
}
|
|
3845
|
+
:where(.nish-media-chip:hover) {
|
|
3846
|
+
background: var(--nish-elevated);
|
|
3847
|
+
}
|
|
3848
|
+
:where(.nish-media-chip:focus-visible) {
|
|
3849
|
+
outline: 2px solid var(--nish-accent);
|
|
3850
|
+
outline-offset: 2px;
|
|
3851
|
+
}
|
|
3852
|
+
:where(.nish-media-chip-thumb) {
|
|
3853
|
+
display: block;
|
|
3854
|
+
flex-shrink: 0;
|
|
3855
|
+
width: 40px;
|
|
3856
|
+
aspect-ratio: 16 / 9;
|
|
3857
|
+
overflow: hidden;
|
|
3858
|
+
border-radius: var(--nish-radius-sm);
|
|
3859
|
+
background: var(--nish-elevated);
|
|
3860
|
+
}
|
|
3861
|
+
:where(.nish-media-chip-thumb) > :where(img) {
|
|
3862
|
+
display: block;
|
|
3863
|
+
width: 100%;
|
|
3864
|
+
height: 100%;
|
|
3865
|
+
object-fit: cover;
|
|
3866
|
+
}
|
|
3867
|
+
:where(.nish-media-chip-label) {
|
|
3868
|
+
min-width: 0;
|
|
3869
|
+
max-width: 14rem;
|
|
3870
|
+
overflow: hidden;
|
|
3871
|
+
text-overflow: ellipsis;
|
|
3872
|
+
white-space: nowrap;
|
|
3873
|
+
}
|
|
3874
|
+
:where(.nish-media-chip-action) {
|
|
3875
|
+
flex-shrink: 0;
|
|
3876
|
+
color: var(--nish-accent);
|
|
3877
|
+
}
|
|
3878
|
+
|
|
3879
|
+
/* --- Split panes (.nish-split) -------------------------------------------------------------
|
|
3880
|
+
<nish-split> draws it; by hand, panes share the room by --nish-split-size (a number, the
|
|
3881
|
+
pane's share; default 1) and a divider (role="separator", tabindex="0") sits between each
|
|
3882
|
+
pair. --v dividers are vertical bars between side-by-side panes (the default); --h dividers
|
|
3883
|
+
are horizontal bars between stacked panes, and --h on the .nish-split (or
|
|
3884
|
+
data-orientation="column") stacks them. The divider is the 4px gap itself; a 24px hit area
|
|
3885
|
+
(44px on touch) reaches past it, and the accent bar shows on hover, focus and drag.
|
|
3886
|
+
Nest a .nish-split in a pane for 2D layouts. Under 640px on a touch screen the panes stack
|
|
3887
|
+
at --nish-split-stack-h tall and the dividers hide.
|
|
3888
|
+
<div class="nish-split" style="height: 320px">
|
|
3889
|
+
<div class="nish-split-pane" style="--nish-split-size: 50">…</div>
|
|
3890
|
+
<div class="nish-split-divider nish-split-divider--v" role="separator" aria-orientation="vertical" tabindex="0"></div>
|
|
3891
|
+
<div class="nish-split-pane" style="--nish-split-size: 50">…</div>
|
|
3892
|
+
</div> */
|
|
3893
|
+
:where(.nish-split) {
|
|
3894
|
+
box-sizing: border-box;
|
|
3895
|
+
position: relative;
|
|
3896
|
+
display: flex;
|
|
3897
|
+
width: 100%;
|
|
3898
|
+
height: 100%;
|
|
3899
|
+
min-width: 0;
|
|
3900
|
+
min-height: 0;
|
|
3901
|
+
overflow: hidden;
|
|
3902
|
+
}
|
|
3903
|
+
:where(.nish-split--h, .nish-split[data-orientation='column']) {
|
|
3904
|
+
flex-direction: column;
|
|
3905
|
+
}
|
|
3906
|
+
:where(.nish-split[data-dragging]) {
|
|
3907
|
+
user-select: none;
|
|
3908
|
+
}
|
|
3909
|
+
:where(.nish-split-pane) {
|
|
3910
|
+
box-sizing: border-box;
|
|
3911
|
+
position: relative;
|
|
3912
|
+
flex: var(--nish-split-size, 1) 1 0%;
|
|
3913
|
+
min-width: 0;
|
|
3914
|
+
min-height: 0;
|
|
3915
|
+
overflow: hidden;
|
|
3916
|
+
}
|
|
3917
|
+
:where(.nish-split-pane) > :where(.nish-split) {
|
|
3918
|
+
width: 100%;
|
|
3919
|
+
height: 100%;
|
|
3920
|
+
}
|
|
3921
|
+
:where(.nish-split-divider) {
|
|
3922
|
+
box-sizing: border-box;
|
|
3923
|
+
position: relative;
|
|
3924
|
+
z-index: 20;
|
|
3925
|
+
flex: 0 0 4px;
|
|
3926
|
+
border-radius: 9999px;
|
|
3927
|
+
background: transparent;
|
|
3928
|
+
outline: none;
|
|
3929
|
+
cursor: col-resize;
|
|
3930
|
+
touch-action: none;
|
|
3931
|
+
transition: background-color 150ms;
|
|
3932
|
+
}
|
|
3933
|
+
:where(.nish-split-divider)::before {
|
|
3934
|
+
content: '';
|
|
3935
|
+
position: absolute;
|
|
3936
|
+
inset: 0 -10px;
|
|
3937
|
+
}
|
|
3938
|
+
:where(.nish-split-divider--h) {
|
|
3939
|
+
cursor: row-resize;
|
|
3940
|
+
}
|
|
3941
|
+
:where(.nish-split-divider--h)::before {
|
|
3942
|
+
inset: -10px 0;
|
|
3943
|
+
}
|
|
3944
|
+
:where(.nish-split-divider:hover, .nish-split-divider:focus-visible, .nish-split-divider:active, .nish-split-divider[data-dragging]) {
|
|
3945
|
+
background: var(--nish-accent);
|
|
3946
|
+
}
|
|
3947
|
+
@media (pointer: coarse) {
|
|
3948
|
+
:where(.nish-split-divider)::before {
|
|
3949
|
+
inset: 0 -20px;
|
|
3950
|
+
}
|
|
3951
|
+
:where(.nish-split-divider--h)::before {
|
|
3952
|
+
inset: -20px 0;
|
|
3953
|
+
}
|
|
3954
|
+
}
|
|
3955
|
+
@media (max-width: 639.98px) and (pointer: coarse) {
|
|
3956
|
+
:where(.nish-split) {
|
|
3957
|
+
flex-direction: column;
|
|
3958
|
+
height: auto;
|
|
3959
|
+
overflow-y: auto;
|
|
3960
|
+
}
|
|
3961
|
+
:where(.nish-split-pane) {
|
|
3962
|
+
flex: none;
|
|
3963
|
+
min-height: var(--nish-split-stack-h, 16rem);
|
|
3964
|
+
}
|
|
3965
|
+
:where(.nish-split-divider) {
|
|
3966
|
+
display: none;
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
/* --- Nav rail (.nish-nav-rail) --------------------------------------------------------------
|
|
3971
|
+
The NavRail component: a 72px icon rail for the range between the phone bottom nav and a
|
|
3972
|
+
sidebar. It shows from 768px and hides again from 1024px, like the React default; --always
|
|
3973
|
+
keeps it at every width and --wide keeps it from 1024px on. The current page's link has
|
|
3974
|
+
aria-current="page" (<nish-nav-rail> sets it): the icon sits in a tinted pill.
|
|
3975
|
+
<nav class="nish-nav-rail" aria-label="Sections">
|
|
3976
|
+
<a class="nish-nav-rail-item" href="/" aria-current="page"><svg …/><span>Home</span></a>
|
|
3977
|
+
<a class="nish-nav-rail-item" href="/trips"><svg …/><span>Trips</span></a>
|
|
3978
|
+
<div class="nish-nav-rail-tools"><a class="nish-nav-rail-item" href="/search"><svg …/><span>Search</span></a></div>
|
|
3979
|
+
<div class="nish-nav-rail-footer"><button class="nish-theme-btn" …></button></div>
|
|
3980
|
+
</nav>
|
|
3981
|
+
-tools draws the divider line above itself. */
|
|
3982
|
+
:where(.nish-nav-rail) {
|
|
3983
|
+
box-sizing: border-box;
|
|
3984
|
+
display: none;
|
|
3985
|
+
flex-shrink: 0;
|
|
3986
|
+
flex-direction: column;
|
|
3987
|
+
align-items: center;
|
|
3988
|
+
gap: 4px;
|
|
3989
|
+
width: 72px;
|
|
3990
|
+
padding: 12px 0 12px env(safe-area-inset-left);
|
|
3991
|
+
border-right: 1px solid var(--nish-line);
|
|
3992
|
+
background: var(--nish-surface);
|
|
3993
|
+
}
|
|
3994
|
+
@media (min-width: 768px) and (max-width: 1023.98px) {
|
|
3995
|
+
:where(.nish-nav-rail) {
|
|
3996
|
+
display: flex;
|
|
3997
|
+
}
|
|
3998
|
+
}
|
|
3999
|
+
@media (min-width: 1024px) {
|
|
4000
|
+
:where(.nish-nav-rail--wide) {
|
|
4001
|
+
display: flex;
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
:where(.nish-nav-rail--always) {
|
|
4005
|
+
display: flex;
|
|
4006
|
+
}
|
|
4007
|
+
:where(.nish-nav-rail-item) {
|
|
4008
|
+
box-sizing: border-box;
|
|
4009
|
+
display: flex;
|
|
4010
|
+
flex-direction: column;
|
|
4011
|
+
align-items: center;
|
|
4012
|
+
justify-content: center;
|
|
4013
|
+
gap: 2px;
|
|
4014
|
+
width: 100%;
|
|
4015
|
+
min-height: 56px;
|
|
4016
|
+
margin: 0;
|
|
4017
|
+
padding: 0;
|
|
4018
|
+
border: 0;
|
|
4019
|
+
background: transparent;
|
|
4020
|
+
color: var(--nish-hi3);
|
|
4021
|
+
font: inherit;
|
|
4022
|
+
font-size: var(--nish-text-2xs);
|
|
4023
|
+
line-height: 1.25;
|
|
4024
|
+
text-decoration: none;
|
|
4025
|
+
cursor: pointer;
|
|
4026
|
+
-webkit-tap-highlight-color: transparent;
|
|
4027
|
+
}
|
|
4028
|
+
:where(.nish-nav-rail-item:hover) {
|
|
4029
|
+
color: var(--nish-hi);
|
|
4030
|
+
}
|
|
4031
|
+
:where(.nish-nav-rail-item:focus-visible) {
|
|
4032
|
+
outline: var(--nish-focus-width, 2px) solid var(--nish-focus, var(--nish-accent));
|
|
4033
|
+
outline-offset: -2px;
|
|
4034
|
+
}
|
|
4035
|
+
/* The icon sits in a 56x32 pill. */
|
|
4036
|
+
:where(.nish-nav-rail-item) > :where(svg) {
|
|
4037
|
+
box-sizing: content-box;
|
|
4038
|
+
flex-shrink: 0;
|
|
4039
|
+
width: 24px;
|
|
4040
|
+
height: 24px;
|
|
4041
|
+
padding: 4px 16px;
|
|
4042
|
+
border-radius: 9999px;
|
|
4043
|
+
transition: background-color 150ms;
|
|
4044
|
+
}
|
|
4045
|
+
:where(.nish-nav-rail-item:hover) > :where(svg) {
|
|
4046
|
+
background: var(--nish-elevated);
|
|
4047
|
+
}
|
|
4048
|
+
:where(.nish-nav-rail-item) > :where(span) {
|
|
4049
|
+
max-width: 100%;
|
|
4050
|
+
overflow: hidden;
|
|
4051
|
+
padding: 0 4px;
|
|
4052
|
+
text-overflow: ellipsis;
|
|
4053
|
+
white-space: nowrap;
|
|
4054
|
+
}
|
|
4055
|
+
:where(.nish-nav-rail-item[aria-current='page']) {
|
|
4056
|
+
color: var(--nish-accent);
|
|
4057
|
+
font-weight: var(--nish-weight-medium);
|
|
4058
|
+
}
|
|
4059
|
+
:where(.nish-nav-rail-item[aria-current='page']) > :where(svg) {
|
|
4060
|
+
background: var(--nish-accent-soft);
|
|
4061
|
+
}
|
|
4062
|
+
:where(.nish-nav-rail-tools) {
|
|
4063
|
+
display: flex;
|
|
4064
|
+
flex-direction: column;
|
|
4065
|
+
align-items: center;
|
|
4066
|
+
gap: 4px;
|
|
4067
|
+
width: 100%;
|
|
4068
|
+
}
|
|
4069
|
+
:where(.nish-nav-rail-tools)::before {
|
|
4070
|
+
content: '';
|
|
4071
|
+
flex-shrink: 0;
|
|
4072
|
+
width: 32px;
|
|
4073
|
+
height: 1px;
|
|
4074
|
+
margin-block: 4px;
|
|
4075
|
+
background: var(--nish-line);
|
|
4076
|
+
}
|
|
4077
|
+
:where(.nish-nav-rail-footer) {
|
|
4078
|
+
display: flex;
|
|
4079
|
+
flex-direction: column;
|
|
4080
|
+
align-items: center;
|
|
4081
|
+
gap: 8px;
|
|
4082
|
+
margin-top: auto;
|
|
4083
|
+
padding-top: 12px;
|
|
4084
|
+
}
|
|
4085
|
+
|
|
4086
|
+
/* --- Scroll row (.nish-scroll-row) -----------------------------------------------------------
|
|
4087
|
+
The ScrollRow component: one horizontally scrolling row (chips, filters, tabs) with no
|
|
4088
|
+
scrollbar. <nish-scroll-row> sets data-at-start / data-at-end on scroll; the edge that
|
|
4089
|
+
has more content fades (without them nothing fades). --bleed runs the row to the screen
|
|
4090
|
+
edges inside a padded page, --snap snaps children to the start.
|
|
4091
|
+
<div class="nish-scroll-row nish-scroll-row--bleed" aria-label="Topics">
|
|
4092
|
+
<button class="nish-chip">All</button><button class="nish-chip">Guides</button>…
|
|
4093
|
+
</div> */
|
|
4094
|
+
:where(.nish-scroll-row) {
|
|
4095
|
+
--nish-fade-start: #000;
|
|
4096
|
+
--nish-fade-end: #000;
|
|
4097
|
+
display: flex;
|
|
4098
|
+
gap: 8px;
|
|
4099
|
+
overflow-x: auto;
|
|
4100
|
+
scrollbar-width: none;
|
|
4101
|
+
-webkit-mask-image: linear-gradient(to right, var(--nish-fade-start), #000 24px, #000 calc(100% - 24px), var(--nish-fade-end));
|
|
4102
|
+
mask-image: linear-gradient(to right, var(--nish-fade-start), #000 24px, #000 calc(100% - 24px), var(--nish-fade-end));
|
|
4103
|
+
}
|
|
4104
|
+
:where(.nish-scroll-row)::-webkit-scrollbar {
|
|
4105
|
+
display: none;
|
|
4106
|
+
}
|
|
4107
|
+
:where(.nish-scroll-row[data-at-start='false']) {
|
|
4108
|
+
--nish-fade-start: transparent;
|
|
4109
|
+
}
|
|
4110
|
+
:where(.nish-scroll-row[data-at-end='false']) {
|
|
4111
|
+
--nish-fade-end: transparent;
|
|
4112
|
+
}
|
|
4113
|
+
:where(.nish-scroll-row--bleed) {
|
|
4114
|
+
margin-inline: calc(var(--nish-page-gutter) * -1);
|
|
4115
|
+
padding-inline: var(--nish-page-gutter);
|
|
4116
|
+
}
|
|
4117
|
+
:where(.nish-scroll-row--snap) {
|
|
4118
|
+
scroll-snap-type: x mandatory;
|
|
4119
|
+
}
|
|
4120
|
+
:where(.nish-scroll-row--snap) > :where(*) {
|
|
4121
|
+
scroll-snap-align: start;
|
|
4122
|
+
}
|
|
4123
|
+
/* Children keep their width; the row scrolls instead of squashing them. */
|
|
4124
|
+
:where(.nish-scroll-row) > :where(*) {
|
|
4125
|
+
flex-shrink: 0;
|
|
4126
|
+
}
|
|
4127
|
+
/* fade="false" on <nish-scroll-row>: no edge fade. */
|
|
4128
|
+
:where(.nish-scroll-row--no-fade) {
|
|
4129
|
+
-webkit-mask-image: none;
|
|
4130
|
+
mask-image: none;
|
|
4131
|
+
}
|
|
4132
|
+
|
|
4133
|
+
/* --- Settings (.nish-settings-section, .nish-setting-row) --------------------------------------
|
|
4134
|
+
SettingsSection and SettingRow: a titled group of label-and-control rows in one card,
|
|
4135
|
+
divided by lines. --compact on the section is the dense form for modals, sheets and side
|
|
4136
|
+
panels (a small heading, no card, rows divided by lines); its rows are compact too.
|
|
4137
|
+
A row is stacked under 640px and side by side from there; --inline keeps the control at
|
|
4138
|
+
the end of the label row at every width (a switch or checkbox), --stacked puts it under
|
|
4139
|
+
the label at every width (a wide control), --compact is a 44px row with the label beside
|
|
4140
|
+
the control at every width.
|
|
4141
|
+
<section class="nish-settings-section" aria-labelledby="s1">
|
|
4142
|
+
<div class="nish-settings-section-header">
|
|
4143
|
+
<div><h2 class="nish-settings-section-title" id="s1">Notifications</h2>
|
|
4144
|
+
<p class="nish-settings-section-description">Where alerts go.</p></div>
|
|
4145
|
+
<div class="nish-settings-section-actions"><button class="nish-btn nish-btn--sm">Reset</button></div>
|
|
4146
|
+
</div>
|
|
4147
|
+
<div class="nish-settings-section-body">
|
|
4148
|
+
<div class="nish-setting-row nish-setting-row--inline">
|
|
4149
|
+
<div><label class="nish-setting-row-label" for="push">Push</label>
|
|
4150
|
+
<p class="nish-setting-row-description">On this phone.</p></div>
|
|
4151
|
+
<div class="nish-setting-row-control">
|
|
4152
|
+
<button class="nish-switch" role="switch" aria-checked="true" id="push"></button>
|
|
4153
|
+
<span class="nish-setting-row-status nish-setting-row-status--ok" role="status">Saved</span></div>
|
|
4154
|
+
</div>
|
|
4155
|
+
</div>
|
|
4156
|
+
</section>
|
|
4157
|
+
-status is hidden while empty; --error and --ok color it. */
|
|
4158
|
+
:where(.nish-settings-section) {
|
|
4159
|
+
box-sizing: border-box;
|
|
4160
|
+
min-width: 0;
|
|
4161
|
+
}
|
|
4162
|
+
:where(.nish-settings-section-header) {
|
|
4163
|
+
display: flex;
|
|
4164
|
+
flex-wrap: wrap;
|
|
4165
|
+
align-items: flex-end;
|
|
4166
|
+
justify-content: space-between;
|
|
4167
|
+
gap: 8px 16px;
|
|
4168
|
+
margin-bottom: 12px;
|
|
4169
|
+
}
|
|
4170
|
+
:where(.nish-settings-section-header) > :where(:first-child) {
|
|
4171
|
+
min-width: 0;
|
|
4172
|
+
}
|
|
4173
|
+
:where(.nish-settings-section-title) {
|
|
4174
|
+
margin: 0;
|
|
4175
|
+
color: var(--nish-hi);
|
|
4176
|
+
font-size: var(--nish-text-base);
|
|
4177
|
+
font-weight: var(--nish-weight-semibold);
|
|
4178
|
+
line-height: 1.5rem;
|
|
4179
|
+
}
|
|
4180
|
+
:where(.nish-settings-section-description) {
|
|
4181
|
+
margin: 2px 0 0;
|
|
4182
|
+
color: var(--nish-hi3);
|
|
4183
|
+
font-size: var(--nish-text-sm);
|
|
4184
|
+
line-height: 1.25rem;
|
|
4185
|
+
}
|
|
4186
|
+
:where(.nish-settings-section-actions) {
|
|
4187
|
+
display: flex;
|
|
4188
|
+
flex-shrink: 0;
|
|
4189
|
+
align-items: center;
|
|
4190
|
+
gap: 8px;
|
|
4191
|
+
}
|
|
4192
|
+
:where(.nish-settings-section-body) {
|
|
4193
|
+
box-sizing: border-box;
|
|
4194
|
+
border: 1px solid var(--nish-line);
|
|
4195
|
+
border-radius: var(--nish-radius-card, 12px);
|
|
4196
|
+
background: var(--nish-surface);
|
|
4197
|
+
box-shadow: var(--nish-shadow-card);
|
|
4198
|
+
}
|
|
4199
|
+
:where(.nish-settings-section-body) > :where(* + *) {
|
|
4200
|
+
border-top: 1px solid var(--nish-line);
|
|
4201
|
+
}
|
|
4202
|
+
:where(.nish-settings-section--compact) > :where(.nish-settings-section-header) {
|
|
4203
|
+
margin-bottom: 4px;
|
|
4204
|
+
}
|
|
4205
|
+
:where(.nish-settings-section--compact .nish-settings-section-title) {
|
|
4206
|
+
color: var(--nish-hi2);
|
|
4207
|
+
font-size: var(--nish-text-sm);
|
|
4208
|
+
line-height: 1.25rem;
|
|
4209
|
+
}
|
|
4210
|
+
:where(.nish-settings-section--compact .nish-settings-section-description) {
|
|
4211
|
+
font-size: var(--nish-text-xs);
|
|
4212
|
+
line-height: 1rem;
|
|
4213
|
+
}
|
|
4214
|
+
:where(.nish-settings-section--compact .nish-settings-section-body) {
|
|
4215
|
+
border: 0;
|
|
4216
|
+
border-radius: 0;
|
|
4217
|
+
background: transparent;
|
|
4218
|
+
box-shadow: none;
|
|
4219
|
+
}
|
|
4220
|
+
|
|
4221
|
+
:where(.nish-setting-row) {
|
|
4222
|
+
box-sizing: border-box;
|
|
4223
|
+
display: flex;
|
|
4224
|
+
flex-direction: column;
|
|
4225
|
+
gap: 8px;
|
|
4226
|
+
min-height: 56px;
|
|
4227
|
+
padding: 12px 16px;
|
|
4228
|
+
}
|
|
4229
|
+
:where(.nish-setting-row) > :where(:first-child) {
|
|
4230
|
+
min-width: 0;
|
|
4231
|
+
}
|
|
4232
|
+
:where(.nish-setting-row-label) {
|
|
4233
|
+
display: block;
|
|
4234
|
+
color: var(--nish-hi);
|
|
4235
|
+
font-size: var(--nish-text-sm);
|
|
4236
|
+
font-weight: var(--nish-weight-medium);
|
|
4237
|
+
line-height: 1.25rem;
|
|
4238
|
+
}
|
|
4239
|
+
:where(.nish-setting-row-description) {
|
|
4240
|
+
margin: 2px 0 0;
|
|
4241
|
+
color: var(--nish-hi3);
|
|
4242
|
+
font-size: var(--nish-text-sm);
|
|
4243
|
+
line-height: 1.25rem;
|
|
4244
|
+
}
|
|
4245
|
+
:where(.nish-setting-row-control) {
|
|
4246
|
+
display: flex;
|
|
4247
|
+
min-width: 0;
|
|
4248
|
+
align-items: center;
|
|
4249
|
+
gap: 8px;
|
|
4250
|
+
width: 100%;
|
|
4251
|
+
}
|
|
4252
|
+
:where(.nish-setting-row-status) {
|
|
4253
|
+
flex-shrink: 0;
|
|
4254
|
+
color: var(--nish-hi3);
|
|
4255
|
+
font-size: var(--nish-text-sm);
|
|
4256
|
+
line-height: 1.25rem;
|
|
4257
|
+
}
|
|
4258
|
+
:where(.nish-setting-row-status:empty) {
|
|
4259
|
+
display: none;
|
|
4260
|
+
}
|
|
4261
|
+
:where(.nish-setting-row-status--error) {
|
|
4262
|
+
color: var(--nish-loss);
|
|
4263
|
+
}
|
|
4264
|
+
:where(.nish-setting-row-status--ok) {
|
|
4265
|
+
color: var(--nish-ok);
|
|
4266
|
+
}
|
|
4267
|
+
@media (min-width: 640px) {
|
|
4268
|
+
:where(.nish-setting-row) {
|
|
4269
|
+
display: grid;
|
|
4270
|
+
grid-template-columns: 1fr auto;
|
|
4271
|
+
align-items: center;
|
|
4272
|
+
gap: 16px;
|
|
4273
|
+
}
|
|
4274
|
+
:where(.nish-setting-row-control) {
|
|
4275
|
+
width: auto;
|
|
4276
|
+
justify-content: flex-end;
|
|
4277
|
+
}
|
|
4278
|
+
}
|
|
4279
|
+
:where(.nish-setting-row--inline) {
|
|
4280
|
+
display: grid;
|
|
4281
|
+
grid-template-columns: 1fr auto;
|
|
4282
|
+
align-items: center;
|
|
4283
|
+
gap: 16px;
|
|
4284
|
+
}
|
|
4285
|
+
:where(.nish-setting-row--inline) > :where(.nish-setting-row-control) {
|
|
4286
|
+
width: auto;
|
|
4287
|
+
justify-content: flex-end;
|
|
4288
|
+
}
|
|
4289
|
+
/* Compact: a 44px row with the label beside the control at every width. */
|
|
4290
|
+
:where(.nish-setting-row--compact, .nish-settings-section--compact .nish-setting-row) {
|
|
4291
|
+
display: grid;
|
|
4292
|
+
grid-template-columns: 1fr auto;
|
|
4293
|
+
align-items: center;
|
|
4294
|
+
gap: 16px;
|
|
4295
|
+
min-height: 44px;
|
|
4296
|
+
padding-block: 8px;
|
|
4297
|
+
}
|
|
4298
|
+
:where(.nish-setting-row--compact, .nish-settings-section--compact .nish-setting-row) > :where(.nish-setting-row-control) {
|
|
4299
|
+
width: auto;
|
|
4300
|
+
justify-content: flex-end;
|
|
4301
|
+
}
|
|
4302
|
+
:where(.nish-settings-section--compact .nish-setting-row) {
|
|
4303
|
+
padding-inline: 0;
|
|
4304
|
+
}
|
|
4305
|
+
:where(.nish-setting-row--compact .nish-setting-row-description, .nish-settings-section--compact .nish-setting-row-description) {
|
|
4306
|
+
font-size: var(--nish-text-xs);
|
|
4307
|
+
line-height: 1rem;
|
|
4308
|
+
}
|
|
4309
|
+
/* Stacked wins over the side-by-side layouts at every width. */
|
|
4310
|
+
:where(.nish-setting-row--stacked, .nish-settings-section--compact .nish-setting-row--stacked) {
|
|
4311
|
+
display: flex;
|
|
4312
|
+
flex-direction: column;
|
|
4313
|
+
align-items: stretch;
|
|
4314
|
+
gap: 8px;
|
|
4315
|
+
}
|
|
4316
|
+
:where(.nish-setting-row--stacked, .nish-settings-section--compact .nish-setting-row--stacked) > :where(.nish-setting-row-control) {
|
|
4317
|
+
width: 100%;
|
|
4318
|
+
justify-content: flex-start;
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
/* --- Command palette (.nish-command) ------------------------------------------------------------
|
|
4322
|
+
The CommandPalette component's box: a search field over grouped rows. As a <dialog> opened
|
|
4323
|
+
with showModal() (what <nish-command-palette> renders) it is a full-height sheet under
|
|
4324
|
+
640px and a 560px panel anchored 12vh from the top from there up; as a <div> it is the
|
|
4325
|
+
same panel in the page. The selected row has aria-selected="true".
|
|
4326
|
+
<dialog class="nish-command" aria-label="Search">
|
|
4327
|
+
<div class="nish-command-input"><svg …/>
|
|
4328
|
+
<input type="text" role="combobox" aria-expanded="true" aria-controls="cl" placeholder="Search…">
|
|
4329
|
+
<button class="nish-icon-btn" type="button" aria-label="Close">…</button></div>
|
|
4330
|
+
<div class="nish-command-list" id="cl" role="listbox" aria-label="Results">
|
|
4331
|
+
<div class="nish-command-group" role="group"><div>Pages</div>
|
|
4332
|
+
<a class="nish-command-item" role="option" aria-selected="true" href="/jobs"><svg …/>
|
|
4333
|
+
<span>Jobs</span><span class="nish-command-item-hint">/jobs</span></a></div>
|
|
4334
|
+
<div class="nish-command-empty">No results</div>
|
|
4335
|
+
</div>
|
|
4336
|
+
<div class="nish-command-footer">Esc to close</div>
|
|
4337
|
+
</dialog>
|
|
4338
|
+
-input is the field row (it also works on the bare <input>). A group's first child is its
|
|
4339
|
+
heading. An item is an <a>, a <button> or a <div>; a leading icon is a bare svg. Matched
|
|
4340
|
+
letters go in <mark>. The close button shows on phones only. */
|
|
4341
|
+
:where(div.nish-command, dialog.nish-command[open]) {
|
|
4342
|
+
display: flex;
|
|
4343
|
+
flex-direction: column;
|
|
4344
|
+
}
|
|
4345
|
+
:where(.nish-command) {
|
|
4346
|
+
box-sizing: border-box;
|
|
4347
|
+
width: 100%;
|
|
4348
|
+
max-width: 100%;
|
|
4349
|
+
height: 100dvh;
|
|
4350
|
+
max-height: 100dvh;
|
|
4351
|
+
margin: 0;
|
|
4352
|
+
padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
|
|
4353
|
+
overflow: hidden;
|
|
4354
|
+
border: 1px solid var(--nish-line);
|
|
4355
|
+
border-radius: 0;
|
|
4356
|
+
background: var(--nish-surface);
|
|
4357
|
+
box-shadow: var(--nish-shadow-modal);
|
|
4358
|
+
color: var(--nish-hi);
|
|
4359
|
+
font-family: var(--nish-font-sans, inherit);
|
|
4360
|
+
font-size: var(--nish-text-base);
|
|
4361
|
+
line-height: 1.25rem;
|
|
4362
|
+
}
|
|
4363
|
+
:where(dialog.nish-command[open]) {
|
|
4364
|
+
animation: nish-sheet-in 240ms var(--nish-ease-out, ease-out) both;
|
|
4365
|
+
}
|
|
4366
|
+
:where(dialog.nish-command)::before {
|
|
4367
|
+
/* The phone grab handle: a 44px target with a 40x4 bar, like the React Modal. */
|
|
4368
|
+
content: '';
|
|
4369
|
+
flex-shrink: 0;
|
|
4370
|
+
height: 44px;
|
|
4371
|
+
background: linear-gradient(var(--nish-line-strong), var(--nish-line-strong)) center / 40px 4px no-repeat;
|
|
4372
|
+
}
|
|
4373
|
+
:where(dialog.nish-command)::backdrop {
|
|
4374
|
+
background: rgb(0 0 0 / 0.6);
|
|
4375
|
+
background: color-mix(in srgb, var(--nish-scrim, #000) 60%, transparent);
|
|
4376
|
+
animation: nish-fade-in 160ms ease-out both;
|
|
4377
|
+
}
|
|
4378
|
+
@media (min-width: 640px) {
|
|
4379
|
+
:where(.nish-command) {
|
|
4380
|
+
width: min(100% - 32px, 560px);
|
|
4381
|
+
height: fit-content;
|
|
4382
|
+
max-height: 76dvh;
|
|
4383
|
+
margin: 12vh auto auto;
|
|
4384
|
+
padding-bottom: 0;
|
|
4385
|
+
border: 1px solid var(--nish-line);
|
|
4386
|
+
border-radius: 16px;
|
|
4387
|
+
}
|
|
4388
|
+
:where(div.nish-command) {
|
|
4389
|
+
margin: 0 auto;
|
|
4390
|
+
}
|
|
4391
|
+
:where(dialog.nish-command[open]) {
|
|
4392
|
+
animation-name: nish-rise-in;
|
|
4393
|
+
animation-duration: 200ms;
|
|
4394
|
+
}
|
|
4395
|
+
:where(dialog.nish-command)::before {
|
|
4396
|
+
display: none;
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
:where(.nish-command-input) {
|
|
4400
|
+
box-sizing: border-box;
|
|
4401
|
+
display: flex;
|
|
4402
|
+
flex-shrink: 0;
|
|
4403
|
+
align-items: center;
|
|
4404
|
+
gap: 8px;
|
|
4405
|
+
padding: 0 16px 8px;
|
|
4406
|
+
border-bottom: 1px solid var(--nish-line);
|
|
4407
|
+
color: var(--nish-hi3);
|
|
4408
|
+
}
|
|
4409
|
+
@media (min-width: 640px) {
|
|
4410
|
+
:where(.nish-command-input) {
|
|
4411
|
+
padding-top: 4px;
|
|
4412
|
+
}
|
|
4413
|
+
:where(.nish-command-input) > :where(button) {
|
|
4414
|
+
display: none;
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4417
|
+
:where(.nish-command-input) > :where(svg) {
|
|
4418
|
+
flex-shrink: 0;
|
|
4419
|
+
width: 18px;
|
|
4420
|
+
height: 18px;
|
|
4421
|
+
}
|
|
4422
|
+
:where(.nish-command-input) > :where(input),
|
|
4423
|
+
:where(input.nish-command-input) {
|
|
4424
|
+
box-sizing: border-box;
|
|
4425
|
+
height: 48px;
|
|
4426
|
+
min-width: 0;
|
|
4427
|
+
flex: 1;
|
|
4428
|
+
margin: 0;
|
|
4429
|
+
padding: 0;
|
|
4430
|
+
border: 0;
|
|
4431
|
+
background: transparent;
|
|
4432
|
+
color: var(--nish-hi);
|
|
4433
|
+
font: inherit;
|
|
4434
|
+
font-size: var(--nish-text-base);
|
|
4435
|
+
outline: none;
|
|
4436
|
+
}
|
|
4437
|
+
/* Base :focus-visible (0,1,0) outranks the zero-specificity rule above, so !important keeps the borderless field row free of a ring. */
|
|
4438
|
+
:where(.nish-command-input) > :where(input),
|
|
4439
|
+
:where(input.nish-command-input) {
|
|
4440
|
+
outline: none !important;
|
|
4441
|
+
}
|
|
4442
|
+
:where(input.nish-command-input) {
|
|
4443
|
+
padding-inline: 16px;
|
|
4444
|
+
border-bottom: 1px solid var(--nish-line);
|
|
4445
|
+
}
|
|
4446
|
+
:where(.nish-command-input) > :where(input)::placeholder,
|
|
4447
|
+
:where(input.nish-command-input)::placeholder {
|
|
4448
|
+
color: var(--nish-hi3);
|
|
4449
|
+
opacity: 1;
|
|
4450
|
+
}
|
|
4451
|
+
:where(.nish-command-list) {
|
|
4452
|
+
box-sizing: border-box;
|
|
4453
|
+
min-height: 0;
|
|
4454
|
+
flex: 1 1 auto;
|
|
4455
|
+
padding: 12px 12px 20px;
|
|
4456
|
+
overflow-y: auto;
|
|
4457
|
+
overscroll-behavior: contain;
|
|
4458
|
+
color: var(--nish-hi2);
|
|
4459
|
+
font-size: var(--nish-text-sm);
|
|
4460
|
+
line-height: 1.25rem;
|
|
4461
|
+
}
|
|
4462
|
+
:where(.nish-command-group) > :where(:not(.nish-command-item)) {
|
|
4463
|
+
padding: 12px 12px 4px;
|
|
4464
|
+
color: var(--nish-hi3);
|
|
4465
|
+
font-size: var(--nish-text-xs);
|
|
4466
|
+
font-weight: var(--nish-weight-medium);
|
|
4467
|
+
line-height: 1rem;
|
|
4468
|
+
letter-spacing: 0.025em;
|
|
4469
|
+
text-transform: uppercase;
|
|
4470
|
+
}
|
|
4471
|
+
:where(.nish-command-item) {
|
|
4472
|
+
box-sizing: border-box;
|
|
4473
|
+
display: flex;
|
|
4474
|
+
align-items: center;
|
|
4475
|
+
gap: 12px;
|
|
4476
|
+
width: 100%;
|
|
4477
|
+
min-height: 44px;
|
|
4478
|
+
margin: 0;
|
|
4479
|
+
padding: 8px 12px;
|
|
4480
|
+
border: 0;
|
|
4481
|
+
border-radius: var(--nish-radius-sm);
|
|
4482
|
+
background: transparent;
|
|
4483
|
+
color: var(--nish-hi2);
|
|
4484
|
+
font: inherit;
|
|
4485
|
+
text-align: left;
|
|
4486
|
+
text-decoration: none;
|
|
4487
|
+
cursor: pointer;
|
|
4488
|
+
}
|
|
4489
|
+
:where(.nish-command-item[aria-selected='true']) {
|
|
4490
|
+
background: var(--nish-elevated);
|
|
4491
|
+
color: var(--nish-hi);
|
|
4492
|
+
}
|
|
4493
|
+
:where(.nish-command-item) > :where(svg) {
|
|
4494
|
+
flex-shrink: 0;
|
|
4495
|
+
width: 20px;
|
|
4496
|
+
height: 20px;
|
|
4497
|
+
color: var(--nish-hi3);
|
|
4498
|
+
}
|
|
4499
|
+
:where(.nish-command-item) > :where(span) {
|
|
4500
|
+
min-width: 0;
|
|
4501
|
+
flex: 1 1 auto;
|
|
4502
|
+
overflow: hidden;
|
|
4503
|
+
text-overflow: ellipsis;
|
|
4504
|
+
white-space: nowrap;
|
|
4505
|
+
}
|
|
4506
|
+
:where(.nish-command-item) > :where(.nish-command-item-hint) {
|
|
4507
|
+
flex: 0 1 auto;
|
|
4508
|
+
max-width: 40%;
|
|
4509
|
+
color: var(--nish-hi3);
|
|
4510
|
+
font-size: var(--nish-text-xs);
|
|
4511
|
+
line-height: 1rem;
|
|
4512
|
+
}
|
|
4513
|
+
:where(.nish-command-item) :where(mark) {
|
|
4514
|
+
background: transparent;
|
|
4515
|
+
color: var(--nish-accent);
|
|
4516
|
+
font-weight: var(--nish-weight-semibold);
|
|
4517
|
+
}
|
|
4518
|
+
:where(.nish-command-empty) {
|
|
4519
|
+
padding: 32px 12px;
|
|
4520
|
+
color: var(--nish-hi3);
|
|
4521
|
+
font-size: var(--nish-text-sm);
|
|
4522
|
+
text-align: center;
|
|
4523
|
+
}
|
|
4524
|
+
:where(.nish-command-footer) {
|
|
4525
|
+
display: flex;
|
|
4526
|
+
flex-shrink: 0;
|
|
4527
|
+
flex-wrap: wrap;
|
|
4528
|
+
align-items: center;
|
|
4529
|
+
justify-content: flex-end;
|
|
4530
|
+
gap: 8px;
|
|
4531
|
+
padding: 12px 20px;
|
|
4532
|
+
border-top: 1px solid var(--nish-line);
|
|
4533
|
+
color: var(--nish-hi3);
|
|
4534
|
+
font-size: var(--nish-text-sm);
|
|
4535
|
+
}
|
|
4536
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4537
|
+
:where(dialog.nish-command[open]),
|
|
4538
|
+
:where(dialog.nish-command)::backdrop {
|
|
4539
|
+
animation: none;
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
|
|
4543
|
+
/* --- Chart (.nish-chart) and range bar (.nish-range-bar) ------------------------------------------
|
|
4544
|
+
The chrome of <nish-line-chart> and <nish-bar-chart> (LineChart and BarChart): the box the
|
|
4545
|
+
svg and the tooltip sit in, svg text for the axes (-axis) and the gridline stroke (-grid).
|
|
4546
|
+
The tooltip is placed by left or right in its style; it shows what the pointer or the
|
|
4547
|
+
arrow keys point at. Series colors are var(--nish-chart-1) to -8.
|
|
4548
|
+
<div class="nish-chart" style="height: 200px">
|
|
4549
|
+
<svg width="320" height="200" role="img" tabindex="0" aria-label="CPU, last 24 hours">
|
|
4550
|
+
<line class="nish-chart-grid" x1="40" x2="320" y1="40" y2="40"/>
|
|
4551
|
+
<text class="nish-chart-axis" x="34" y="40" text-anchor="end">80%</text> …
|
|
4552
|
+
</svg>
|
|
4553
|
+
<div class="nish-chart-tooltip" style="left: 120px"><div>14:00</div>
|
|
4554
|
+
<div><i style="--c: var(--nish-chart-1)"></i><span>CPU</span><b>42%</b></div></div>
|
|
4555
|
+
</div>
|
|
4556
|
+
The range bar is the RangeBar component: --low and --high (the highlighted part) and
|
|
4557
|
+
--current (the dot) are percentages of the track. -labels is a row of min and max under it.
|
|
4558
|
+
<div class="nish-range-bar" role="img" aria-label="Range 12 to 18, current 15, within 4 to 22"
|
|
4559
|
+
style="--low: 44%; --high: 78%; --current: 61%">
|
|
4560
|
+
<div class="nish-range-bar-fill"></div><span class="nish-range-bar-current"></span></div>
|
|
4561
|
+
<div class="nish-range-bar-labels"><span>4</span><span>22</span></div> */
|
|
4562
|
+
:where(.nish-chart) {
|
|
4563
|
+
position: relative;
|
|
4564
|
+
width: 100%;
|
|
4565
|
+
user-select: none;
|
|
4566
|
+
}
|
|
4567
|
+
:where(.nish-chart) :where(svg[role="img"]) {
|
|
4568
|
+
display: block;
|
|
4569
|
+
border-radius: 6px;
|
|
4570
|
+
outline: none;
|
|
4571
|
+
touch-action: pan-y;
|
|
4572
|
+
}
|
|
4573
|
+
:where(.nish-chart) :where(svg[role="img"]:focus-visible) {
|
|
4574
|
+
box-shadow: 0 0 0 2px var(--nish-accent);
|
|
4575
|
+
}
|
|
4576
|
+
:where(.nish-chart-grid) {
|
|
4577
|
+
stroke: var(--nish-line);
|
|
4578
|
+
stroke-width: 1;
|
|
4579
|
+
}
|
|
4580
|
+
:where(.nish-chart-axis) {
|
|
4581
|
+
fill: var(--nish-hi3);
|
|
4582
|
+
font-size: 11px;
|
|
4583
|
+
font-variant-numeric: tabular-nums;
|
|
4584
|
+
}
|
|
4585
|
+
:where(.nish-chart-tooltip) {
|
|
4586
|
+
box-sizing: border-box;
|
|
4587
|
+
position: absolute;
|
|
4588
|
+
top: 4px;
|
|
4589
|
+
z-index: 10;
|
|
4590
|
+
padding: 4px 8px;
|
|
4591
|
+
border: 1px solid var(--nish-line-strong);
|
|
4592
|
+
border-radius: var(--nish-radius-sm);
|
|
4593
|
+
background: var(--nish-elevated);
|
|
4594
|
+
box-shadow: var(--nish-shadow-pop);
|
|
4595
|
+
color: var(--nish-hi);
|
|
4596
|
+
font-size: 12px;
|
|
4597
|
+
white-space: nowrap;
|
|
4598
|
+
font-variant-numeric: tabular-nums;
|
|
4599
|
+
pointer-events: none;
|
|
4600
|
+
}
|
|
4601
|
+
:where(.nish-chart-tooltip[hidden]) {
|
|
4602
|
+
display: none;
|
|
4603
|
+
}
|
|
4604
|
+
:where(.nish-chart-tooltip) > :where(:first-child) {
|
|
4605
|
+
color: var(--nish-hi3);
|
|
4606
|
+
}
|
|
4607
|
+
:where(.nish-chart-tooltip) > :where(div) {
|
|
4608
|
+
display: flex;
|
|
4609
|
+
align-items: center;
|
|
4610
|
+
gap: 6px;
|
|
4611
|
+
}
|
|
4612
|
+
:where(.nish-chart-tooltip) :where(i) {
|
|
4613
|
+
display: inline-block;
|
|
4614
|
+
flex-shrink: 0;
|
|
4615
|
+
width: 8px;
|
|
4616
|
+
height: 8px;
|
|
4617
|
+
border-radius: 9999px;
|
|
4618
|
+
background: var(--c, var(--nish-chart-1));
|
|
4619
|
+
}
|
|
4620
|
+
:where(.nish-chart-tooltip) :where(span) {
|
|
4621
|
+
color: var(--nish-hi3);
|
|
4622
|
+
}
|
|
4623
|
+
:where(.nish-chart-tooltip) :where(b, strong) {
|
|
4624
|
+
font-weight: var(--nish-weight-medium);
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4627
|
+
:where(.nish-range-bar) {
|
|
4628
|
+
position: relative;
|
|
4629
|
+
width: 100%;
|
|
4630
|
+
height: 6px;
|
|
4631
|
+
border-radius: 9999px;
|
|
4632
|
+
background: var(--nish-line);
|
|
4633
|
+
}
|
|
4634
|
+
:where(.nish-range-bar-fill) {
|
|
4635
|
+
position: absolute;
|
|
4636
|
+
top: 0;
|
|
4637
|
+
bottom: 0;
|
|
4638
|
+
left: var(--low, 0%);
|
|
4639
|
+
width: max(calc(var(--high, 100%) - var(--low, 0%)), 1%);
|
|
4640
|
+
border-radius: 9999px;
|
|
4641
|
+
background: linear-gradient(90deg, var(--nish-chart-2), var(--nish-chart-5));
|
|
4642
|
+
}
|
|
4643
|
+
:where(.nish-range-bar-current) {
|
|
4644
|
+
box-sizing: border-box;
|
|
4645
|
+
position: absolute;
|
|
4646
|
+
top: 50%;
|
|
4647
|
+
left: var(--current, 0%);
|
|
4648
|
+
width: 8px;
|
|
4649
|
+
height: 8px;
|
|
4650
|
+
border: 1px solid var(--nish-surface);
|
|
4651
|
+
border-radius: 9999px;
|
|
4652
|
+
background: var(--nish-hi);
|
|
4653
|
+
transform: translate(-50%, -50%);
|
|
4654
|
+
}
|
|
4655
|
+
:where(.nish-range-bar-labels) {
|
|
4656
|
+
display: flex;
|
|
4657
|
+
justify-content: space-between;
|
|
4658
|
+
gap: 8px;
|
|
4659
|
+
margin-top: 4px;
|
|
4660
|
+
color: var(--nish-hi3);
|
|
4661
|
+
font-size: var(--nish-text-xs);
|
|
4662
|
+
line-height: 1rem;
|
|
4663
|
+
font-variant-numeric: tabular-nums;
|
|
4664
|
+
}
|