nish-ui 1.7.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 +15 -1
- package/dist/chart.js.map +1 -1
- package/dist/elements-charts.d.ts +53 -0
- package/dist/elements-charts.js +132 -0
- package/dist/elements-charts.js.map +1 -0
- package/dist/elements-data.d.ts +95 -0
- package/dist/elements-data.js +47 -0
- package/dist/elements-data.js.map +1 -0
- package/dist/elements-forms.d.ts +147 -0
- package/dist/elements-forms.js +92 -0
- package/dist/elements-forms.js.map +1 -0
- package/dist/elements.js +3 -3
- package/dist/elements.js.map +1 -1
- package/dist/files.json +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +54 -27
- package/dist/index.js.map +1 -1
- package/dist/nish-components.css +2598 -176
- package/dist/system-canvas.js.map +1 -1
- package/dist/theme.d.ts +3 -0
- package/dist/theme.global.js +16 -4
- package/dist/theme.global.js.map +1 -1
- package/dist/theme.js +13 -1
- package/dist/theme.js.map +1 -1
- package/package.json +30 -2
package/dist/nish-components.css
CHANGED
|
@@ -488,13 +488,15 @@
|
|
|
488
488
|
display: block;
|
|
489
489
|
height: auto;
|
|
490
490
|
padding: 8px 12px;
|
|
491
|
-
line-height: 1.625;
|
|
492
491
|
resize: vertical;
|
|
493
492
|
}
|
|
494
493
|
@media (pointer: coarse) {
|
|
495
494
|
:where(.nish-input, .nish-select, .nish-textarea) {
|
|
496
495
|
font-size: var(--nish-text-base);
|
|
497
496
|
}
|
|
497
|
+
:where(.nish-textarea) {
|
|
498
|
+
line-height: 1.5rem;
|
|
499
|
+
}
|
|
498
500
|
}
|
|
499
501
|
|
|
500
502
|
/* --- Label and Field (.nish-label, .nish-field) --------------------------------------
|
|
@@ -559,6 +561,7 @@
|
|
|
559
561
|
grid-template-columns: var(--nish-field-label-width, 7rem) minmax(0, 1fr);
|
|
560
562
|
align-items: center;
|
|
561
563
|
column-gap: 12px;
|
|
564
|
+
row-gap: 4px;
|
|
562
565
|
}
|
|
563
566
|
:where(.nish-field--inline) > :where(.nish-field-label, .nish-label) {
|
|
564
567
|
color: var(--nish-hi3);
|
|
@@ -590,14 +593,42 @@
|
|
|
590
593
|
pointer-events: none;
|
|
591
594
|
}
|
|
592
595
|
:where(.nish-search) > :where(input) {
|
|
593
|
-
padding-left:
|
|
596
|
+
padding-left: 36px;
|
|
594
597
|
}
|
|
595
598
|
:where(.nish-search) > :where(input:not(:last-child)) {
|
|
596
|
-
padding-right:
|
|
599
|
+
padding-right: 32px;
|
|
597
600
|
}
|
|
598
601
|
:where(.nish-search) > :where(kbd, button) {
|
|
599
602
|
position: absolute;
|
|
600
|
-
right:
|
|
603
|
+
right: 4px;
|
|
604
|
+
}
|
|
605
|
+
/* The clear button is the React xs icon button: 24px, 44px under a coarse pointer. */
|
|
606
|
+
:where(.nish-search) > :where(button.nish-icon-btn) {
|
|
607
|
+
width: 24px;
|
|
608
|
+
height: 24px;
|
|
609
|
+
border-radius: 6px;
|
|
610
|
+
}
|
|
611
|
+
:where(.nish-search--sm) > :where(svg),
|
|
612
|
+
:where(.nish-search--xs) > :where(svg) {
|
|
613
|
+
width: 14px;
|
|
614
|
+
height: 14px;
|
|
615
|
+
}
|
|
616
|
+
:where(.nish-search--sm) > :where(input) {
|
|
617
|
+
height: 32px;
|
|
618
|
+
padding-left: 32px;
|
|
619
|
+
font-size: var(--nish-text-xs);
|
|
620
|
+
}
|
|
621
|
+
:where(.nish-search--xs) > :where(svg) {
|
|
622
|
+
left: 8px;
|
|
623
|
+
}
|
|
624
|
+
:where(.nish-search--xs) > :where(input) {
|
|
625
|
+
height: 28px;
|
|
626
|
+
padding-left: 28px;
|
|
627
|
+
padding-right: 8px;
|
|
628
|
+
font-size: var(--nish-text-2xs);
|
|
629
|
+
}
|
|
630
|
+
:where(.nish-search--xs) > :where(input:not(:last-child)) {
|
|
631
|
+
padding-right: 32px;
|
|
601
632
|
}
|
|
602
633
|
:where(.nish-search) > :where(kbd) {
|
|
603
634
|
pointer-events: none;
|
|
@@ -606,6 +637,72 @@
|
|
|
606
637
|
border-color: transparent;
|
|
607
638
|
background-color: transparent;
|
|
608
639
|
}
|
|
640
|
+
/* Room for the 44px clear button under a coarse pointer. */
|
|
641
|
+
@media (pointer: coarse) {
|
|
642
|
+
:where(.nish-search, .nish-search--xs) > :where(input:not(:last-child)) {
|
|
643
|
+
padding-right: 44px;
|
|
644
|
+
}
|
|
645
|
+
/* 16px input text on touch, like React's pointer-coarse:text-base (also stops focus zoom). */
|
|
646
|
+
:where(.nish-search--sm, .nish-search--xs) > :where(input) {
|
|
647
|
+
font-size: var(--nish-text-base);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/* --- Pill link (.nish-pill-link) -------------------------------------------------------
|
|
652
|
+
The "← nish.software" pill at the top left of a header:
|
|
653
|
+
<a class="nish-pill-link" href="https://nish.software" title="Back to nish.software">← nish.software</a>
|
|
654
|
+
Also in base.css (nish.css), so pages that load only nish-components.css get it too.
|
|
655
|
+
--compact: under 480px only the arrow shows, in a 44px circle; data-compact="always" at every width.
|
|
656
|
+
<a class="nish-pill-link nish-pill-link--compact" href="/">← <span class="nish-pill-link-label">Artifacts</span></a> */
|
|
657
|
+
:where(.nish-pill-link) {
|
|
658
|
+
box-sizing: border-box;
|
|
659
|
+
display: inline-flex;
|
|
660
|
+
flex-shrink: 0;
|
|
661
|
+
align-items: center;
|
|
662
|
+
gap: 6px;
|
|
663
|
+
min-height: var(--nish-tap-min, 44px);
|
|
664
|
+
padding: 4px 12px;
|
|
665
|
+
border: 1px solid var(--nish-line);
|
|
666
|
+
border-radius: 999px;
|
|
667
|
+
color: var(--nish-hi2);
|
|
668
|
+
font-family: var(--nish-font-sans);
|
|
669
|
+
font-size: 14px;
|
|
670
|
+
line-height: 1.2;
|
|
671
|
+
text-decoration: none;
|
|
672
|
+
white-space: nowrap;
|
|
673
|
+
}
|
|
674
|
+
:where(.nish-pill-link:hover) {
|
|
675
|
+
border-color: var(--nish-line-strong);
|
|
676
|
+
color: var(--nish-hi);
|
|
677
|
+
}
|
|
678
|
+
:where(.nish-pill-link--compact[data-compact='always']) {
|
|
679
|
+
min-width: var(--nish-tap-min, 44px);
|
|
680
|
+
justify-content: center;
|
|
681
|
+
padding-inline: 6px;
|
|
682
|
+
}
|
|
683
|
+
:where(.nish-pill-link--compact[data-compact='always'] .nish-pill-link-label) {
|
|
684
|
+
position: absolute;
|
|
685
|
+
width: 1px;
|
|
686
|
+
height: 1px;
|
|
687
|
+
overflow: hidden;
|
|
688
|
+
clip-path: inset(50%);
|
|
689
|
+
white-space: nowrap;
|
|
690
|
+
}
|
|
691
|
+
@media (max-width: 480px) {
|
|
692
|
+
:where(.nish-pill-link--compact) {
|
|
693
|
+
min-width: var(--nish-tap-min, 44px);
|
|
694
|
+
justify-content: center;
|
|
695
|
+
padding-inline: 6px;
|
|
696
|
+
}
|
|
697
|
+
:where(.nish-pill-link--compact .nish-pill-link-label) {
|
|
698
|
+
position: absolute;
|
|
699
|
+
width: 1px;
|
|
700
|
+
height: 1px;
|
|
701
|
+
overflow: hidden;
|
|
702
|
+
clip-path: inset(50%);
|
|
703
|
+
white-space: nowrap;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
609
706
|
|
|
610
707
|
/* --- Segmented (.nish-seg) ----------------------------------------------------------
|
|
611
708
|
<div class="nish-seg" role="group" aria-label="Mode">
|
|
@@ -660,6 +757,25 @@
|
|
|
660
757
|
pointer-events: none;
|
|
661
758
|
color: var(--nish-ghost);
|
|
662
759
|
}
|
|
760
|
+
:where(.nish-seg--xs) > :where(button, a, [role='radio']) {
|
|
761
|
+
height: 24px;
|
|
762
|
+
padding: 0 8px;
|
|
763
|
+
font-size: var(--nish-text-2xs, 0.6875rem);
|
|
764
|
+
line-height: 1rem;
|
|
765
|
+
}
|
|
766
|
+
:where(.nish-seg--md) > :where(button, a, [role='radio']) {
|
|
767
|
+
height: 32px;
|
|
768
|
+
padding: 0 12px;
|
|
769
|
+
font-size: var(--nish-text-sm);
|
|
770
|
+
line-height: 1.25rem;
|
|
771
|
+
}
|
|
772
|
+
:where(.nish-seg--block) {
|
|
773
|
+
display: flex;
|
|
774
|
+
width: 100%;
|
|
775
|
+
}
|
|
776
|
+
:where(.nish-seg--block) > :where(button, a, [role='radio']) {
|
|
777
|
+
flex: 1 1 0;
|
|
778
|
+
}
|
|
663
779
|
:where(.nish-seg--joined) {
|
|
664
780
|
padding: 0;
|
|
665
781
|
border: 0;
|
|
@@ -728,6 +844,7 @@
|
|
|
728
844
|
color: var(--nish-hi2);
|
|
729
845
|
font: inherit;
|
|
730
846
|
font-size: var(--nish-text-sm);
|
|
847
|
+
font-weight: var(--nish-weight-medium);
|
|
731
848
|
line-height: 1.25rem;
|
|
732
849
|
white-space: nowrap;
|
|
733
850
|
text-decoration: none;
|
|
@@ -741,7 +858,7 @@
|
|
|
741
858
|
background: var(--nish-elevated);
|
|
742
859
|
}
|
|
743
860
|
:where(.nish-chip[aria-pressed='true']) {
|
|
744
|
-
border-color: color-mix(in
|
|
861
|
+
border-color: color-mix(in oklab, var(--nish-accent) 60%, transparent);
|
|
745
862
|
background: var(--nish-accent-soft);
|
|
746
863
|
color: var(--nish-accent);
|
|
747
864
|
}
|
|
@@ -755,6 +872,9 @@
|
|
|
755
872
|
}
|
|
756
873
|
:where(.nish-chip--suggestion)::before {
|
|
757
874
|
content: '+';
|
|
875
|
+
display: inline-block;
|
|
876
|
+
width: 14px;
|
|
877
|
+
text-align: center;
|
|
758
878
|
font-weight: var(--nish-weight-medium);
|
|
759
879
|
}
|
|
760
880
|
:where(.nish-chip--sm) {
|
|
@@ -763,13 +883,25 @@
|
|
|
763
883
|
font-size: var(--nish-text-xs);
|
|
764
884
|
line-height: 1rem;
|
|
765
885
|
}
|
|
886
|
+
:where(span.nish-chip) {
|
|
887
|
+
border-color: var(--nish-line);
|
|
888
|
+
background: var(--nish-elevated);
|
|
889
|
+
color: var(--nish-hi2);
|
|
890
|
+
cursor: default;
|
|
891
|
+
}
|
|
892
|
+
:where(span.nish-chip[data-removable]) {
|
|
893
|
+
padding-right: 4px;
|
|
894
|
+
}
|
|
895
|
+
:where(span.nish-chip--sm[data-removable]) {
|
|
896
|
+
padding-right: 2px;
|
|
897
|
+
}
|
|
766
898
|
|
|
767
899
|
/* --- Callout (.nish-callout) --------------------------------------------------------
|
|
768
900
|
<div class="nish-callout nish-callout--warn">
|
|
769
901
|
<span class="nish-callout-icon" aria-hidden="true">!</span>
|
|
770
902
|
<div><p class="nish-callout-title">Heads up</p><p>Body text.</p></div>
|
|
771
903
|
</div>
|
|
772
|
-
The icon
|
|
904
|
+
The icon is a 16px glyph (an svg, or a character) in the tone's color. */
|
|
773
905
|
:where(.nish-callout) {
|
|
774
906
|
box-sizing: border-box;
|
|
775
907
|
display: flex;
|
|
@@ -779,9 +911,9 @@
|
|
|
779
911
|
border: 1px solid var(--nish-line);
|
|
780
912
|
border-radius: var(--nish-radius-card, 12px);
|
|
781
913
|
background: var(--nish-elevated);
|
|
782
|
-
color: var(--nish-
|
|
914
|
+
color: var(--nish-hi);
|
|
783
915
|
font-size: var(--nish-text-sm);
|
|
784
|
-
line-height: 1.
|
|
916
|
+
line-height: 1.375;
|
|
785
917
|
}
|
|
786
918
|
:where(.nish-callout) > :where(div) {
|
|
787
919
|
min-width: 0;
|
|
@@ -789,9 +921,18 @@
|
|
|
789
921
|
}
|
|
790
922
|
:where(.nish-callout) :where(p) {
|
|
791
923
|
margin: 0;
|
|
924
|
+
color: var(--nish-hi2);
|
|
925
|
+
font-size: var(--nish-text-sm);
|
|
792
926
|
}
|
|
793
927
|
:where(.nish-callout) :where(p + p) {
|
|
794
|
-
margin-top:
|
|
928
|
+
margin-top: 2px;
|
|
929
|
+
}
|
|
930
|
+
/* A box of running text (inline <b>, <code>, links) with no icon column:
|
|
931
|
+
<div class="nish-callout nish-callout--text nish-callout--warn">Prices change <b>daily</b>.</div>
|
|
932
|
+
Text flows as one block instead of splitting into flex items. */
|
|
933
|
+
:where(.nish-callout--text) {
|
|
934
|
+
display: block;
|
|
935
|
+
color: var(--nish-hi2);
|
|
795
936
|
}
|
|
796
937
|
:where(.nish-callout-title) {
|
|
797
938
|
color: var(--nish-hi);
|
|
@@ -803,65 +944,60 @@
|
|
|
803
944
|
flex-shrink: 0;
|
|
804
945
|
align-items: center;
|
|
805
946
|
justify-content: center;
|
|
806
|
-
width:
|
|
807
|
-
height:
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
color: var(--nish-hi2);
|
|
947
|
+
width: 16px;
|
|
948
|
+
height: 16px;
|
|
949
|
+
margin-top: 2px;
|
|
950
|
+
color: var(--nish-hi3);
|
|
811
951
|
font-size: var(--nish-text-xs);
|
|
812
952
|
font-weight: var(--nish-weight-bold);
|
|
813
953
|
line-height: 1;
|
|
814
954
|
}
|
|
815
955
|
:where(.nish-callout-icon) > :where(svg) {
|
|
816
|
-
width:
|
|
817
|
-
height:
|
|
956
|
+
width: 16px;
|
|
957
|
+
height: 16px;
|
|
818
958
|
}
|
|
819
959
|
:where(.nish-callout--accent) {
|
|
820
|
-
border-color: color-mix(in
|
|
960
|
+
border-color: color-mix(in oklab, var(--nish-accent) 30%, transparent);
|
|
821
961
|
background: var(--nish-accent-soft);
|
|
822
962
|
}
|
|
823
963
|
:where(.nish-callout--accent) :where(.nish-callout-icon) {
|
|
824
|
-
|
|
825
|
-
color: var(--nish-on-accent);
|
|
964
|
+
color: var(--nish-accent);
|
|
826
965
|
}
|
|
827
966
|
:where(.nish-callout--info) {
|
|
828
|
-
border-color: color-mix(in
|
|
967
|
+
border-color: color-mix(in oklab, var(--nish-info) 30%, transparent);
|
|
829
968
|
background: var(--nish-info-soft);
|
|
830
969
|
}
|
|
831
970
|
:where(.nish-callout--info) :where(.nish-callout-icon) {
|
|
832
|
-
|
|
833
|
-
color: var(--nish-on-info);
|
|
971
|
+
color: var(--nish-info);
|
|
834
972
|
}
|
|
835
973
|
:where(.nish-callout--ok) {
|
|
836
|
-
border-color: color-mix(in
|
|
974
|
+
border-color: color-mix(in oklab, var(--nish-ok) 30%, transparent);
|
|
837
975
|
background: var(--nish-ok-soft);
|
|
838
976
|
}
|
|
839
977
|
:where(.nish-callout--ok) :where(.nish-callout-icon) {
|
|
840
|
-
|
|
841
|
-
color: var(--nish-on-ok);
|
|
978
|
+
color: var(--nish-ok);
|
|
842
979
|
}
|
|
843
980
|
:where(.nish-callout--warn) {
|
|
844
|
-
border-color: color-mix(in
|
|
981
|
+
border-color: color-mix(in oklab, var(--nish-warn) 30%, transparent);
|
|
845
982
|
background: var(--nish-warn-soft);
|
|
846
983
|
}
|
|
847
984
|
:where(.nish-callout--warn) :where(.nish-callout-icon) {
|
|
848
|
-
|
|
849
|
-
color: var(--nish-on-warn);
|
|
985
|
+
color: var(--nish-warn);
|
|
850
986
|
}
|
|
851
987
|
:where(.nish-callout--loss) {
|
|
852
|
-
border-color: color-mix(in
|
|
988
|
+
border-color: color-mix(in oklab, var(--nish-loss) 30%, transparent);
|
|
853
989
|
background: var(--nish-loss-soft);
|
|
854
990
|
}
|
|
855
991
|
:where(.nish-callout--loss) :where(.nish-callout-icon) {
|
|
856
|
-
|
|
857
|
-
color: var(--nish-on-loss);
|
|
992
|
+
color: var(--nish-loss);
|
|
858
993
|
}
|
|
859
994
|
|
|
860
995
|
/* --- Stats (.nish-stats > .nish-stat) -----------------------------------------------
|
|
861
996
|
<dl class="nish-stats">
|
|
862
997
|
<div class="nish-stat"><dt class="nish-stat-label">Blocks</dt><dd class="nish-stat-value">1,284</dd></div>
|
|
863
998
|
</dl>
|
|
864
|
-
--tinted: raised fill instead of a card. --sm: denser, smaller values.
|
|
999
|
+
--tinted: raised fill instead of a card. --sm: denser, smaller values.
|
|
1000
|
+
--4: exactly four tiles, two per row, then four in a row from 640px (no 3+1 orphan). */
|
|
865
1001
|
:where(.nish-stats) {
|
|
866
1002
|
display: grid;
|
|
867
1003
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
|
|
@@ -870,6 +1006,14 @@
|
|
|
870
1006
|
padding: 0;
|
|
871
1007
|
list-style: none;
|
|
872
1008
|
}
|
|
1009
|
+
:where(.nish-stats--4) {
|
|
1010
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1011
|
+
}
|
|
1012
|
+
@media (min-width: 640px) {
|
|
1013
|
+
:where(.nish-stats--4) {
|
|
1014
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
873
1017
|
:where(.nish-stat) {
|
|
874
1018
|
box-sizing: border-box;
|
|
875
1019
|
display: flex;
|
|
@@ -916,7 +1060,7 @@
|
|
|
916
1060
|
}
|
|
917
1061
|
:where(.nish-stats--tinted) > :where(.nish-stat),
|
|
918
1062
|
:where(.nish-stat--tinted) {
|
|
919
|
-
border
|
|
1063
|
+
border: 0;
|
|
920
1064
|
border-radius: var(--nish-radius-sm);
|
|
921
1065
|
background: var(--nish-elevated);
|
|
922
1066
|
box-shadow: none;
|
|
@@ -929,9 +1073,6 @@
|
|
|
929
1073
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
|
|
930
1074
|
gap: 8px;
|
|
931
1075
|
}
|
|
932
|
-
:where(.nish-stats--sm) > :where(.nish-stat) {
|
|
933
|
-
padding: 8px 10px;
|
|
934
|
-
}
|
|
935
1076
|
:where(.nish-stats--sm) :where(.nish-stat-value) {
|
|
936
1077
|
font-size: var(--nish-text-base);
|
|
937
1078
|
line-height: 1.5rem;
|
|
@@ -1016,7 +1157,7 @@
|
|
|
1016
1157
|
display: block;
|
|
1017
1158
|
position: relative;
|
|
1018
1159
|
width: 100%;
|
|
1019
|
-
height:
|
|
1160
|
+
height: 6px;
|
|
1020
1161
|
overflow: hidden;
|
|
1021
1162
|
border-radius: var(--nish-radius-pill);
|
|
1022
1163
|
background: var(--nish-elevated);
|
|
@@ -1033,11 +1174,11 @@
|
|
|
1033
1174
|
background: var(--nish-accent);
|
|
1034
1175
|
transition: width var(--nish-dur-med) var(--nish-ease-out);
|
|
1035
1176
|
}
|
|
1036
|
-
:where(.nish-meter--
|
|
1177
|
+
:where(.nish-meter--xs) {
|
|
1037
1178
|
height: 4px;
|
|
1038
1179
|
}
|
|
1039
|
-
:where(.nish-meter--lg) {
|
|
1040
|
-
height:
|
|
1180
|
+
:where(.nish-meter--lg, .nish-meter--md) {
|
|
1181
|
+
height: 10px;
|
|
1041
1182
|
}
|
|
1042
1183
|
:where(.nish-meter--ok) > :where(i) {
|
|
1043
1184
|
background: var(--nish-ok-fill);
|
|
@@ -1063,11 +1204,12 @@
|
|
|
1063
1204
|
min-width: 0;
|
|
1064
1205
|
}
|
|
1065
1206
|
:where(.nish-disclosure) > :where(summary) {
|
|
1207
|
+
box-sizing: border-box;
|
|
1066
1208
|
display: flex;
|
|
1067
1209
|
align-items: center;
|
|
1068
|
-
justify-content: space-between;
|
|
1069
1210
|
gap: 8px;
|
|
1070
|
-
|
|
1211
|
+
padding-block: 6px;
|
|
1212
|
+
border-radius: var(--nish-radius-sm);
|
|
1071
1213
|
color: var(--nish-hi);
|
|
1072
1214
|
font-size: var(--nish-text-sm);
|
|
1073
1215
|
font-weight: var(--nish-weight-medium);
|
|
@@ -1079,29 +1221,25 @@
|
|
|
1079
1221
|
:where(.nish-disclosure) > :where(summary)::-webkit-details-marker {
|
|
1080
1222
|
display: none;
|
|
1081
1223
|
}
|
|
1082
|
-
|
|
1224
|
+
/* The chevron comes first and turns a quarter when open, like the React Disclosure. */
|
|
1225
|
+
:where(.nish-disclosure) > :where(summary)::before {
|
|
1083
1226
|
content: '';
|
|
1084
1227
|
flex-shrink: 0;
|
|
1085
|
-
width:
|
|
1086
|
-
height:
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
transition: transform var(--nish-dur-fast) var(--nish-ease-out);
|
|
1092
|
-
}
|
|
1093
|
-
:where(.nish-disclosure[open]) > :where(summary)::after {
|
|
1094
|
-
margin-bottom: -3px;
|
|
1095
|
-
transform: rotate(-135deg);
|
|
1228
|
+
width: 14px;
|
|
1229
|
+
height: 14px;
|
|
1230
|
+
background: var(--nish-hi3);
|
|
1231
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1232
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1233
|
+
transition: transform 150ms;
|
|
1096
1234
|
}
|
|
1097
|
-
:where(.nish-disclosure) > :where(summary
|
|
1098
|
-
|
|
1235
|
+
:where(.nish-disclosure[open]) > :where(summary)::before {
|
|
1236
|
+
transform: rotate(90deg);
|
|
1099
1237
|
}
|
|
1100
1238
|
:where(.nish-disclosure) > :where(:not(summary)) {
|
|
1101
|
-
|
|
1239
|
+
padding: 4px 0 8px 24px;
|
|
1102
1240
|
color: var(--nish-hi2);
|
|
1103
1241
|
font-size: var(--nish-text-sm);
|
|
1104
|
-
line-height: 1.
|
|
1242
|
+
line-height: 1.25rem;
|
|
1105
1243
|
}
|
|
1106
1244
|
:where(.nish-disclosure--card) {
|
|
1107
1245
|
border: 1px solid var(--nish-line);
|
|
@@ -1110,12 +1248,11 @@
|
|
|
1110
1248
|
box-shadow: var(--nish-shadow-card);
|
|
1111
1249
|
}
|
|
1112
1250
|
:where(.nish-disclosure--card) > :where(summary) {
|
|
1113
|
-
|
|
1114
|
-
padding: 0 16px;
|
|
1251
|
+
padding: 12px 16px;
|
|
1115
1252
|
}
|
|
1116
1253
|
:where(.nish-disclosure--card) > :where(:not(summary)) {
|
|
1117
|
-
|
|
1118
|
-
|
|
1254
|
+
padding: 12px 16px;
|
|
1255
|
+
border-top: 1px solid var(--nish-line);
|
|
1119
1256
|
}
|
|
1120
1257
|
|
|
1121
1258
|
/* --- Status dot (.nish-dot) ---------------------------------------------------------
|
|
@@ -1198,14 +1335,16 @@
|
|
|
1198
1335
|
padding: 48px 24px;
|
|
1199
1336
|
border: 1px dashed var(--nish-line);
|
|
1200
1337
|
border-radius: var(--nish-radius-card, 12px);
|
|
1201
|
-
color: var(--nish-
|
|
1202
|
-
font-size: var(--nish-text-
|
|
1338
|
+
color: var(--nish-hi);
|
|
1339
|
+
font-size: var(--nish-text-base);
|
|
1203
1340
|
line-height: 1rem;
|
|
1204
1341
|
text-align: center;
|
|
1205
1342
|
}
|
|
1206
1343
|
:where(.nish-empty, .nish-error-state) :where(p) {
|
|
1207
1344
|
max-width: 24rem;
|
|
1208
1345
|
margin: 0;
|
|
1346
|
+
color: var(--nish-hi3);
|
|
1347
|
+
font-size: var(--nish-text-xs);
|
|
1209
1348
|
}
|
|
1210
1349
|
:where(.nish-empty-title) {
|
|
1211
1350
|
color: var(--nish-hi2);
|
|
@@ -1216,69 +1355,112 @@
|
|
|
1216
1355
|
:where(.nish-empty, .nish-error-state) > :where(button, a, .nish-btn) {
|
|
1217
1356
|
margin-top: 8px;
|
|
1218
1357
|
}
|
|
1358
|
+
:where(.nish-error-state)::before {
|
|
1359
|
+
/* The React ErrorState's 22px alert triangle. */
|
|
1360
|
+
content: '';
|
|
1361
|
+
flex-shrink: 0;
|
|
1362
|
+
width: 22px;
|
|
1363
|
+
height: 22px;
|
|
1364
|
+
background: var(--nish-loss);
|
|
1365
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1366
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1367
|
+
}
|
|
1368
|
+
:where(.nish-error-state) :where(p) {
|
|
1369
|
+
max-width: 28rem;
|
|
1370
|
+
color: var(--nish-hi2);
|
|
1371
|
+
font-size: var(--nish-text-sm);
|
|
1372
|
+
}
|
|
1373
|
+
:where(.nish-error-state) > :where(button, a, .nish-btn) {
|
|
1374
|
+
height: 26px;
|
|
1375
|
+
margin-top: 4px;
|
|
1376
|
+
}
|
|
1219
1377
|
:where(.nish-error-state) {
|
|
1220
1378
|
padding: 40px 24px;
|
|
1221
|
-
border: 1px solid color-mix(in
|
|
1379
|
+
border: 1px solid color-mix(in oklab, var(--nish-loss) 30%, transparent);
|
|
1222
1380
|
background: var(--nish-loss-soft);
|
|
1223
|
-
color: var(--nish-
|
|
1224
|
-
font-size: var(--nish-text-
|
|
1381
|
+
color: var(--nish-hi);
|
|
1382
|
+
font-size: var(--nish-text-base);
|
|
1225
1383
|
line-height: 1.25rem;
|
|
1226
1384
|
}
|
|
1227
1385
|
|
|
1228
1386
|
/* --- Toast (.nish-toast) -----------------------------------------------------------
|
|
1229
1387
|
What showToast() from @nish/ui/theme (window.nishTheme.showToast) renders, inside one
|
|
1230
1388
|
role="status" aria-live="polite" region. By hand:
|
|
1231
|
-
<div class="nish-toast nish-toast--warn"><
|
|
1232
|
-
not reachable. <a href="…">Open it anyway</a></p
|
|
1389
|
+
<div class="nish-toast nish-toast--warn"><span class="nish-toast-icon"><svg …/></span>
|
|
1390
|
+
<p class="nish-toast-body"><strong>mc</strong> is not reachable. <a href="…">Open it anyway</a></p>
|
|
1391
|
+
<button class="nish-toast-close" …></div> */
|
|
1233
1392
|
:where(.nish-toast) {
|
|
1234
1393
|
box-sizing: border-box;
|
|
1235
1394
|
position: fixed;
|
|
1236
1395
|
/* Centered with margins, not a transform: the rise animation owns transform. */
|
|
1237
1396
|
left: 0;
|
|
1238
1397
|
right: 0;
|
|
1239
|
-
bottom: max(calc(var(--nish-bottom-inset, 0px) + 8px), calc(
|
|
1398
|
+
bottom: max(calc(var(--nish-bottom-inset, 0px) + 8px), calc(12px + env(safe-area-inset-bottom)));
|
|
1240
1399
|
z-index: var(--nish-z-toast, 60);
|
|
1241
1400
|
display: flex;
|
|
1242
1401
|
align-items: flex-start;
|
|
1243
1402
|
gap: 10px;
|
|
1244
|
-
|
|
1403
|
+
/* The React Toaster: 12px side gutters and max-w-md on phones, a 24rem stack at the bottom right from 640px. */
|
|
1404
|
+
width: min(100% - 24px, 28rem);
|
|
1245
1405
|
margin: 0 auto;
|
|
1246
|
-
padding: 12px
|
|
1406
|
+
padding: 12px 14px;
|
|
1247
1407
|
border: 1px solid var(--nish-line-strong);
|
|
1248
|
-
border-radius:
|
|
1408
|
+
border-radius: 12px;
|
|
1249
1409
|
background: var(--nish-elevated);
|
|
1250
1410
|
box-shadow: var(--nish-shadow-pop);
|
|
1251
|
-
color: var(--nish-
|
|
1252
|
-
font-size: var(--nish-text-
|
|
1253
|
-
line-height: 1.
|
|
1411
|
+
color: var(--nish-hi);
|
|
1412
|
+
font-size: var(--nish-text-base);
|
|
1413
|
+
line-height: 1.375;
|
|
1254
1414
|
animation: nish-rise-in 160ms var(--nish-ease-out, ease-out) both;
|
|
1255
1415
|
}
|
|
1416
|
+
/* The tone icon showToast() draws first (15px, like the React toast). */
|
|
1417
|
+
:where(.nish-toast-icon) {
|
|
1418
|
+
display: inline-flex;
|
|
1419
|
+
flex-shrink: 0;
|
|
1420
|
+
margin-top: 2px;
|
|
1421
|
+
color: var(--nish-accent);
|
|
1422
|
+
}
|
|
1423
|
+
:where(.nish-toast-icon) > :where(svg) {
|
|
1424
|
+
display: block;
|
|
1425
|
+
width: 15px;
|
|
1426
|
+
height: 15px;
|
|
1427
|
+
}
|
|
1428
|
+
:where(.nish-toast--ok) > :where(.nish-toast-icon) {
|
|
1429
|
+
color: var(--nish-ok);
|
|
1430
|
+
}
|
|
1431
|
+
:where(.nish-toast--warn) > :where(.nish-toast-icon) {
|
|
1432
|
+
color: var(--nish-warn);
|
|
1433
|
+
}
|
|
1434
|
+
:where(.nish-toast--loss) > :where(.nish-toast-icon) {
|
|
1435
|
+
color: var(--nish-loss);
|
|
1436
|
+
}
|
|
1256
1437
|
:where(.nish-toast-body) {
|
|
1257
1438
|
flex: 1;
|
|
1258
1439
|
min-width: 0;
|
|
1259
1440
|
margin: 0;
|
|
1260
|
-
|
|
1261
|
-
overflow-wrap: anywhere;
|
|
1262
|
-
}
|
|
1263
|
-
:where(.nish-toast) :where(strong, a) {
|
|
1441
|
+
font-size: var(--nish-text-sm);
|
|
1264
1442
|
color: var(--nish-hi);
|
|
1443
|
+
font-weight: var(--nish-weight-medium);
|
|
1444
|
+
overflow-wrap: anywhere;
|
|
1265
1445
|
}
|
|
1266
1446
|
:where(.nish-toast) :where(strong) {
|
|
1267
1447
|
font-weight: var(--nish-weight-semibold);
|
|
1268
1448
|
}
|
|
1269
1449
|
:where(.nish-toast) :where(a) {
|
|
1450
|
+
color: var(--nish-hi);
|
|
1270
1451
|
text-decoration: underline;
|
|
1271
1452
|
text-underline-offset: 3px;
|
|
1272
1453
|
}
|
|
1273
1454
|
:where(.nish-toast-action) {
|
|
1274
1455
|
flex-shrink: 0;
|
|
1275
|
-
margin: -
|
|
1276
|
-
padding:
|
|
1456
|
+
margin: -4px 0;
|
|
1457
|
+
padding: 4px 8px;
|
|
1277
1458
|
border: 0;
|
|
1278
|
-
border-radius:
|
|
1459
|
+
border-radius: 6px;
|
|
1279
1460
|
background: transparent;
|
|
1280
1461
|
color: var(--nish-accent);
|
|
1281
1462
|
font: inherit;
|
|
1463
|
+
font-size: var(--nish-text-sm);
|
|
1282
1464
|
font-weight: var(--nish-weight-medium);
|
|
1283
1465
|
text-decoration: none;
|
|
1284
1466
|
cursor: pointer;
|
|
@@ -1295,11 +1477,12 @@
|
|
|
1295
1477
|
flex-shrink: 0;
|
|
1296
1478
|
align-items: center;
|
|
1297
1479
|
justify-content: center;
|
|
1298
|
-
width:
|
|
1299
|
-
height:
|
|
1480
|
+
width: 22px;
|
|
1481
|
+
height: 22px;
|
|
1482
|
+
margin: -4px;
|
|
1300
1483
|
padding: 0;
|
|
1301
1484
|
border: 0;
|
|
1302
|
-
border-radius:
|
|
1485
|
+
border-radius: 6px;
|
|
1303
1486
|
background: transparent;
|
|
1304
1487
|
color: var(--nish-hi3);
|
|
1305
1488
|
cursor: pointer;
|
|
@@ -1309,16 +1492,23 @@
|
|
|
1309
1492
|
color: var(--nish-hi);
|
|
1310
1493
|
}
|
|
1311
1494
|
:where(.nish-toast--ok) {
|
|
1312
|
-
border-color: color-mix(in
|
|
1495
|
+
border-color: color-mix(in oklab, var(--nish-ok) 35%, transparent);
|
|
1313
1496
|
}
|
|
1314
1497
|
:where(.nish-toast--warn) {
|
|
1315
|
-
border-color: color-mix(in
|
|
1498
|
+
border-color: color-mix(in oklab, var(--nish-warn) 40%, transparent);
|
|
1316
1499
|
}
|
|
1317
1500
|
:where(.nish-toast--loss) {
|
|
1318
|
-
border-color: color-mix(in
|
|
1501
|
+
border-color: color-mix(in oklab, var(--nish-loss) 40%, transparent);
|
|
1319
1502
|
}
|
|
1320
|
-
|
|
1321
|
-
|
|
1503
|
+
/* info keeps the neutral border, like the React info toast. */
|
|
1504
|
+
@media (min-width: 640px) {
|
|
1505
|
+
:where(.nish-toast) {
|
|
1506
|
+
left: auto;
|
|
1507
|
+
right: 20px;
|
|
1508
|
+
width: 24rem;
|
|
1509
|
+
margin: 0;
|
|
1510
|
+
bottom: calc(var(--nish-bottom-inset, 0px) + 1.25rem + min(var(--nish-bottom-bar-h, 0px), 1rem));
|
|
1511
|
+
}
|
|
1322
1512
|
}
|
|
1323
1513
|
@media (prefers-reduced-motion: reduce) {
|
|
1324
1514
|
:where(.nish-toast) {
|
|
@@ -1341,7 +1531,7 @@
|
|
|
1341
1531
|
box-sizing: border-box;
|
|
1342
1532
|
width: 100%;
|
|
1343
1533
|
max-width: 100%;
|
|
1344
|
-
max-height:
|
|
1534
|
+
max-height: 92dvh;
|
|
1345
1535
|
margin: auto auto 0;
|
|
1346
1536
|
padding: 0 0 env(safe-area-inset-bottom);
|
|
1347
1537
|
overflow-y: auto;
|
|
@@ -1350,12 +1540,19 @@
|
|
|
1350
1540
|
border-radius: 16px 16px 0 0;
|
|
1351
1541
|
background: var(--nish-surface);
|
|
1352
1542
|
box-shadow: var(--nish-shadow-modal);
|
|
1353
|
-
color: var(--nish-
|
|
1543
|
+
color: var(--nish-hi);
|
|
1354
1544
|
font-family: var(--nish-font-sans, inherit);
|
|
1355
|
-
font-size: var(--nish-text-
|
|
1356
|
-
line-height:
|
|
1545
|
+
font-size: var(--nish-text-base);
|
|
1546
|
+
line-height: 1.25rem;
|
|
1357
1547
|
animation: nish-sheet-in 240ms var(--nish-ease-out, ease-out) both;
|
|
1358
1548
|
}
|
|
1549
|
+
:where(.nish-dialog)::before {
|
|
1550
|
+
/* The phone grab handle: a 44px target with a 40x4 bar, like the React Modal. */
|
|
1551
|
+
content: '';
|
|
1552
|
+
display: block;
|
|
1553
|
+
height: 44px;
|
|
1554
|
+
background: linear-gradient(var(--nish-line-strong), var(--nish-line-strong)) center / 40px 4px no-repeat;
|
|
1555
|
+
}
|
|
1359
1556
|
:where(.nish-dialog)::backdrop {
|
|
1360
1557
|
background: rgb(0 0 0 / 0.6);
|
|
1361
1558
|
background: color-mix(in srgb, var(--nish-scrim, #000) 60%, transparent);
|
|
@@ -1363,7 +1560,8 @@
|
|
|
1363
1560
|
}
|
|
1364
1561
|
:where(.nish-dialog-title) {
|
|
1365
1562
|
margin: 0;
|
|
1366
|
-
|
|
1563
|
+
/* The React header: 12px (16px from 640px) above a title with 4px of its own, and room for the 28px close button. */
|
|
1564
|
+
padding: 16px 20px 10px;
|
|
1367
1565
|
color: var(--nish-hi);
|
|
1368
1566
|
font-size: var(--nish-text-base);
|
|
1369
1567
|
font-weight: var(--nish-weight-semibold);
|
|
@@ -1376,6 +1574,8 @@
|
|
|
1376
1574
|
}
|
|
1377
1575
|
:where(.nish-dialog-body) {
|
|
1378
1576
|
margin: 0;
|
|
1577
|
+
color: var(--nish-hi2);
|
|
1578
|
+
font-size: var(--nish-text-sm);
|
|
1379
1579
|
padding: 0 20px 20px;
|
|
1380
1580
|
overflow-wrap: anywhere;
|
|
1381
1581
|
}
|
|
@@ -1399,6 +1599,12 @@
|
|
|
1399
1599
|
animation-name: nish-rise-in;
|
|
1400
1600
|
animation-duration: 200ms;
|
|
1401
1601
|
}
|
|
1602
|
+
:where(.nish-dialog)::before {
|
|
1603
|
+
display: none;
|
|
1604
|
+
}
|
|
1605
|
+
:where(.nish-dialog-title) {
|
|
1606
|
+
padding-top: 20px;
|
|
1607
|
+
}
|
|
1402
1608
|
}
|
|
1403
1609
|
@media (prefers-reduced-motion: reduce) {
|
|
1404
1610
|
:where(.nish-dialog),
|
|
@@ -1493,7 +1699,7 @@
|
|
|
1493
1699
|
:where(.nish-skeleton--text) {
|
|
1494
1700
|
height: 1em;
|
|
1495
1701
|
width: 100%;
|
|
1496
|
-
border-radius:
|
|
1702
|
+
border-radius: 6px;
|
|
1497
1703
|
}
|
|
1498
1704
|
:where(.nish-skeleton--circle) {
|
|
1499
1705
|
aspect-ratio: 1;
|
|
@@ -1609,7 +1815,7 @@
|
|
|
1609
1815
|
box-sizing: border-box;
|
|
1610
1816
|
width: 100%;
|
|
1611
1817
|
max-width: 100%;
|
|
1612
|
-
max-height:
|
|
1818
|
+
max-height: 92dvh;
|
|
1613
1819
|
margin: auto auto 0;
|
|
1614
1820
|
padding: 0 0 env(safe-area-inset-bottom);
|
|
1615
1821
|
overflow: hidden;
|
|
@@ -1619,10 +1825,10 @@
|
|
|
1619
1825
|
border-radius: 16px 16px 0 0;
|
|
1620
1826
|
background: var(--nish-surface);
|
|
1621
1827
|
box-shadow: var(--nish-shadow-modal);
|
|
1622
|
-
color: var(--nish-
|
|
1828
|
+
color: var(--nish-hi);
|
|
1623
1829
|
font-family: var(--nish-font-sans, inherit);
|
|
1624
|
-
font-size: var(--nish-text-
|
|
1625
|
-
line-height:
|
|
1830
|
+
font-size: var(--nish-text-base);
|
|
1831
|
+
line-height: 1.25rem;
|
|
1626
1832
|
/* The handle and header are drag targets; the body scrolls itself (pan-y below). */
|
|
1627
1833
|
touch-action: none;
|
|
1628
1834
|
}
|
|
@@ -1632,13 +1838,11 @@
|
|
|
1632
1838
|
animation: nish-sheet-in 240ms var(--nish-ease-out, ease-out) both;
|
|
1633
1839
|
}
|
|
1634
1840
|
:where(.nish-sheet)::before {
|
|
1841
|
+
/* The grab handle: a 44px target with a 40x4 bar, like the React Modal. */
|
|
1635
1842
|
content: '';
|
|
1636
1843
|
flex-shrink: 0;
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
margin: 8px auto 0;
|
|
1640
|
-
border-radius: 9999px;
|
|
1641
|
-
background: var(--nish-line-strong);
|
|
1844
|
+
height: 44px;
|
|
1845
|
+
background: linear-gradient(var(--nish-line-strong), var(--nish-line-strong)) center / 40px 4px no-repeat;
|
|
1642
1846
|
}
|
|
1643
1847
|
:where(.nish-sheet)::backdrop {
|
|
1644
1848
|
background: rgb(0 0 0 / 0.6);
|
|
@@ -1660,14 +1864,19 @@
|
|
|
1660
1864
|
:where(.nish-sheet-header) {
|
|
1661
1865
|
display: flex;
|
|
1662
1866
|
flex-shrink: 0;
|
|
1663
|
-
align-items:
|
|
1867
|
+
align-items: flex-start;
|
|
1664
1868
|
justify-content: space-between;
|
|
1665
1869
|
gap: 12px;
|
|
1666
|
-
padding:
|
|
1870
|
+
padding: 12px 14px 8px 20px;
|
|
1871
|
+
}
|
|
1872
|
+
:where(.nish-sheet-header) > :where(.nish-icon-btn) {
|
|
1873
|
+
width: 28px;
|
|
1874
|
+
height: 28px;
|
|
1667
1875
|
}
|
|
1668
1876
|
:where(.nish-sheet-title) {
|
|
1669
1877
|
min-width: 0;
|
|
1670
1878
|
margin: 0;
|
|
1879
|
+
padding-top: 4px;
|
|
1671
1880
|
color: var(--nish-hi);
|
|
1672
1881
|
font-size: var(--nish-text-base);
|
|
1673
1882
|
font-weight: var(--nish-weight-semibold);
|
|
@@ -1676,8 +1885,10 @@
|
|
|
1676
1885
|
}
|
|
1677
1886
|
:where(.nish-sheet-body) {
|
|
1678
1887
|
min-height: 0;
|
|
1888
|
+
color: var(--nish-hi2);
|
|
1889
|
+
font-size: var(--nish-text-sm);
|
|
1679
1890
|
flex: 1 1 auto;
|
|
1680
|
-
padding: 0 20px
|
|
1891
|
+
padding: 0 20px 20px;
|
|
1681
1892
|
overflow-y: auto;
|
|
1682
1893
|
overscroll-behavior: contain;
|
|
1683
1894
|
touch-action: pan-y;
|
|
@@ -1695,7 +1906,7 @@
|
|
|
1695
1906
|
}
|
|
1696
1907
|
@media (min-width: 640px) {
|
|
1697
1908
|
:where(.nish-sheet) {
|
|
1698
|
-
width: min(100% - 32px,
|
|
1909
|
+
width: min(100% - 32px, 28rem);
|
|
1699
1910
|
margin: auto;
|
|
1700
1911
|
padding-bottom: 0;
|
|
1701
1912
|
border-bottom: 1px solid var(--nish-line);
|
|
@@ -1712,7 +1923,7 @@
|
|
|
1712
1923
|
animation: nish-fade-out 160ms ease-in both;
|
|
1713
1924
|
}
|
|
1714
1925
|
:where(.nish-sheet-header) {
|
|
1715
|
-
padding-top:
|
|
1926
|
+
padding-top: 16px;
|
|
1716
1927
|
}
|
|
1717
1928
|
}
|
|
1718
1929
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1728,43 +1939,46 @@
|
|
|
1728
1939
|
<label class="nish-check-row"><input type="checkbox" class="nish-checkbox"> Email me</label>
|
|
1729
1940
|
<label class="nish-check-row"><input type="checkbox" class="nish-switch" role="switch"> Alerts</label>
|
|
1730
1941
|
<button type="button" class="nish-switch" role="switch" aria-checked="true"></button>
|
|
1731
|
-
The
|
|
1732
|
-
|
|
1942
|
+
The Checkbox (16px box) and Switch (36x20 track) components. The wrapping .nish-check-row
|
|
1943
|
+
is the 44px target under a coarse pointer. Set --accent on the control or an ancestor to
|
|
1944
|
+
recolor it (falls back to the theme accent). */
|
|
1733
1945
|
:where(.nish-check-row) {
|
|
1734
1946
|
box-sizing: border-box;
|
|
1735
1947
|
display: flex;
|
|
1736
|
-
align-items:
|
|
1737
|
-
gap:
|
|
1738
|
-
|
|
1739
|
-
color: var(--nish-hi2);
|
|
1948
|
+
align-items: flex-start;
|
|
1949
|
+
gap: 10px;
|
|
1950
|
+
color: var(--nish-hi);
|
|
1740
1951
|
font-size: var(--nish-text-sm);
|
|
1952
|
+
line-height: 1.375;
|
|
1741
1953
|
cursor: pointer;
|
|
1742
1954
|
}
|
|
1743
1955
|
:where(.nish-checkbox) {
|
|
1744
1956
|
appearance: none;
|
|
1745
1957
|
-webkit-appearance: none;
|
|
1746
1958
|
position: relative;
|
|
1959
|
+
color: inherit;
|
|
1960
|
+
font-size: inherit;
|
|
1747
1961
|
box-sizing: border-box;
|
|
1748
1962
|
display: inline-block;
|
|
1749
1963
|
flex-shrink: 0;
|
|
1750
|
-
width:
|
|
1751
|
-
height:
|
|
1752
|
-
margin: 0;
|
|
1753
|
-
border:
|
|
1754
|
-
border-radius:
|
|
1964
|
+
width: 16px;
|
|
1965
|
+
height: 16px;
|
|
1966
|
+
margin: 2px 0 0;
|
|
1967
|
+
border: 1px solid var(--nish-line-strong);
|
|
1968
|
+
border-radius: var(--nish-radius-xs, 4px);
|
|
1755
1969
|
background: var(--nish-surface);
|
|
1756
1970
|
cursor: pointer;
|
|
1757
1971
|
transition:
|
|
1758
|
-
background-color
|
|
1759
|
-
border-color
|
|
1972
|
+
background-color 150ms,
|
|
1973
|
+
border-color 150ms;
|
|
1760
1974
|
}
|
|
1761
1975
|
:where(.nish-checkbox)::after {
|
|
1762
1976
|
content: '';
|
|
1763
1977
|
position: absolute;
|
|
1764
|
-
top:
|
|
1765
|
-
left:
|
|
1766
|
-
width:
|
|
1767
|
-
height:
|
|
1978
|
+
top: 1px;
|
|
1979
|
+
left: 4px;
|
|
1980
|
+
width: 4px;
|
|
1981
|
+
height: 8px;
|
|
1768
1982
|
border: solid var(--nish-on-accent);
|
|
1769
1983
|
border-width: 0 2px 2px 0;
|
|
1770
1984
|
transform: rotate(45deg) scale(0);
|
|
@@ -1778,9 +1992,9 @@
|
|
|
1778
1992
|
transform: rotate(45deg) scale(1);
|
|
1779
1993
|
}
|
|
1780
1994
|
:where(.nish-checkbox:indeterminate)::after {
|
|
1781
|
-
top:
|
|
1995
|
+
top: 6px;
|
|
1782
1996
|
left: 3px;
|
|
1783
|
-
width:
|
|
1997
|
+
width: 8px;
|
|
1784
1998
|
height: 0;
|
|
1785
1999
|
border-width: 2px 0 0;
|
|
1786
2000
|
transform: scale(1);
|
|
@@ -1797,20 +2011,20 @@
|
|
|
1797
2011
|
appearance: none;
|
|
1798
2012
|
-webkit-appearance: none;
|
|
1799
2013
|
position: relative;
|
|
2014
|
+
color: var(--nish-hi);
|
|
2015
|
+
font-size: var(--nish-text-base);
|
|
1800
2016
|
box-sizing: border-box;
|
|
1801
2017
|
display: inline-block;
|
|
1802
2018
|
flex-shrink: 0;
|
|
1803
|
-
width:
|
|
1804
|
-
height:
|
|
2019
|
+
width: 36px;
|
|
2020
|
+
height: 20px;
|
|
1805
2021
|
margin: 0;
|
|
1806
2022
|
padding: 0;
|
|
1807
|
-
border:
|
|
2023
|
+
border: 0;
|
|
1808
2024
|
border-radius: 9999px;
|
|
1809
|
-
background: var(--nish-
|
|
2025
|
+
background: var(--nish-line-strong);
|
|
1810
2026
|
cursor: pointer;
|
|
1811
|
-
transition:
|
|
1812
|
-
background-color 150ms,
|
|
1813
|
-
border-color 150ms;
|
|
2027
|
+
transition: background-color 150ms;
|
|
1814
2028
|
}
|
|
1815
2029
|
/* The knob. */
|
|
1816
2030
|
:where(.nish-switch)::after {
|
|
@@ -1818,29 +2032,65 @@
|
|
|
1818
2032
|
position: absolute;
|
|
1819
2033
|
top: 2px;
|
|
1820
2034
|
left: 2px;
|
|
1821
|
-
width:
|
|
1822
|
-
height:
|
|
2035
|
+
width: 16px;
|
|
2036
|
+
height: 16px;
|
|
1823
2037
|
border-radius: 9999px;
|
|
1824
|
-
background: var(--nish-
|
|
2038
|
+
background: var(--nish-surface);
|
|
1825
2039
|
box-shadow: var(--nish-shadow-card);
|
|
1826
2040
|
transition:
|
|
1827
|
-
transform 150ms
|
|
2041
|
+
transform 150ms,
|
|
1828
2042
|
background-color 150ms;
|
|
1829
2043
|
}
|
|
1830
|
-
/* Extends the touch target to 44px
|
|
1831
|
-
:
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
2044
|
+
/* Extends the touch target to 44px under a coarse pointer without moving layout. */
|
|
2045
|
+
@media (pointer: coarse) {
|
|
2046
|
+
:where(.nish-switch)::before {
|
|
2047
|
+
content: '';
|
|
2048
|
+
position: absolute;
|
|
2049
|
+
inset: -12px -4px;
|
|
2050
|
+
}
|
|
2051
|
+
:where(.nish-check-row) {
|
|
2052
|
+
align-items: center;
|
|
2053
|
+
min-height: var(--nish-tap-min, 44px);
|
|
2054
|
+
padding-block: 10px;
|
|
2055
|
+
}
|
|
1835
2056
|
}
|
|
1836
2057
|
:where(.nish-switch:checked, .nish-switch[aria-checked='true']) {
|
|
1837
|
-
border-color: var(--accent, var(--nish-accent));
|
|
1838
2058
|
background: var(--accent, var(--nish-accent));
|
|
1839
2059
|
}
|
|
1840
2060
|
:where(.nish-switch:checked, .nish-switch[aria-checked='true'])::after {
|
|
1841
|
-
transform: translateX(
|
|
2061
|
+
transform: translateX(16px);
|
|
1842
2062
|
background: var(--nish-on-accent);
|
|
1843
2063
|
}
|
|
2064
|
+
/* The small switch: a 28x16 track with a 12px knob (the React size="sm"). */
|
|
2065
|
+
:where(.nish-switch--sm) {
|
|
2066
|
+
--nish-sw-w: 28px;
|
|
2067
|
+
width: 28px;
|
|
2068
|
+
height: 16px;
|
|
2069
|
+
}
|
|
2070
|
+
:where(.nish-switch--sm)::after {
|
|
2071
|
+
width: 12px;
|
|
2072
|
+
height: 12px;
|
|
2073
|
+
}
|
|
2074
|
+
:where(.nish-switch--sm:checked, .nish-switch--sm[aria-checked='true'])::after {
|
|
2075
|
+
transform: translateX(12px);
|
|
2076
|
+
}
|
|
2077
|
+
:where(.nish-check-row:has(> .nish-switch--sm)) {
|
|
2078
|
+
font-size: var(--nish-text-xs);
|
|
2079
|
+
}
|
|
2080
|
+
/* The React switch keeps 12px between the track and its text, and a 44px button around the
|
|
2081
|
+
track under a coarse pointer (the track sits centred in it). */
|
|
2082
|
+
:where(.nish-check-row) > :where(.nish-switch:first-child) {
|
|
2083
|
+
margin-right: 2px;
|
|
2084
|
+
}
|
|
2085
|
+
@media (pointer: coarse) {
|
|
2086
|
+
:where(.nish-check-row) > :where(.nish-switch) {
|
|
2087
|
+
margin-right: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2);
|
|
2088
|
+
margin-left: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2);
|
|
2089
|
+
}
|
|
2090
|
+
:where(.nish-check-row) > :where(.nish-switch:first-child) {
|
|
2091
|
+
margin-right: calc((var(--nish-tap-min, 44px) - var(--nish-sw-w, 36px)) / 2 + 2px);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
1844
2094
|
@media (prefers-reduced-motion: reduce) {
|
|
1845
2095
|
:where(.nish-checkbox),
|
|
1846
2096
|
:where(.nish-checkbox)::after,
|
|
@@ -1905,6 +2155,15 @@
|
|
|
1905
2155
|
background-color 150ms,
|
|
1906
2156
|
color 150ms;
|
|
1907
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
|
+
}
|
|
1908
2167
|
:where(.nish-subnav) > :where(a:hover, button:hover) {
|
|
1909
2168
|
background: var(--nish-elevated);
|
|
1910
2169
|
color: var(--nish-hi);
|
|
@@ -2098,7 +2357,8 @@
|
|
|
2098
2357
|
z-index: 40;
|
|
2099
2358
|
display: flex;
|
|
2100
2359
|
align-items: stretch;
|
|
2101
|
-
|
|
2360
|
+
min-height: 56px;
|
|
2361
|
+
padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
|
2102
2362
|
border-top: 1px solid var(--nish-line);
|
|
2103
2363
|
background: var(--nish-surface);
|
|
2104
2364
|
}
|
|
@@ -2108,20 +2368,20 @@
|
|
|
2108
2368
|
display: flex;
|
|
2109
2369
|
flex: 1 1 0;
|
|
2110
2370
|
min-width: 0;
|
|
2111
|
-
min-height: 48px;
|
|
2112
2371
|
flex-direction: column;
|
|
2113
2372
|
align-items: center;
|
|
2114
2373
|
justify-content: center;
|
|
2115
2374
|
gap: 2px;
|
|
2116
|
-
|
|
2117
|
-
|
|
2375
|
+
/* The React cell is 56px tall with 2px side padding and the tinted pill inside it. */
|
|
2376
|
+
margin: 4px 2px;
|
|
2377
|
+
padding: 4px 0;
|
|
2118
2378
|
border: 0;
|
|
2119
2379
|
border-radius: 12px;
|
|
2120
2380
|
background: transparent;
|
|
2121
2381
|
color: var(--nish-hi3);
|
|
2122
2382
|
font: inherit;
|
|
2123
2383
|
font-size: 11px;
|
|
2124
|
-
line-height: 1.
|
|
2384
|
+
line-height: 1.25;
|
|
2125
2385
|
text-decoration: none;
|
|
2126
2386
|
cursor: pointer;
|
|
2127
2387
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -2134,8 +2394,8 @@
|
|
|
2134
2394
|
}
|
|
2135
2395
|
:where(.nish-bottom-nav-item) > :where(svg) {
|
|
2136
2396
|
flex-shrink: 0;
|
|
2137
|
-
width:
|
|
2138
|
-
height:
|
|
2397
|
+
width: 24px;
|
|
2398
|
+
height: 24px;
|
|
2139
2399
|
}
|
|
2140
2400
|
:where(.nish-bottom-nav-item[aria-current='page']) {
|
|
2141
2401
|
background: var(--nish-accent-soft);
|
|
@@ -2211,32 +2471,2194 @@
|
|
|
2211
2471
|
background: linear-gradient(to right, var(--accent, var(--nish-accent)) var(--p), var(--nish-line) var(--p));
|
|
2212
2472
|
}
|
|
2213
2473
|
|
|
2214
|
-
/* ---
|
|
2474
|
+
/* --- Textarea that grows (.nish-textarea--grow) --------------------------------------
|
|
2475
|
+
<textarea class="nish-textarea nish-textarea--grow" rows="3" style="--nish-rows: 3">
|
|
2476
|
+
Grows with its text (field-sizing: content), no resize handle. --nish-rows sets the
|
|
2477
|
+
minimum height in lines (default 4, like the React Textarea's rows). Where field-sizing
|
|
2478
|
+
is not supported it stays a fixed, scrollable box. */
|
|
2479
|
+
:where(.nish-textarea--grow) {
|
|
2480
|
+
field-sizing: content;
|
|
2481
|
+
min-height: calc(var(--nish-rows, 4) * 1.25rem + 18px);
|
|
2482
|
+
resize: none;
|
|
2483
|
+
}
|
|
2215
2484
|
@media (pointer: coarse) {
|
|
2216
|
-
:where(.nish-
|
|
2217
|
-
min-
|
|
2218
|
-
min-height: var(--nish-tap-min);
|
|
2485
|
+
:where(.nish-textarea--grow) {
|
|
2486
|
+
min-height: calc(var(--nish-rows, 4) * 1.5rem + 18px);
|
|
2219
2487
|
}
|
|
2220
2488
|
}
|
|
2221
2489
|
|
|
2222
|
-
/* ---
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
:
|
|
2235
|
-
|
|
2490
|
+
/* --- Tabs (.nish-tabs > .nish-tab) ----------------------------------------------------
|
|
2491
|
+
The Tabs component. Underline by default; --pill is the quieter switcher for a toolbar;
|
|
2492
|
+
--sm and --xs are the smaller sizes; --block gives each tab an equal share.
|
|
2493
|
+
<div class="nish-tabs" role="tablist" aria-label="Sections">
|
|
2494
|
+
<button class="nish-tab" role="tab" aria-selected="true">Overview</button>
|
|
2495
|
+
<button class="nish-tab" role="tab" aria-selected="false">Activity</button>
|
|
2496
|
+
</div>
|
|
2497
|
+
A router link marks the current tab with aria-current="page" instead. <nish-tabs> builds
|
|
2498
|
+
this markup and handles the keys and panels. */
|
|
2499
|
+
:where(.nish-tabs) {
|
|
2500
|
+
display: flex;
|
|
2501
|
+
align-items: flex-end;
|
|
2502
|
+
max-width: 100%;
|
|
2503
|
+
gap: 20px;
|
|
2504
|
+
overflow-x: auto;
|
|
2505
|
+
scrollbar-width: none;
|
|
2506
|
+
box-shadow: inset 0 -1px 0 var(--nish-line);
|
|
2507
|
+
}
|
|
2508
|
+
:where(.nish-tabs)::-webkit-scrollbar {
|
|
2509
|
+
display: none;
|
|
2510
|
+
}
|
|
2511
|
+
:where(.nish-tabs--pill) {
|
|
2512
|
+
gap: 4px;
|
|
2513
|
+
box-shadow: none;
|
|
2514
|
+
}
|
|
2515
|
+
:where(.nish-tabs--block) {
|
|
2516
|
+
width: 100%;
|
|
2517
|
+
}
|
|
2518
|
+
:where(.nish-tabs--block:not(.nish-tabs--pill)) {
|
|
2519
|
+
gap: 4px;
|
|
2520
|
+
}
|
|
2521
|
+
:where(.nish-tab) {
|
|
2522
|
+
box-sizing: border-box;
|
|
2523
|
+
position: relative;
|
|
2524
|
+
display: inline-flex;
|
|
2525
|
+
flex-shrink: 0;
|
|
2526
|
+
flex-direction: column;
|
|
2527
|
+
align-items: flex-start;
|
|
2528
|
+
justify-content: center;
|
|
2529
|
+
height: 40px;
|
|
2530
|
+
margin: 0;
|
|
2531
|
+
padding: 0 2px;
|
|
2532
|
+
border: 0;
|
|
2533
|
+
border-bottom: 2px solid transparent;
|
|
2534
|
+
border-radius: 0;
|
|
2535
|
+
background: transparent;
|
|
2536
|
+
color: var(--nish-hi3);
|
|
2537
|
+
font: inherit;
|
|
2538
|
+
font-size: var(--nish-text-sm);
|
|
2539
|
+
font-weight: var(--nish-weight-medium);
|
|
2540
|
+
line-height: 1.25rem;
|
|
2541
|
+
text-decoration: none;
|
|
2542
|
+
white-space: nowrap;
|
|
2543
|
+
cursor: pointer;
|
|
2544
|
+
transition: color 150ms;
|
|
2545
|
+
}
|
|
2546
|
+
:where(.nish-tab:hover) {
|
|
2547
|
+
color: var(--nish-hi);
|
|
2548
|
+
}
|
|
2549
|
+
:where(.nish-tab[aria-selected='true'], .nish-tab[aria-current]:not([aria-current='false'])) {
|
|
2550
|
+
border-bottom-color: var(--nish-accent);
|
|
2551
|
+
color: var(--nish-hi);
|
|
2552
|
+
}
|
|
2553
|
+
:where(.nish-tab:focus-visible) {
|
|
2554
|
+
outline-offset: -2px;
|
|
2555
|
+
}
|
|
2556
|
+
:where(.nish-tab:disabled, .nish-tab[aria-disabled='true']) {
|
|
2557
|
+
color: var(--nish-ghost);
|
|
2558
|
+
cursor: not-allowed;
|
|
2559
|
+
}
|
|
2560
|
+
:where(.nish-tabs--sm .nish-tab) {
|
|
2561
|
+
height: 32px;
|
|
2562
|
+
font-size: var(--nish-text-xs);
|
|
2563
|
+
line-height: 1rem;
|
|
2564
|
+
}
|
|
2565
|
+
:where(.nish-tabs--xs .nish-tab) {
|
|
2566
|
+
height: 28px;
|
|
2567
|
+
font-size: var(--nish-text-2xs);
|
|
2568
|
+
line-height: 1rem;
|
|
2569
|
+
}
|
|
2570
|
+
:where(.nish-tabs--pill .nish-tab) {
|
|
2571
|
+
height: 32px;
|
|
2572
|
+
padding: 0 12px;
|
|
2573
|
+
border-bottom: 0;
|
|
2574
|
+
border-radius: var(--nish-radius-sm);
|
|
2575
|
+
}
|
|
2576
|
+
:where(.nish-tabs--pill .nish-tab:hover) {
|
|
2577
|
+
background: color-mix(in srgb, var(--nish-elevated) 60%, transparent);
|
|
2578
|
+
}
|
|
2579
|
+
:where(.nish-tabs--pill .nish-tab[aria-selected='true'], .nish-tabs--pill .nish-tab[aria-current]:not([aria-current='false'])) {
|
|
2580
|
+
background: var(--nish-elevated);
|
|
2581
|
+
}
|
|
2582
|
+
:where(.nish-tabs--pill.nish-tabs--sm .nish-tab) {
|
|
2583
|
+
height: 28px;
|
|
2584
|
+
padding: 0 10px;
|
|
2585
|
+
}
|
|
2586
|
+
:where(.nish-tabs--pill.nish-tabs--xs .nish-tab) {
|
|
2587
|
+
height: 24px;
|
|
2588
|
+
padding: 0 8px;
|
|
2589
|
+
}
|
|
2590
|
+
:where(.nish-tabs--block .nish-tab) {
|
|
2591
|
+
flex: 1 1 0;
|
|
2592
|
+
min-width: 0;
|
|
2593
|
+
align-items: center;
|
|
2594
|
+
text-align: center;
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
/* --- Combobox (.nish-combobox) --------------------------------------------------------
|
|
2598
|
+
The Combobox component: a text input that filters a listbox under it. <nish-combobox>
|
|
2599
|
+
builds this markup and runs the keyboard model.
|
|
2600
|
+
<div class="nish-combobox">
|
|
2601
|
+
<input class="nish-input nish-combobox-input" role="combobox" aria-expanded="true" …>
|
|
2602
|
+
<button class="nish-combobox-clear" aria-label="Clear" tabindex="-1"><span>×</span></button>
|
|
2603
|
+
<ul class="nish-combobox-list" role="listbox">
|
|
2604
|
+
<li class="nish-combobox-option" role="option" data-active aria-selected="false">
|
|
2605
|
+
<span>Austin</span><span class="nish-combobox-hint">TX</span></li>
|
|
2606
|
+
<li class="nish-combobox-empty">No matches</li>
|
|
2607
|
+
</ul>
|
|
2608
|
+
</div>
|
|
2609
|
+
data-placement="top" on the list opens it above the input. A selected option shows a check. */
|
|
2610
|
+
:where(.nish-combobox) {
|
|
2611
|
+
position: relative;
|
|
2612
|
+
width: 100%;
|
|
2613
|
+
min-width: 0;
|
|
2614
|
+
}
|
|
2615
|
+
:where(.nish-combobox-input) {
|
|
2616
|
+
padding-right: 44px;
|
|
2617
|
+
}
|
|
2618
|
+
:where(.nish-combobox--sm) > :where(.nish-combobox-input) {
|
|
2619
|
+
height: 32px;
|
|
2620
|
+
padding-left: 10px;
|
|
2621
|
+
}
|
|
2622
|
+
@media (pointer: fine) {
|
|
2623
|
+
:where(.nish-combobox--sm) > :where(.nish-combobox-input) {
|
|
2624
|
+
font-size: var(--nish-text-xs);
|
|
2236
2625
|
}
|
|
2237
2626
|
}
|
|
2627
|
+
:where(.nish-combobox-clear) {
|
|
2628
|
+
position: absolute;
|
|
2629
|
+
top: 0;
|
|
2630
|
+
right: 0;
|
|
2631
|
+
bottom: 0;
|
|
2632
|
+
display: flex;
|
|
2633
|
+
align-items: center;
|
|
2634
|
+
justify-content: center;
|
|
2635
|
+
width: 44px;
|
|
2636
|
+
padding: 0;
|
|
2637
|
+
border: 0;
|
|
2638
|
+
background: transparent;
|
|
2639
|
+
color: var(--nish-hi3);
|
|
2640
|
+
font: inherit;
|
|
2641
|
+
cursor: pointer;
|
|
2642
|
+
}
|
|
2643
|
+
:where(.nish-combobox-clear:hover) {
|
|
2644
|
+
color: var(--nish-hi);
|
|
2645
|
+
}
|
|
2646
|
+
:where(.nish-combobox-clear) > :where(span) {
|
|
2647
|
+
display: flex;
|
|
2648
|
+
align-items: center;
|
|
2649
|
+
justify-content: center;
|
|
2650
|
+
width: 32px;
|
|
2651
|
+
height: 32px;
|
|
2652
|
+
border-radius: 6px;
|
|
2653
|
+
}
|
|
2654
|
+
:where(.nish-combobox-clear:hover) > :where(span) {
|
|
2655
|
+
background: var(--nish-elevated);
|
|
2656
|
+
}
|
|
2657
|
+
:where(.nish-combobox-clear) :where(svg) {
|
|
2658
|
+
width: 16px;
|
|
2659
|
+
height: 16px;
|
|
2660
|
+
}
|
|
2661
|
+
:where(.nish-combobox-list) {
|
|
2662
|
+
box-sizing: border-box;
|
|
2663
|
+
position: absolute;
|
|
2664
|
+
top: 100%;
|
|
2665
|
+
right: 0;
|
|
2666
|
+
left: 0;
|
|
2667
|
+
z-index: 40;
|
|
2668
|
+
max-height: min(16rem, 40dvh);
|
|
2669
|
+
margin: 4px 0 0;
|
|
2670
|
+
padding: 0;
|
|
2671
|
+
overflow: auto;
|
|
2672
|
+
border: 1px solid var(--nish-line);
|
|
2673
|
+
border-radius: 12px;
|
|
2674
|
+
background: var(--nish-elevated);
|
|
2675
|
+
box-shadow: var(--nish-shadow-pop);
|
|
2676
|
+
list-style: none;
|
|
2677
|
+
}
|
|
2678
|
+
:where(.nish-combobox-list[data-placement='top']) {
|
|
2679
|
+
top: auto;
|
|
2680
|
+
bottom: 100%;
|
|
2681
|
+
margin: 0 0 4px;
|
|
2682
|
+
}
|
|
2683
|
+
:where(.nish-combobox-option, .nish-combobox-empty, .nish-combobox-loading) {
|
|
2684
|
+
box-sizing: border-box;
|
|
2685
|
+
display: flex;
|
|
2686
|
+
align-items: center;
|
|
2687
|
+
gap: 8px;
|
|
2688
|
+
min-height: 44px;
|
|
2689
|
+
margin: 0;
|
|
2690
|
+
padding: 0 12px;
|
|
2691
|
+
color: var(--nish-hi2);
|
|
2692
|
+
font-size: var(--nish-text-sm);
|
|
2693
|
+
line-height: 1.25rem;
|
|
2694
|
+
}
|
|
2695
|
+
:where(.nish-combobox-option) {
|
|
2696
|
+
cursor: pointer;
|
|
2697
|
+
}
|
|
2698
|
+
:where(.nish-combobox-option) > :where(span:first-child) {
|
|
2699
|
+
min-width: 0;
|
|
2700
|
+
flex: 1;
|
|
2701
|
+
overflow: hidden;
|
|
2702
|
+
text-overflow: ellipsis;
|
|
2703
|
+
white-space: nowrap;
|
|
2704
|
+
}
|
|
2705
|
+
:where(.nish-combobox-option[data-active]) {
|
|
2706
|
+
background: var(--nish-accent-soft);
|
|
2707
|
+
color: var(--nish-hi);
|
|
2708
|
+
}
|
|
2709
|
+
:where(.nish-combobox-option[aria-disabled='true']) {
|
|
2710
|
+
cursor: not-allowed;
|
|
2711
|
+
opacity: 0.5;
|
|
2712
|
+
}
|
|
2713
|
+
:where(.nish-combobox-option[aria-selected='true'])::after {
|
|
2714
|
+
content: '';
|
|
2715
|
+
flex-shrink: 0;
|
|
2716
|
+
width: 16px;
|
|
2717
|
+
height: 16px;
|
|
2718
|
+
background: var(--nish-accent);
|
|
2719
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
2720
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
2721
|
+
}
|
|
2722
|
+
:where(.nish-combobox-hint) {
|
|
2723
|
+
flex-shrink: 0;
|
|
2724
|
+
overflow: hidden;
|
|
2725
|
+
color: var(--nish-hi3);
|
|
2726
|
+
font-size: var(--nish-text-xs);
|
|
2727
|
+
text-overflow: ellipsis;
|
|
2728
|
+
white-space: nowrap;
|
|
2729
|
+
}
|
|
2730
|
+
:where(.nish-combobox-empty, .nish-combobox-loading) {
|
|
2731
|
+
color: var(--nish-hi3);
|
|
2732
|
+
}
|
|
2238
2733
|
|
|
2239
|
-
/* ---
|
|
2240
|
-
:
|
|
2241
|
-
|
|
2734
|
+
/* --- List and list row (.nish-list > .nish-list-row) -----------------------------------
|
|
2735
|
+
The ListRow component: icon, title, subtitle, meta and a chevron; the whole row is the
|
|
2736
|
+
link or button. aria-current gives the active tint; --danger turns the title red;
|
|
2737
|
+
--dense is a 44px row (52px otherwise); --compact is dense with smaller text.
|
|
2738
|
+
<ul class="nish-list">
|
|
2739
|
+
<li><a class="nish-list-row" href="/jobs" aria-current="true">
|
|
2740
|
+
<span class="nish-list-icon"><svg …/></span>
|
|
2741
|
+
<span class="nish-list-text">
|
|
2742
|
+
<span class="nish-list-title">Backups</span>
|
|
2743
|
+
<span class="nish-list-subtitle">Last run 2h ago</span></span>
|
|
2744
|
+
<span class="nish-list-meta">12 GB</span>
|
|
2745
|
+
<svg class="nish-list-chevron" …/></a></li>
|
|
2746
|
+
</ul>
|
|
2747
|
+
A <button> or a <div> works the same; -title--2 lets the title use two lines. */
|
|
2748
|
+
:where(.nish-list) {
|
|
2749
|
+
margin: 0;
|
|
2750
|
+
padding: 0;
|
|
2751
|
+
list-style: none;
|
|
2752
|
+
}
|
|
2753
|
+
:where(.nish-list) > :where(li) {
|
|
2754
|
+
min-width: 0;
|
|
2755
|
+
}
|
|
2756
|
+
:where(.nish-list-row) {
|
|
2757
|
+
box-sizing: border-box;
|
|
2758
|
+
display: flex;
|
|
2759
|
+
align-items: center;
|
|
2760
|
+
gap: 12px;
|
|
2761
|
+
width: 100%;
|
|
2762
|
+
min-height: 52px;
|
|
2763
|
+
margin: 0;
|
|
2764
|
+
padding: 4px 12px;
|
|
2765
|
+
border: 0;
|
|
2766
|
+
border-radius: var(--nish-radius-sm);
|
|
2767
|
+
background: transparent;
|
|
2768
|
+
color: inherit;
|
|
2769
|
+
font: inherit;
|
|
2770
|
+
line-height: 1.5;
|
|
2771
|
+
text-align: left;
|
|
2772
|
+
text-decoration: none;
|
|
2773
|
+
}
|
|
2774
|
+
:where(.nish-list-row:has(.nish-list-subtitle)) {
|
|
2775
|
+
padding-block: 8px;
|
|
2776
|
+
}
|
|
2777
|
+
:where(.nish-list-row--dense, .nish-list-row--compact) {
|
|
2778
|
+
min-height: 44px;
|
|
2779
|
+
}
|
|
2780
|
+
:where(.nish-list-row--compact) {
|
|
2781
|
+
gap: 10px;
|
|
2782
|
+
}
|
|
2783
|
+
:where(.nish-list-row--compact:has(.nish-list-subtitle)) {
|
|
2784
|
+
padding-block: 6px;
|
|
2785
|
+
}
|
|
2786
|
+
:where(a.nish-list-row, button.nish-list-row) {
|
|
2787
|
+
cursor: pointer;
|
|
2788
|
+
transition: background-color 150ms;
|
|
2789
|
+
}
|
|
2790
|
+
:where(a.nish-list-row:hover, button.nish-list-row:hover) {
|
|
2791
|
+
background: var(--nish-elevated);
|
|
2792
|
+
}
|
|
2793
|
+
:where(a.nish-list-row:focus-visible, button.nish-list-row:focus-visible) {
|
|
2794
|
+
outline: 2px solid var(--nish-accent);
|
|
2795
|
+
outline-offset: -2px;
|
|
2796
|
+
}
|
|
2797
|
+
:where(.nish-list-row[aria-current]:not([aria-current='false'])) {
|
|
2798
|
+
background: var(--nish-accent-soft);
|
|
2799
|
+
}
|
|
2800
|
+
:where(.nish-list-icon) {
|
|
2801
|
+
display: flex;
|
|
2802
|
+
flex-shrink: 0;
|
|
2803
|
+
align-items: center;
|
|
2804
|
+
color: var(--nish-hi3);
|
|
2805
|
+
}
|
|
2806
|
+
:where(.nish-list-icon) > :where(svg) {
|
|
2807
|
+
width: 20px;
|
|
2808
|
+
height: 20px;
|
|
2809
|
+
}
|
|
2810
|
+
:where(.nish-list-text) {
|
|
2811
|
+
min-width: 0;
|
|
2812
|
+
flex: 1;
|
|
2813
|
+
}
|
|
2814
|
+
:where(.nish-list-title) {
|
|
2815
|
+
display: block;
|
|
2816
|
+
overflow: hidden;
|
|
2817
|
+
color: var(--nish-hi);
|
|
2818
|
+
text-overflow: ellipsis;
|
|
2819
|
+
white-space: nowrap;
|
|
2820
|
+
}
|
|
2821
|
+
:where(.nish-list-title--2) {
|
|
2822
|
+
display: -webkit-box;
|
|
2823
|
+
-webkit-box-orient: vertical;
|
|
2824
|
+
-webkit-line-clamp: 2;
|
|
2825
|
+
line-clamp: 2;
|
|
2826
|
+
overflow-wrap: break-word;
|
|
2827
|
+
white-space: normal;
|
|
2828
|
+
}
|
|
2829
|
+
:where(.nish-list-row--danger .nish-list-title) {
|
|
2830
|
+
color: var(--nish-loss);
|
|
2831
|
+
}
|
|
2832
|
+
:where(.nish-list-subtitle) {
|
|
2833
|
+
display: -webkit-box;
|
|
2834
|
+
-webkit-box-orient: vertical;
|
|
2835
|
+
-webkit-line-clamp: 2;
|
|
2836
|
+
line-clamp: 2;
|
|
2837
|
+
overflow: hidden;
|
|
2838
|
+
color: var(--nish-hi3);
|
|
2839
|
+
font-size: var(--nish-text-sm);
|
|
2840
|
+
line-height: 1.25rem;
|
|
2841
|
+
}
|
|
2842
|
+
:where(.nish-list-meta) {
|
|
2843
|
+
flex-shrink: 0;
|
|
2844
|
+
color: var(--nish-hi3);
|
|
2845
|
+
font-size: var(--nish-text-xs);
|
|
2846
|
+
line-height: 1rem;
|
|
2847
|
+
text-align: right;
|
|
2848
|
+
font-variant-numeric: tabular-nums;
|
|
2849
|
+
}
|
|
2850
|
+
/* On the active row's accent tint hi3 falls under 4.5:1 in light themes; hi2 holds it. */
|
|
2851
|
+
:where(.nish-list-row[aria-current]:not([aria-current='false'])) :where(.nish-list-subtitle, .nish-list-meta) {
|
|
2852
|
+
color: var(--nish-hi2);
|
|
2853
|
+
}
|
|
2854
|
+
:where(.nish-list-trailing) {
|
|
2855
|
+
display: flex;
|
|
2856
|
+
flex-shrink: 0;
|
|
2857
|
+
align-items: center;
|
|
2858
|
+
}
|
|
2859
|
+
:where(.nish-list-chevron) {
|
|
2860
|
+
flex-shrink: 0;
|
|
2861
|
+
width: 16px;
|
|
2862
|
+
height: 16px;
|
|
2863
|
+
color: var(--nish-ghost);
|
|
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
|
+
}
|
|
2906
|
+
:where(.nish-list-row--compact .nish-list-title) {
|
|
2907
|
+
font-size: var(--nish-text-2xs);
|
|
2908
|
+
font-weight: var(--nish-weight-medium);
|
|
2909
|
+
line-height: 1.375;
|
|
2910
|
+
}
|
|
2911
|
+
:where(.nish-list-row--compact .nish-list-subtitle) {
|
|
2912
|
+
margin-top: 2px;
|
|
2913
|
+
line-height: 0.9rem;
|
|
2914
|
+
font-size: var(--nish-text-3xs);
|
|
2915
|
+
}
|
|
2916
|
+
:where(.nish-list-row--compact .nish-list-meta) {
|
|
2917
|
+
font-size: var(--nish-text-3xs);
|
|
2918
|
+
}
|
|
2919
|
+
:where(.nish-list-row--compact .nish-list-chevron) {
|
|
2920
|
+
width: 13px;
|
|
2921
|
+
height: 13px;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
/* --- Kbd (.nish-kbd) ------------------------------------------------------------------
|
|
2925
|
+
<kbd class="nish-kbd">Ctrl K</kbd> */
|
|
2926
|
+
:where(.nish-kbd) {
|
|
2927
|
+
box-sizing: border-box;
|
|
2928
|
+
display: inline-flex;
|
|
2929
|
+
align-items: center;
|
|
2930
|
+
justify-content: center;
|
|
2931
|
+
min-width: 1.5em;
|
|
2932
|
+
border: 1px solid var(--nish-line-strong);
|
|
2933
|
+
border-radius: var(--nish-radius-xs, 4px);
|
|
2934
|
+
background: var(--nish-elevated);
|
|
2935
|
+
font-family: var(--nish-font-mono, ui-monospace, monospace);
|
|
2936
|
+
line-height: 1rem;
|
|
2937
|
+
/* base.css styles the bare kbd element, which beats a zero-specificity class: !important wins. */
|
|
2938
|
+
padding: 0 6px !important;
|
|
2939
|
+
color: var(--nish-hi2) !important;
|
|
2940
|
+
font-size: var(--nish-text-2xs) !important;
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
/* --- Page header (.nish-page-header) ----------------------------------------------------
|
|
2944
|
+
The title block at the top of a page: a text block and, on the right, actions that wrap
|
|
2945
|
+
under it on phones. Anything else you put in the header (a back link, an eyebrow) goes in
|
|
2946
|
+
the text block.
|
|
2947
|
+
<header class="nish-page-header">
|
|
2948
|
+
<div><h1 class="nish-page-header-title">Backups</h1>
|
|
2949
|
+
<p class="nish-page-header-subtitle">Nightly copies of every site.</p></div>
|
|
2950
|
+
<div class="nish-page-header-actions"><button class="nish-btn">Run now</button></div>
|
|
2951
|
+
</header> */
|
|
2952
|
+
:where(.nish-page-header) {
|
|
2953
|
+
display: flex;
|
|
2954
|
+
flex-wrap: wrap;
|
|
2955
|
+
align-items: flex-end;
|
|
2956
|
+
justify-content: space-between;
|
|
2957
|
+
gap: 12px 16px;
|
|
2958
|
+
}
|
|
2959
|
+
:where(.nish-page-header) > :where(:not(.nish-page-header-actions)) {
|
|
2960
|
+
min-width: 0;
|
|
2961
|
+
flex: 1 1 16rem;
|
|
2962
|
+
}
|
|
2963
|
+
:where(.nish-page-header-title) {
|
|
2964
|
+
margin: 0;
|
|
2965
|
+
color: var(--nish-hi);
|
|
2966
|
+
font-size: var(--nish-text-2xl);
|
|
2967
|
+
font-weight: var(--nish-weight-semibold);
|
|
2968
|
+
letter-spacing: -0.025em;
|
|
2969
|
+
line-height: 2rem;
|
|
2970
|
+
overflow-wrap: anywhere;
|
|
2971
|
+
}
|
|
2972
|
+
:where(.nish-page-header-subtitle) {
|
|
2973
|
+
margin: 4px 0 0;
|
|
2974
|
+
color: var(--nish-hi2);
|
|
2975
|
+
font-size: var(--nish-text-sm);
|
|
2976
|
+
line-height: 1.25rem;
|
|
2977
|
+
}
|
|
2978
|
+
:where(.nish-page-header-actions) {
|
|
2979
|
+
display: flex;
|
|
2980
|
+
flex-wrap: wrap;
|
|
2981
|
+
align-items: center;
|
|
2982
|
+
gap: 8px;
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
/* --- Section header (.nish-section-header) -----------------------------------------------
|
|
2986
|
+
The heading row of a section inside a page: the title, with quiet text and a control on
|
|
2987
|
+
the right.
|
|
2988
|
+
<div class="nish-section-header"><h2 class="nish-section-header-title">Services</h2>
|
|
2989
|
+
<div class="nish-section-header-actions"><span>3 of 12</span><button class="nish-btn">Add</button></div></div> */
|
|
2990
|
+
:where(.nish-section-header) {
|
|
2991
|
+
display: flex;
|
|
2992
|
+
flex-wrap: wrap;
|
|
2993
|
+
align-items: baseline;
|
|
2994
|
+
justify-content: space-between;
|
|
2995
|
+
gap: 4px 12px;
|
|
2996
|
+
margin-bottom: 12px;
|
|
2997
|
+
}
|
|
2998
|
+
:where(.nish-section-header-title) {
|
|
2999
|
+
min-width: 0;
|
|
3000
|
+
margin: 0;
|
|
3001
|
+
color: var(--nish-hi);
|
|
3002
|
+
font-size: var(--nish-text-lg);
|
|
3003
|
+
font-weight: var(--nish-weight-semibold);
|
|
3004
|
+
letter-spacing: -0.025em;
|
|
3005
|
+
line-height: 1.75rem;
|
|
3006
|
+
overflow-wrap: anywhere;
|
|
3007
|
+
}
|
|
3008
|
+
:where(.nish-section-header-actions) {
|
|
3009
|
+
display: flex;
|
|
3010
|
+
align-items: center;
|
|
3011
|
+
gap: 12px;
|
|
3012
|
+
color: var(--nish-hi3);
|
|
3013
|
+
font-size: var(--nish-text-sm);
|
|
3014
|
+
line-height: 1.25rem;
|
|
3015
|
+
}
|
|
3016
|
+
|
|
3017
|
+
/* --- Key-value list (.nish-kv) -------------------------------------------------------------
|
|
3018
|
+
Label and value rows with dividers (the KeyValueList component, dl form). Rows are 44px
|
|
3019
|
+
(--dense: 32px). A row with --wrap lets a long value (a path, a URL) break anywhere;
|
|
3020
|
+
--words wraps prose at word breaks.
|
|
3021
|
+
<dl class="nish-kv"><div class="nish-kv-row"><dt>Host</dt><dd>mc.nish.software</dd></div></dl> */
|
|
3022
|
+
:where(.nish-kv) {
|
|
3023
|
+
display: grid;
|
|
3024
|
+
margin: 0;
|
|
3025
|
+
color: var(--nish-hi);
|
|
3026
|
+
font-size: var(--nish-text-sm);
|
|
3027
|
+
line-height: 1.25rem;
|
|
3028
|
+
}
|
|
3029
|
+
:where(.nish-kv-row) {
|
|
3030
|
+
box-sizing: border-box;
|
|
3031
|
+
display: flex;
|
|
3032
|
+
min-width: 0;
|
|
3033
|
+
min-height: 44px;
|
|
3034
|
+
align-items: center;
|
|
3035
|
+
justify-content: space-between;
|
|
3036
|
+
gap: 12px;
|
|
3037
|
+
border-bottom: 1px solid var(--nish-line);
|
|
3038
|
+
}
|
|
3039
|
+
:where(.nish-kv-row:last-child) {
|
|
3040
|
+
border-bottom: 0;
|
|
3041
|
+
}
|
|
3042
|
+
:where(.nish-kv--dense .nish-kv-row) {
|
|
3043
|
+
min-height: 32px;
|
|
3044
|
+
}
|
|
3045
|
+
:where(.nish-kv-row--wrap, .nish-kv-row--words) {
|
|
3046
|
+
padding-block: 8px;
|
|
3047
|
+
}
|
|
3048
|
+
:where(.nish-kv--dense .nish-kv-row--wrap, .nish-kv--dense .nish-kv-row--words) {
|
|
3049
|
+
padding-block: 4px;
|
|
3050
|
+
}
|
|
3051
|
+
:where(.nish-kv-row) > :where(dt) {
|
|
3052
|
+
min-width: 0;
|
|
3053
|
+
color: var(--nish-hi2);
|
|
3054
|
+
}
|
|
3055
|
+
:where(.nish-kv-row) > :where(dd) {
|
|
3056
|
+
flex-shrink: 0;
|
|
3057
|
+
margin: 0;
|
|
3058
|
+
text-align: right;
|
|
3059
|
+
}
|
|
3060
|
+
:where(.nish-kv-row--wrap) > :where(dt) {
|
|
3061
|
+
flex-shrink: 0;
|
|
3062
|
+
}
|
|
3063
|
+
:where(.nish-kv-row--wrap) > :where(dd) {
|
|
3064
|
+
min-width: 0;
|
|
3065
|
+
flex-shrink: 1;
|
|
3066
|
+
word-break: break-all;
|
|
3067
|
+
}
|
|
3068
|
+
:where(.nish-kv-row--words) > :where(dt) {
|
|
3069
|
+
flex-shrink: 0;
|
|
3070
|
+
max-width: calc(60% - 0.75rem);
|
|
3071
|
+
overflow-wrap: anywhere;
|
|
3072
|
+
}
|
|
3073
|
+
:where(.nish-kv-row--words) > :where(dd) {
|
|
3074
|
+
min-width: 0;
|
|
3075
|
+
flex: 1;
|
|
3076
|
+
overflow-wrap: anywhere;
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
/* --- Chart legend (.nish-legend) ------------------------------------------------------------
|
|
3080
|
+
The key for a multi-series chart. --c on the item is the series color; --dot makes the
|
|
3081
|
+
mark an 8px dot (bars and points) instead of a short line.
|
|
3082
|
+
<ul class="nish-legend" aria-label="Legend">
|
|
3083
|
+
<li class="nish-legend-item" style="--c: var(--nish-chart-1)"><i class="nish-legend-swatch" aria-hidden="true"></i>CPU</li>
|
|
3084
|
+
</ul> */
|
|
3085
|
+
:where(.nish-legend) {
|
|
3086
|
+
display: flex;
|
|
3087
|
+
flex-wrap: wrap;
|
|
3088
|
+
gap: 4px 16px;
|
|
3089
|
+
margin: 0;
|
|
3090
|
+
padding: 0;
|
|
3091
|
+
color: var(--nish-hi2);
|
|
3092
|
+
font-size: var(--nish-text-xs);
|
|
3093
|
+
line-height: 1rem;
|
|
3094
|
+
list-style: none;
|
|
3095
|
+
}
|
|
3096
|
+
:where(.nish-legend-item) {
|
|
3097
|
+
display: inline-flex;
|
|
3098
|
+
align-items: center;
|
|
3099
|
+
gap: 6px;
|
|
3100
|
+
}
|
|
3101
|
+
:where(.nish-legend-swatch) {
|
|
3102
|
+
display: inline-block;
|
|
3103
|
+
flex-shrink: 0;
|
|
3104
|
+
width: 10px;
|
|
3105
|
+
height: 3px;
|
|
3106
|
+
border-radius: 4px;
|
|
3107
|
+
background: var(--c, var(--nish-chart-1));
|
|
3108
|
+
}
|
|
3109
|
+
:where(.nish-legend--dot .nish-legend-swatch) {
|
|
3110
|
+
width: 8px;
|
|
3111
|
+
height: 8px;
|
|
3112
|
+
border-radius: 9999px;
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
/* --- Sparkline (.nish-sparkline) --------------------------------------------------------------
|
|
3116
|
+
The svg <nish-sparkline> draws: a line (and, with a fill, an area) in currentColor.
|
|
3117
|
+
--ok, --warn, --loss, --info, --accent and --chart-2 to --chart-8 pick the color
|
|
3118
|
+
(default chart-1); [data-empty] is the dashed flat line of a series with no data. */
|
|
3119
|
+
:where(.nish-sparkline) {
|
|
3120
|
+
display: block;
|
|
3121
|
+
flex-shrink: 0;
|
|
3122
|
+
overflow: visible;
|
|
3123
|
+
color: var(--nish-chart-1);
|
|
3124
|
+
}
|
|
3125
|
+
:where(.nish-sparkline--accent) {
|
|
3126
|
+
color: var(--nish-accent);
|
|
3127
|
+
}
|
|
3128
|
+
:where(.nish-sparkline--ok) {
|
|
3129
|
+
color: var(--nish-ok-fill);
|
|
3130
|
+
}
|
|
3131
|
+
:where(.nish-sparkline--warn) {
|
|
3132
|
+
color: var(--nish-warn-fill);
|
|
3133
|
+
}
|
|
3134
|
+
:where(.nish-sparkline--loss) {
|
|
3135
|
+
color: var(--nish-loss-fill);
|
|
3136
|
+
}
|
|
3137
|
+
:where(.nish-sparkline--info) {
|
|
3138
|
+
color: var(--nish-info-fill);
|
|
3139
|
+
}
|
|
3140
|
+
:where(.nish-sparkline--chart-2) {
|
|
3141
|
+
color: var(--nish-chart-2);
|
|
3142
|
+
}
|
|
3143
|
+
:where(.nish-sparkline--chart-3) {
|
|
3144
|
+
color: var(--nish-chart-3);
|
|
3145
|
+
}
|
|
3146
|
+
:where(.nish-sparkline--chart-4) {
|
|
3147
|
+
color: var(--nish-chart-4);
|
|
3148
|
+
}
|
|
3149
|
+
:where(.nish-sparkline--chart-5) {
|
|
3150
|
+
color: var(--nish-chart-5);
|
|
3151
|
+
}
|
|
3152
|
+
:where(.nish-sparkline--chart-6) {
|
|
3153
|
+
color: var(--nish-chart-6);
|
|
3154
|
+
}
|
|
3155
|
+
:where(.nish-sparkline--chart-7) {
|
|
3156
|
+
color: var(--nish-chart-7);
|
|
3157
|
+
}
|
|
3158
|
+
:where(.nish-sparkline--chart-8) {
|
|
3159
|
+
color: var(--nish-chart-8);
|
|
3160
|
+
}
|
|
3161
|
+
:where(.nish-sparkline[data-empty]) {
|
|
3162
|
+
color: var(--nish-line-strong);
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
/* --- App header (.nish-app-header) -------------------------------------------------------------
|
|
3166
|
+
The top bar of an app: the hub pill (back), the wordmark, tools on the right and an
|
|
3167
|
+
optional row of nav links under them. Opaque, safe-area aware and sticky.
|
|
3168
|
+
<header class="nish-app-header">
|
|
3169
|
+
<a class="nish-pill-link nish-app-header-back" href="https://nish.software">← nish.software</a>
|
|
3170
|
+
<a class="nish-app-header-name" href="/"><svg …/>Trackers</a>
|
|
3171
|
+
<div class="nish-app-header-tools"><button class="nish-icon-btn" aria-label="Add">+</button></div>
|
|
3172
|
+
<nav class="nish-app-header-nav" aria-label="Trackers">
|
|
3173
|
+
<a class="nish-tab" href="/" aria-current="page">Overview</a></nav>
|
|
3174
|
+
</header> */
|
|
3175
|
+
:where(.nish-app-header) {
|
|
3176
|
+
container: nish-header / inline-size;
|
|
3177
|
+
box-sizing: border-box;
|
|
3178
|
+
position: sticky;
|
|
3179
|
+
top: 0;
|
|
3180
|
+
z-index: 30;
|
|
3181
|
+
display: flex;
|
|
3182
|
+
flex-wrap: wrap;
|
|
3183
|
+
align-items: center;
|
|
3184
|
+
gap: 0 8px;
|
|
3185
|
+
padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + var(--nish-page-gutter, 1rem)) 8px
|
|
3186
|
+
calc(env(safe-area-inset-left) + var(--nish-page-gutter, 1rem));
|
|
3187
|
+
border-bottom: 1px solid var(--nish-line);
|
|
3188
|
+
background: var(--nish-bg);
|
|
3189
|
+
}
|
|
3190
|
+
:where(.nish-app-header) > :where(:not(.nish-app-header-nav)) {
|
|
3191
|
+
min-height: 40px;
|
|
3192
|
+
}
|
|
3193
|
+
:where(.nish-app-header-back) {
|
|
3194
|
+
flex-shrink: 0;
|
|
3195
|
+
}
|
|
3196
|
+
@media (min-width: 640px) {
|
|
3197
|
+
:where(.nish-app-header) {
|
|
3198
|
+
column-gap: 12px;
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
/* In a header 400px wide or less the back pill shrinks to its arrow (the React AppHeader's container query). */
|
|
3202
|
+
@container nish-header (max-width: 400px) {
|
|
3203
|
+
:where(.nish-app-header-back) {
|
|
3204
|
+
min-width: var(--nish-tap-min, 44px);
|
|
3205
|
+
justify-content: center;
|
|
3206
|
+
padding-inline: 6px;
|
|
3207
|
+
}
|
|
3208
|
+
:where(.nish-app-header-back .nish-pill-link-label) {
|
|
3209
|
+
position: absolute;
|
|
3210
|
+
width: 1px;
|
|
3211
|
+
height: 1px;
|
|
3212
|
+
overflow: hidden;
|
|
3213
|
+
clip-path: inset(50%);
|
|
3214
|
+
white-space: nowrap;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
:where(.nish-app-header-name) {
|
|
3218
|
+
display: inline-flex;
|
|
3219
|
+
min-width: 0;
|
|
3220
|
+
align-items: center;
|
|
3221
|
+
gap: 8px;
|
|
3222
|
+
color: var(--nish-hi);
|
|
3223
|
+
font-size: var(--nish-text-xl);
|
|
3224
|
+
font-weight: var(--nish-weight-bold);
|
|
3225
|
+
letter-spacing: -0.025em;
|
|
3226
|
+
line-height: 1.75rem;
|
|
3227
|
+
text-decoration: none;
|
|
3228
|
+
}
|
|
3229
|
+
:where(.nish-app-header-name) > :where(svg) {
|
|
3230
|
+
flex-shrink: 0;
|
|
3231
|
+
width: 20px;
|
|
3232
|
+
height: 20px;
|
|
3233
|
+
color: var(--nish-accent);
|
|
3234
|
+
}
|
|
3235
|
+
:where(a.nish-app-header-name) {
|
|
3236
|
+
min-width: 44px;
|
|
3237
|
+
min-height: 44px;
|
|
3238
|
+
border-radius: var(--nish-radius-sm);
|
|
3239
|
+
}
|
|
3240
|
+
:where(.nish-app-header-tools) {
|
|
3241
|
+
display: flex;
|
|
3242
|
+
flex-shrink: 0;
|
|
3243
|
+
align-items: center;
|
|
3244
|
+
gap: 8px;
|
|
3245
|
+
margin-left: auto;
|
|
3246
|
+
}
|
|
3247
|
+
:where(.nish-app-header-nav) {
|
|
3248
|
+
display: flex;
|
|
3249
|
+
flex: 0 0 100%;
|
|
3250
|
+
gap: 24px;
|
|
3251
|
+
margin: 8px calc(-1 * var(--nish-page-gutter, 1rem)) -9px;
|
|
3252
|
+
padding: 0 var(--nish-page-gutter, 1rem);
|
|
3253
|
+
overflow-x: auto;
|
|
3254
|
+
scrollbar-width: none;
|
|
3255
|
+
}
|
|
3256
|
+
:where(.nish-app-header-nav)::-webkit-scrollbar {
|
|
3257
|
+
display: none;
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
/* --- Copy button (.nish-copy-btn) ----------------------------------------------------------------
|
|
3261
|
+
<nish-copy-button> renders a .nish-btn (or .nish-icon-btn) with this class and sets
|
|
3262
|
+
data-copied for 1.5 s after a copy: the check icon turns ok-green.
|
|
3263
|
+
<button class="nish-btn nish-btn--sm nish-copy-btn" data-copied><svg …/>Copied</button> */
|
|
3264
|
+
:where(.nish-copy-btn) {
|
|
3265
|
+
white-space: nowrap;
|
|
3266
|
+
}
|
|
3267
|
+
:where(.nish-copy-btn[data-copied] svg) {
|
|
3268
|
+
color: var(--nish-ok);
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
/* The first and last block in a sheet or dialog body sit flush, like the React body. */
|
|
3272
|
+
:where(.nish-sheet-body, .nish-dialog-body) > :where(:first-child) {
|
|
3273
|
+
margin-top: 0;
|
|
3274
|
+
}
|
|
3275
|
+
:where(.nish-sheet-body, .nish-dialog-body) > :where(:last-child) {
|
|
3276
|
+
margin-bottom: 0;
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3279
|
+
/* --- Touch targets for the pieces above ---------------------------------------------- */
|
|
3280
|
+
@media (pointer: coarse) {
|
|
3281
|
+
/* The React header holds a 44px close button under a coarse pointer. */
|
|
3282
|
+
:where(.nish-dialog-title) {
|
|
3283
|
+
padding-bottom: 26px;
|
|
3284
|
+
}
|
|
3285
|
+
:where(.nish-sheet-header) > :where(.nish-icon-btn) {
|
|
3286
|
+
min-width: var(--nish-tap-min);
|
|
3287
|
+
min-height: var(--nish-tap-min);
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
/* --- Touch: every control is a 44px target under a coarse pointer ---------------------- */
|
|
3292
|
+
@media (pointer: coarse) {
|
|
3293
|
+
:where(.nish-btn, .nish-input, .nish-select, .nish-chip, .nish-disclosure > summary, .nish-tab) {
|
|
3294
|
+
min-height: var(--nish-tap-min);
|
|
3295
|
+
}
|
|
3296
|
+
:where(.nish-dialog-actions) > :where(.nish-btn) {
|
|
3297
|
+
min-width: var(--nish-tap-min);
|
|
3298
|
+
}
|
|
3299
|
+
:where(.nish-icon-btn, .nish-theme-btn, .nish-toast-action, .nish-toast-close,.nish-seg > button, .nish-seg > a, .nish-seg > [role='radio']) {
|
|
3300
|
+
min-width: var(--nish-tap-min);
|
|
3301
|
+
min-height: var(--nish-tap-min);
|
|
3302
|
+
}
|
|
3303
|
+
:where(.nish-tab, .nish-chip, .nish-th-sort) {
|
|
3304
|
+
min-width: var(--nish-tap-min);
|
|
3305
|
+
}
|
|
3306
|
+
:where(span.nish-chip) {
|
|
3307
|
+
min-height: 0;
|
|
3308
|
+
min-width: 0;
|
|
3309
|
+
}
|
|
3310
|
+
:where(.nish-btn--link) {
|
|
3311
|
+
min-height: 0;
|
|
3312
|
+
}
|
|
3313
|
+
/* Grown to 44px without growing the toast (the React toast's negative margins). */
|
|
3314
|
+
:where(.nish-toast-action) {
|
|
3315
|
+
margin-block: -10px;
|
|
3316
|
+
}
|
|
3317
|
+
:where(.nish-toast-close) {
|
|
3318
|
+
margin-block: -8px;
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
/* --- Split stage: a cross-origin frame swallows pointer events, so a divider or pane drag turns them off --- */
|
|
3323
|
+
:where([data-dragging] iframe) {
|
|
3324
|
+
pointer-events: none;
|
|
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;
|
|
2242
4664
|
}
|