@still-void/ui 0.0.0-canary-20261202214749
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/CHANGELOG.md +350 -0
- package/LICENSE +21 -0
- package/README.md +330 -0
- package/dist/css/app-shell.css +129 -0
- package/dist/css/base.css +27 -0
- package/dist/css/content.css +726 -0
- package/dist/css/controls.css +383 -0
- package/dist/css/data.css +190 -0
- package/dist/css/forms.css +318 -0
- package/dist/css/motion.css +49 -0
- package/dist/css/overlays.css +488 -0
- package/dist/css/toast.css +170 -0
- package/dist/react/_modules/behaviors/themeManager.js +10 -0
- package/dist/react/_modules/behaviors/themeManager.js.map +1 -0
- package/dist/react/_modules/components/ui/alert.js +14 -0
- package/dist/react/_modules/components/ui/alert.js.map +1 -0
- package/dist/react/_modules/components/ui/badge.js +9 -0
- package/dist/react/_modules/components/ui/badge.js.map +1 -0
- package/dist/react/_modules/components/ui/button.js +9 -0
- package/dist/react/_modules/components/ui/button.js.map +1 -0
- package/dist/react/_modules/components/ui/card.js +19 -0
- package/dist/react/_modules/components/ui/card.js.map +1 -0
- package/dist/react/_modules/components/ui/chart.js +18 -0
- package/dist/react/_modules/components/ui/chart.js.map +1 -0
- package/dist/react/_modules/components/ui/checkbox.js +8 -0
- package/dist/react/_modules/components/ui/checkbox.js.map +1 -0
- package/dist/react/_modules/components/ui/field.js +9 -0
- package/dist/react/_modules/components/ui/field.js.map +1 -0
- package/dist/react/_modules/components/ui/file-input.js +10 -0
- package/dist/react/_modules/components/ui/file-input.js.map +1 -0
- package/dist/react/_modules/components/ui/icon-set.js +11 -0
- package/dist/react/_modules/components/ui/icon-set.js.map +1 -0
- package/dist/react/_modules/components/ui/icon.js +9 -0
- package/dist/react/_modules/components/ui/icon.js.map +1 -0
- package/dist/react/_modules/components/ui/input.js +10 -0
- package/dist/react/_modules/components/ui/input.js.map +1 -0
- package/dist/react/_modules/components/ui/native-select.js +10 -0
- package/dist/react/_modules/components/ui/native-select.js.map +1 -0
- package/dist/react/_modules/components/ui/pagination.js +23 -0
- package/dist/react/_modules/components/ui/pagination.js.map +1 -0
- package/dist/react/_modules/components/ui/progress.js +8 -0
- package/dist/react/_modules/components/ui/progress.js.map +1 -0
- package/dist/react/_modules/components/ui/radio-group.js +12 -0
- package/dist/react/_modules/components/ui/radio-group.js.map +1 -0
- package/dist/react/_modules/components/ui/separator.js +8 -0
- package/dist/react/_modules/components/ui/separator.js.map +1 -0
- package/dist/react/_modules/components/ui/slot.js +7 -0
- package/dist/react/_modules/components/ui/slot.js.map +1 -0
- package/dist/react/_modules/components/ui/table.js +23 -0
- package/dist/react/_modules/components/ui/table.js.map +1 -0
- package/dist/react/_modules/components/ui/text-link.js +10 -0
- package/dist/react/_modules/components/ui/text-link.js.map +1 -0
- package/dist/react/_modules/components/ui/textarea.js +10 -0
- package/dist/react/_modules/components/ui/textarea.js.map +1 -0
- package/dist/react/_modules/lib/safe-href.js +9 -0
- package/dist/react/_modules/lib/safe-href.js.map +1 -0
- package/dist/react/_modules/lib/utils.js +7 -0
- package/dist/react/_modules/lib/utils.js.map +1 -0
- package/dist/react/_modules/react/components/Article.js +17 -0
- package/dist/react/_modules/react/components/Article.js.map +1 -0
- package/dist/react/_modules/react/components/Content.js +30 -0
- package/dist/react/_modules/react/components/Content.js.map +1 -0
- package/dist/react/_modules/react/components/PageHeader.js +8 -0
- package/dist/react/_modules/react/components/PageHeader.js.map +1 -0
- package/dist/react/_modules/react/components/Shell.js +17 -0
- package/dist/react/_modules/react/components/Shell.js.map +1 -0
- package/dist/react/_modules/react/components/ThemeScript.js +9 -0
- package/dist/react/_modules/react/components/ThemeScript.js.map +1 -0
- package/dist/react/_modules/recipes/article.js +34 -0
- package/dist/react/_modules/recipes/article.js.map +1 -0
- package/dist/react/_modules/recipes/content.js +34 -0
- package/dist/react/_modules/recipes/content.js.map +1 -0
- package/dist/react/_modules/recipes/cx.js +7 -0
- package/dist/react/_modules/recipes/cx.js.map +1 -0
- package/dist/react/_modules/recipes/field.js +12 -0
- package/dist/react/_modules/recipes/field.js.map +1 -0
- package/dist/react/_modules/recipes/shell.js +18 -0
- package/dist/react/_modules/recipes/shell.js.map +1 -0
- package/dist/react/_modules/recipes/table.js +9 -0
- package/dist/react/_modules/recipes/table.js.map +1 -0
- package/dist/react/_modules/tokens/categories.js +12 -0
- package/dist/react/_modules/tokens/categories.js.map +1 -0
- package/dist/react/_modules/tokens/colors.js +23 -0
- package/dist/react/_modules/tokens/colors.js.map +1 -0
- package/dist/react/_modules/tokens/motion.js +9 -0
- package/dist/react/_modules/tokens/motion.js.map +1 -0
- package/dist/react/_modules/tokens/spacing.js +9 -0
- package/dist/react/_modules/tokens/spacing.js.map +1 -0
- package/dist/react/_modules/tokens/typography.js +15 -0
- package/dist/react/_modules/tokens/typography.js.map +1 -0
- package/dist/react/_modules/tokens/zIndex.js +7 -0
- package/dist/react/_modules/tokens/zIndex.js.map +1 -0
- package/dist/react/chunk-2QRW4J2C.js +29 -0
- package/dist/react/chunk-2QRW4J2C.js.map +1 -0
- package/dist/react/chunk-3BWBG3BR.js +82 -0
- package/dist/react/chunk-3BWBG3BR.js.map +1 -0
- package/dist/react/chunk-563PKHIJ.js +48 -0
- package/dist/react/chunk-563PKHIJ.js.map +1 -0
- package/dist/react/chunk-5RPXXOD7.js +50 -0
- package/dist/react/chunk-5RPXXOD7.js.map +1 -0
- package/dist/react/chunk-6PF2SFKH.js +54 -0
- package/dist/react/chunk-6PF2SFKH.js.map +1 -0
- package/dist/react/chunk-7JIE3YAY.js +109 -0
- package/dist/react/chunk-7JIE3YAY.js.map +1 -0
- package/dist/react/chunk-7ZVSFBDK.js +26 -0
- package/dist/react/chunk-7ZVSFBDK.js.map +1 -0
- package/dist/react/chunk-AVAJOAL5.js +10 -0
- package/dist/react/chunk-AVAJOAL5.js.map +1 -0
- package/dist/react/chunk-BXKXO6FU.js +34 -0
- package/dist/react/chunk-BXKXO6FU.js.map +1 -0
- package/dist/react/chunk-CN3PNEZL.js +80 -0
- package/dist/react/chunk-CN3PNEZL.js.map +1 -0
- package/dist/react/chunk-EHJDOUXR.js +144 -0
- package/dist/react/chunk-EHJDOUXR.js.map +1 -0
- package/dist/react/chunk-FX2E23UV.js +28 -0
- package/dist/react/chunk-FX2E23UV.js.map +1 -0
- package/dist/react/chunk-GYGMM6RW.js +20 -0
- package/dist/react/chunk-GYGMM6RW.js.map +1 -0
- package/dist/react/chunk-H7DEOO3V.js +29 -0
- package/dist/react/chunk-H7DEOO3V.js.map +1 -0
- package/dist/react/chunk-HD7O5FNH.js +39 -0
- package/dist/react/chunk-HD7O5FNH.js.map +1 -0
- package/dist/react/chunk-HYLCMS2U.js +28 -0
- package/dist/react/chunk-HYLCMS2U.js.map +1 -0
- package/dist/react/chunk-HYXG2WF4.js +73 -0
- package/dist/react/chunk-HYXG2WF4.js.map +1 -0
- package/dist/react/chunk-KQK7SZ3K.js +52 -0
- package/dist/react/chunk-KQK7SZ3K.js.map +1 -0
- package/dist/react/chunk-KQZBK3XX.js +24 -0
- package/dist/react/chunk-KQZBK3XX.js.map +1 -0
- package/dist/react/chunk-L6WPFLSD.js +39 -0
- package/dist/react/chunk-L6WPFLSD.js.map +1 -0
- package/dist/react/chunk-LOVNG6RF.js +9 -0
- package/dist/react/chunk-LOVNG6RF.js.map +1 -0
- package/dist/react/chunk-M5FFVQKK.js +41 -0
- package/dist/react/chunk-M5FFVQKK.js.map +1 -0
- package/dist/react/chunk-MZEFPODP.js +77 -0
- package/dist/react/chunk-MZEFPODP.js.map +1 -0
- package/dist/react/chunk-NJQN37EG.js +37 -0
- package/dist/react/chunk-NJQN37EG.js.map +1 -0
- package/dist/react/chunk-OEFJMV7G.js +144 -0
- package/dist/react/chunk-OEFJMV7G.js.map +1 -0
- package/dist/react/chunk-P4M4LEI2.js +62 -0
- package/dist/react/chunk-P4M4LEI2.js.map +1 -0
- package/dist/react/chunk-PGDHKADW.js +60 -0
- package/dist/react/chunk-PGDHKADW.js.map +1 -0
- package/dist/react/chunk-QTVPXQ43.js +29 -0
- package/dist/react/chunk-QTVPXQ43.js.map +1 -0
- package/dist/react/chunk-QVOZHMVF.js +14 -0
- package/dist/react/chunk-QVOZHMVF.js.map +1 -0
- package/dist/react/chunk-SJ2YK4NJ.js +27 -0
- package/dist/react/chunk-SJ2YK4NJ.js.map +1 -0
- package/dist/react/chunk-SSMGCYPH.js +79 -0
- package/dist/react/chunk-SSMGCYPH.js.map +1 -0
- package/dist/react/chunk-SUT4G3TE.js +29 -0
- package/dist/react/chunk-SUT4G3TE.js.map +1 -0
- package/dist/react/chunk-SVLIJGBZ.js +14 -0
- package/dist/react/chunk-SVLIJGBZ.js.map +1 -0
- package/dist/react/chunk-SY7EEIC3.js +100 -0
- package/dist/react/chunk-SY7EEIC3.js.map +1 -0
- package/dist/react/chunk-TI3OPDCN.js +25 -0
- package/dist/react/chunk-TI3OPDCN.js.map +1 -0
- package/dist/react/chunk-U6L6J73Y.js +27 -0
- package/dist/react/chunk-U6L6J73Y.js.map +1 -0
- package/dist/react/chunk-VD5O66DN.js +54 -0
- package/dist/react/chunk-VD5O66DN.js.map +1 -0
- package/dist/react/chunk-YDGOXO6Q.js +74 -0
- package/dist/react/chunk-YDGOXO6Q.js.map +1 -0
- package/dist/react/chunk-YTTFCX3E.js +16 -0
- package/dist/react/chunk-YTTFCX3E.js.map +1 -0
- package/dist/react/chunk-YXV3UEL5.js +27 -0
- package/dist/react/chunk-YXV3UEL5.js.map +1 -0
- package/dist/react/client/_modules/behaviors/clipboard.js +8 -0
- package/dist/react/client/_modules/behaviors/clipboard.js.map +1 -0
- package/dist/react/client/_modules/behaviors/mediaQuery.js +8 -0
- package/dist/react/client/_modules/behaviors/mediaQuery.js.map +1 -0
- package/dist/react/client/_modules/behaviors/readingProgress.js +10 -0
- package/dist/react/client/_modules/behaviors/readingProgress.js.map +1 -0
- package/dist/react/client/_modules/behaviors/scrollSpy.js +8 -0
- package/dist/react/client/_modules/behaviors/scrollSpy.js.map +1 -0
- package/dist/react/client/_modules/behaviors/themeManager.js +11 -0
- package/dist/react/client/_modules/behaviors/themeManager.js.map +1 -0
- package/dist/react/client/_modules/components/ui/alert-dialog.js +30 -0
- package/dist/react/client/_modules/components/ui/alert-dialog.js.map +1 -0
- package/dist/react/client/_modules/components/ui/bottom-sheet.js +28 -0
- package/dist/react/client/_modules/components/ui/bottom-sheet.js.map +1 -0
- package/dist/react/client/_modules/components/ui/combobox.js +13 -0
- package/dist/react/client/_modules/components/ui/combobox.js.map +1 -0
- package/dist/react/client/_modules/components/ui/dialog.js +30 -0
- package/dist/react/client/_modules/components/ui/dialog.js.map +1 -0
- package/dist/react/client/_modules/components/ui/dropdown-menu.js +39 -0
- package/dist/react/client/_modules/components/ui/dropdown-menu.js.map +1 -0
- package/dist/react/client/_modules/components/ui/icon-set.js +12 -0
- package/dist/react/client/_modules/components/ui/icon-set.js.map +1 -0
- package/dist/react/client/_modules/components/ui/icon.js +10 -0
- package/dist/react/client/_modules/components/ui/icon.js.map +1 -0
- package/dist/react/client/_modules/components/ui/restore-focus.js +8 -0
- package/dist/react/client/_modules/components/ui/restore-focus.js.map +1 -0
- package/dist/react/client/_modules/components/ui/select.js +29 -0
- package/dist/react/client/_modules/components/ui/select.js.map +1 -0
- package/dist/react/client/_modules/components/ui/tabs.js +15 -0
- package/dist/react/client/_modules/components/ui/tabs.js.map +1 -0
- package/dist/react/client/_modules/components/ui/tooltip.js +15 -0
- package/dist/react/client/_modules/components/ui/tooltip.js.map +1 -0
- package/dist/react/client/_modules/lib/utils.js +8 -0
- package/dist/react/client/_modules/lib/utils.js.map +1 -0
- package/dist/react/client/_modules/react/client/CopyButton.js +11 -0
- package/dist/react/client/_modules/react/client/CopyButton.js.map +1 -0
- package/dist/react/client/_modules/react/client/ReadingProgress.js +14 -0
- package/dist/react/client/_modules/react/client/ReadingProgress.js.map +1 -0
- package/dist/react/client/_modules/react/client/SidebarProvider.js +26 -0
- package/dist/react/client/_modules/react/client/SidebarProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/TableOfContents.js +14 -0
- package/dist/react/client/_modules/react/client/TableOfContents.js.map +1 -0
- package/dist/react/client/_modules/react/client/ThemeProvider.js +12 -0
- package/dist/react/client/_modules/react/client/ThemeProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/ThemeToggle.js +14 -0
- package/dist/react/client/_modules/react/client/ThemeToggle.js.map +1 -0
- package/dist/react/client/_modules/react/client/ToastProvider.js +14 -0
- package/dist/react/client/_modules/react/client/ToastProvider.js.map +1 -0
- package/dist/react/client/_modules/react/client/hooks.js +17 -0
- package/dist/react/client/_modules/react/client/hooks.js.map +1 -0
- package/dist/react/client/_modules/react/client/shadcn.js +160 -0
- package/dist/react/client/_modules/react/client/shadcn.js.map +1 -0
- package/dist/react/client/_modules/recipes/article.js +35 -0
- package/dist/react/client/_modules/recipes/article.js.map +1 -0
- package/dist/react/client/_modules/recipes/cx.js +8 -0
- package/dist/react/client/_modules/recipes/cx.js.map +1 -0
- package/dist/react/client/_modules/recipes/field.js +13 -0
- package/dist/react/client/_modules/recipes/field.js.map +1 -0
- package/dist/react/client/_modules/tokens/colors.js +24 -0
- package/dist/react/client/_modules/tokens/colors.js.map +1 -0
- package/dist/react/client/chunk-3MVZ2ES4.js +83 -0
- package/dist/react/client/chunk-3MVZ2ES4.js.map +1 -0
- package/dist/react/client/chunk-7AU2DPOL.js +35 -0
- package/dist/react/client/chunk-7AU2DPOL.js.map +1 -0
- package/dist/react/client/chunk-ABWCVXOO.js +11 -0
- package/dist/react/client/chunk-ABWCVXOO.js.map +1 -0
- package/dist/react/client/chunk-AEXJWMUV.js +52 -0
- package/dist/react/client/chunk-AEXJWMUV.js.map +1 -0
- package/dist/react/client/chunk-CJQZ4BGO.js +125 -0
- package/dist/react/client/chunk-CJQZ4BGO.js.map +1 -0
- package/dist/react/client/chunk-CMMPIPNC.js +30 -0
- package/dist/react/client/chunk-CMMPIPNC.js.map +1 -0
- package/dist/react/client/chunk-CWA3N5RK.js +123 -0
- package/dist/react/client/chunk-CWA3N5RK.js.map +1 -0
- package/dist/react/client/chunk-ECOPTUZT.js +102 -0
- package/dist/react/client/chunk-ECOPTUZT.js.map +1 -0
- package/dist/react/client/chunk-GD7XJWKF.js +102 -0
- package/dist/react/client/chunk-GD7XJWKF.js.map +1 -0
- package/dist/react/client/chunk-JVVNV4DF.js +95 -0
- package/dist/react/client/chunk-JVVNV4DF.js.map +1 -0
- package/dist/react/client/chunk-LDOUB5IA.js +40 -0
- package/dist/react/client/chunk-LDOUB5IA.js.map +1 -0
- package/dist/react/client/chunk-M5QFSQYC.js +40 -0
- package/dist/react/client/chunk-M5QFSQYC.js.map +1 -0
- package/dist/react/client/chunk-MGR4F2BJ.js +67 -0
- package/dist/react/client/chunk-MGR4F2BJ.js.map +1 -0
- package/dist/react/client/chunk-MYTOL2RH.js +61 -0
- package/dist/react/client/chunk-MYTOL2RH.js.map +1 -0
- package/dist/react/client/chunk-N64GC5ZU.js +12 -0
- package/dist/react/client/chunk-N64GC5ZU.js.map +1 -0
- package/dist/react/client/chunk-NEAL74VV.js +130 -0
- package/dist/react/client/chunk-NEAL74VV.js.map +1 -0
- package/dist/react/client/chunk-OF6BMW2X.js +30 -0
- package/dist/react/client/chunk-OF6BMW2X.js.map +1 -0
- package/dist/react/client/chunk-OILITPDP.js +72 -0
- package/dist/react/client/chunk-OILITPDP.js.map +1 -0
- package/dist/react/client/chunk-OU4ACOFA.js +75 -0
- package/dist/react/client/chunk-OU4ACOFA.js.map +1 -0
- package/dist/react/client/chunk-OVMH25G3.js +23 -0
- package/dist/react/client/chunk-OVMH25G3.js.map +1 -0
- package/dist/react/client/chunk-P2UPL6Y3.js +205 -0
- package/dist/react/client/chunk-P2UPL6Y3.js.map +1 -0
- package/dist/react/client/chunk-PAOYY55O.js +41 -0
- package/dist/react/client/chunk-PAOYY55O.js.map +1 -0
- package/dist/react/client/chunk-PYG5NCEU.js +54 -0
- package/dist/react/client/chunk-PYG5NCEU.js.map +1 -0
- package/dist/react/client/chunk-RCZS37V5.js +239 -0
- package/dist/react/client/chunk-RCZS37V5.js.map +1 -0
- package/dist/react/client/chunk-RJFN4KXE.js +36 -0
- package/dist/react/client/chunk-RJFN4KXE.js.map +1 -0
- package/dist/react/client/chunk-RNMQZ6T2.js +62 -0
- package/dist/react/client/chunk-RNMQZ6T2.js.map +1 -0
- package/dist/react/client/chunk-TXL2US4Z.js +53 -0
- package/dist/react/client/chunk-TXL2US4Z.js.map +1 -0
- package/dist/react/client/chunk-U6FMZ32G.js +192 -0
- package/dist/react/client/chunk-U6FMZ32G.js.map +1 -0
- package/dist/react/client/chunk-WR7KQGBM.js +2 -0
- package/dist/react/client/chunk-WR7KQGBM.js.map +1 -0
- package/dist/react/client/chunk-XHL4YEVA.js +17 -0
- package/dist/react/client/chunk-XHL4YEVA.js.map +1 -0
- package/dist/react/client/index.cjs +1924 -0
- package/dist/react/client/index.cjs.map +1 -0
- package/dist/react/client/index.d.cts +588 -0
- package/dist/react/client/index.d.ts +588 -0
- package/dist/react/client/index.js +233 -0
- package/dist/react/client/index.js.map +1 -0
- package/dist/react/index.cjs +1682 -0
- package/dist/react/index.cjs.map +1 -0
- package/dist/react/index.d.cts +994 -0
- package/dist/react/index.d.ts +994 -0
- package/dist/react/index.js +333 -0
- package/dist/react/index.js.map +1 -0
- package/dist/shadcn-overrides.css +112 -0
- package/dist/style.css +2480 -0
- package/dist/tailwind.css +73 -0
- package/dist/theme.css +346 -0
- package/package.json +171 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1,2480 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Still Void — component styles
|
|
3
|
+
Import once: `import '@still-void/ui/style.css'`
|
|
4
|
+
Requires theme.css (tokens) to be loaded as well.
|
|
5
|
+
All values reference theme vars — no magic numbers.
|
|
6
|
+
============================================================ */
|
|
7
|
+
|
|
8
|
+
/* ---------- base ---------- */
|
|
9
|
+
.sv-root,
|
|
10
|
+
[data-sv] body,
|
|
11
|
+
body.sv-body {
|
|
12
|
+
background: var(--sv-bg);
|
|
13
|
+
color: var(--sv-text);
|
|
14
|
+
font-family: var(--sv-font-body);
|
|
15
|
+
font-size: var(--sv-text-base);
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Display headings always balance. */
|
|
21
|
+
.sv-display {
|
|
22
|
+
font-family: var(--sv-font-display);
|
|
23
|
+
letter-spacing: -0.02em;
|
|
24
|
+
text-wrap: balance;
|
|
25
|
+
color: var(--sv-text);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* ---------- Header ---------- */
|
|
29
|
+
.sv-header {
|
|
30
|
+
position: sticky;
|
|
31
|
+
top: 0;
|
|
32
|
+
z-index: var(--sv-z-sticky);
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
gap: var(--sv-space-6);
|
|
37
|
+
padding: var(--sv-space-4) var(--sv-space-6);
|
|
38
|
+
}
|
|
39
|
+
.sv-header__nav {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: var(--sv-space-5);
|
|
43
|
+
/* Lets the row shrink below its content width, and is what the mobile
|
|
44
|
+
dropdown panel below overrides to lay its links out as a column. */
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
/* <details> wraps <nav> so the mobile disclosure needs zero JavaScript: the
|
|
48
|
+
summary is the tap target, the browser's own open/close state drives it. */
|
|
49
|
+
.sv-header__nav-toggle {
|
|
50
|
+
position: relative;
|
|
51
|
+
}
|
|
52
|
+
.sv-header__nav-summary {
|
|
53
|
+
/* The browser renders <summary> like a <li> with a marker; this system
|
|
54
|
+
draws its own disclosure affordance instead. */
|
|
55
|
+
list-style: none;
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
.sv-header__nav-summary::-webkit-details-marker {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
.sv-header__nav-summary::marker {
|
|
62
|
+
content: '';
|
|
63
|
+
}
|
|
64
|
+
@media (min-width: 641px) {
|
|
65
|
+
/* Above the breakpoint <details> is a no-op wrapper: the nav always
|
|
66
|
+
renders regardless of the native open/closed state, and there is
|
|
67
|
+
nothing to toggle. Newer browsers project non-summary content through
|
|
68
|
+
a ::details-content pseudo-element that the UA stylesheet sets to
|
|
69
|
+
`content-visibility: hidden` (plus a collapsed block-size) while
|
|
70
|
+
closed — overriding `display` on .sv-header__nav alone doesn't reach
|
|
71
|
+
past that ancestor, so it has to be reset here too. Older browsers
|
|
72
|
+
without ::details-content support just skip this rule; the `display`
|
|
73
|
+
override below is what reaches their `details:not([open]) > *` UA
|
|
74
|
+
rule instead. */
|
|
75
|
+
.sv-header__nav-toggle::details-content {
|
|
76
|
+
content-visibility: visible !important;
|
|
77
|
+
block-size: auto !important;
|
|
78
|
+
overflow: visible !important;
|
|
79
|
+
}
|
|
80
|
+
.sv-header__nav-toggle .sv-header__nav {
|
|
81
|
+
display: flex !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@media (max-width: 640px) {
|
|
85
|
+
.sv-header__nav-summary {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
width: var(--sv-space-10);
|
|
90
|
+
height: var(--sv-space-10);
|
|
91
|
+
border: 1px solid var(--sv-border);
|
|
92
|
+
border-radius: var(--sv-radius-sm);
|
|
93
|
+
color: var(--sv-text-2);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
.sv-header__nav-summary:hover {
|
|
97
|
+
color: var(--sv-text);
|
|
98
|
+
border-color: var(--sv-border-strong);
|
|
99
|
+
}
|
|
100
|
+
.sv-header__nav-summary:focus-visible {
|
|
101
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
102
|
+
outline-offset: 2px;
|
|
103
|
+
}
|
|
104
|
+
/* Closed is the native default (no [open] attribute): the browser hides
|
|
105
|
+
everything here but <summary> without any rule of ours. Open state
|
|
106
|
+
turns the nav into a dropdown panel instead of the horizontal row. */
|
|
107
|
+
.sv-header__nav-toggle[open] .sv-header__nav {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: calc(100% + var(--sv-space-2));
|
|
110
|
+
right: 0;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
align-items: stretch;
|
|
113
|
+
gap: var(--sv-space-1);
|
|
114
|
+
min-width: 180px;
|
|
115
|
+
padding: var(--sv-space-2);
|
|
116
|
+
border: 1px solid var(--sv-border);
|
|
117
|
+
border-radius: var(--sv-radius-md);
|
|
118
|
+
background: var(--sv-surface);
|
|
119
|
+
}
|
|
120
|
+
.sv-header__nav-toggle[open] .sv-header__link {
|
|
121
|
+
padding: var(--sv-space-2) var(--sv-space-3);
|
|
122
|
+
/* WCAG 2.5.8 (AA) touch target, generous for a coarse pointer. */
|
|
123
|
+
min-height: 44px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
.sv-header__link {
|
|
127
|
+
appearance: none;
|
|
128
|
+
border: none;
|
|
129
|
+
background: none;
|
|
130
|
+
font-family: inherit;
|
|
131
|
+
padding: 0;
|
|
132
|
+
color: var(--sv-text-2);
|
|
133
|
+
text-decoration: none;
|
|
134
|
+
font-size: var(--sv-text-sm);
|
|
135
|
+
font-weight: 500;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
transition: color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
138
|
+
/* WCAG 2.5.8 (AA): 24×24 CSS px minimum target size. */
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
min-height: 24px;
|
|
142
|
+
}
|
|
143
|
+
.sv-header__link:hover,
|
|
144
|
+
.sv-header__link--active {
|
|
145
|
+
color: var(--sv-text);
|
|
146
|
+
}
|
|
147
|
+
.sv-header__actions {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: var(--sv-space-3);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ---------- Logo ---------- */
|
|
154
|
+
.sv-logo {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
gap: var(--sv-space-2);
|
|
158
|
+
text-decoration: none;
|
|
159
|
+
font-family: var(--sv-font-display);
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
font-size: var(--sv-text-md);
|
|
162
|
+
color: var(--sv-text);
|
|
163
|
+
}
|
|
164
|
+
.sv-logo__dot {
|
|
165
|
+
width: 8px;
|
|
166
|
+
height: 8px;
|
|
167
|
+
border-radius: var(--sv-radius-full);
|
|
168
|
+
background: var(--sv-accent);
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* ---------- Footer ---------- */
|
|
173
|
+
.sv-footer {
|
|
174
|
+
border-top: 1px solid var(--sv-border);
|
|
175
|
+
padding: var(--sv-space-8) var(--sv-space-6);
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
gap: var(--sv-space-6);
|
|
180
|
+
flex-wrap: wrap;
|
|
181
|
+
color: var(--sv-text-2);
|
|
182
|
+
font-size: var(--sv-text-sm);
|
|
183
|
+
}
|
|
184
|
+
.sv-footer__links {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: var(--sv-space-5);
|
|
187
|
+
}
|
|
188
|
+
.sv-footer__link {
|
|
189
|
+
color: var(--sv-text-2);
|
|
190
|
+
text-decoration: none;
|
|
191
|
+
transition: color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
192
|
+
}
|
|
193
|
+
.sv-footer__link:hover {
|
|
194
|
+
color: var(--sv-text);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* ---------- CategoryPill ---------- */
|
|
198
|
+
.sv-pill {
|
|
199
|
+
display: inline-flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
gap: var(--sv-space-2);
|
|
202
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
203
|
+
border: 1px solid var(--sv-border);
|
|
204
|
+
border-radius: var(--sv-radius-full);
|
|
205
|
+
background: var(--sv-surface);
|
|
206
|
+
color: var(--sv-text-2);
|
|
207
|
+
font-size: var(--sv-text-xs);
|
|
208
|
+
font-weight: 600;
|
|
209
|
+
letter-spacing: 0.08em;
|
|
210
|
+
text-transform: uppercase;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
}
|
|
213
|
+
.sv-pill__dot {
|
|
214
|
+
width: 6px;
|
|
215
|
+
height: 6px;
|
|
216
|
+
border-radius: var(--sv-radius-full);
|
|
217
|
+
background: var(--sv-pill-color, var(--sv-accent));
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
}
|
|
220
|
+
.sv-pill--interactive {
|
|
221
|
+
appearance: none;
|
|
222
|
+
font-family: inherit;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
transition:
|
|
225
|
+
color var(--sv-duration-fast) var(--sv-ease-hover),
|
|
226
|
+
border-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
227
|
+
}
|
|
228
|
+
.sv-pill--interactive:hover,
|
|
229
|
+
.sv-pill--active {
|
|
230
|
+
color: var(--sv-text);
|
|
231
|
+
border-color: var(--sv-border-strong);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* ---------- PostCard ---------- */
|
|
235
|
+
.sv-post-card {
|
|
236
|
+
display: flex;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
gap: var(--sv-space-3);
|
|
239
|
+
padding: var(--sv-space-6);
|
|
240
|
+
background: var(--sv-surface);
|
|
241
|
+
border: 1px solid var(--sv-border);
|
|
242
|
+
border-radius: var(--sv-radius-lg);
|
|
243
|
+
/* No shadow. Ever. */
|
|
244
|
+
box-shadow: none;
|
|
245
|
+
}
|
|
246
|
+
.sv-post-card--dense {
|
|
247
|
+
padding: var(--sv-space-4);
|
|
248
|
+
gap: var(--sv-space-2);
|
|
249
|
+
}
|
|
250
|
+
.sv-post-card__meta {
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
gap: var(--sv-space-3);
|
|
254
|
+
color: var(--sv-text-3);
|
|
255
|
+
font-size: var(--sv-text-xs);
|
|
256
|
+
}
|
|
257
|
+
.sv-post-card__title {
|
|
258
|
+
font-family: var(--sv-font-display);
|
|
259
|
+
font-size: var(--sv-text-xl);
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
letter-spacing: -0.02em;
|
|
262
|
+
text-wrap: balance;
|
|
263
|
+
color: var(--sv-text);
|
|
264
|
+
margin: 0;
|
|
265
|
+
}
|
|
266
|
+
.sv-post-card--dense .sv-post-card__title {
|
|
267
|
+
font-size: var(--sv-text-md);
|
|
268
|
+
}
|
|
269
|
+
.sv-post-card__title a {
|
|
270
|
+
color: inherit;
|
|
271
|
+
text-decoration: none;
|
|
272
|
+
}
|
|
273
|
+
.sv-post-card__excerpt {
|
|
274
|
+
color: var(--sv-text-2);
|
|
275
|
+
font-size: var(--sv-text-base);
|
|
276
|
+
line-height: 1.5;
|
|
277
|
+
margin: 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* ---------- FeaturedPostCard ---------- */
|
|
281
|
+
.sv-featured-card {
|
|
282
|
+
display: grid;
|
|
283
|
+
grid-template-columns: 1fr;
|
|
284
|
+
gap: var(--sv-space-6);
|
|
285
|
+
padding: var(--sv-space-8);
|
|
286
|
+
overflow: hidden;
|
|
287
|
+
}
|
|
288
|
+
@media (min-width: 768px) {
|
|
289
|
+
.sv-featured-card {
|
|
290
|
+
grid-template-columns: 3fr 2fr;
|
|
291
|
+
align-items: center;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
.sv-featured-card__body {
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: var(--sv-space-4);
|
|
298
|
+
}
|
|
299
|
+
.sv-featured-card__title {
|
|
300
|
+
font-family: var(--sv-font-display);
|
|
301
|
+
font-size: var(--sv-text-2xl);
|
|
302
|
+
font-weight: 700;
|
|
303
|
+
letter-spacing: -0.02em;
|
|
304
|
+
text-wrap: balance;
|
|
305
|
+
color: var(--sv-text);
|
|
306
|
+
margin: 0;
|
|
307
|
+
}
|
|
308
|
+
.sv-featured-card__title a {
|
|
309
|
+
color: inherit;
|
|
310
|
+
text-decoration: none;
|
|
311
|
+
}
|
|
312
|
+
.sv-featured-card__visual {
|
|
313
|
+
aspect-ratio: 16 / 10;
|
|
314
|
+
min-height: 160px;
|
|
315
|
+
border-radius: var(--sv-radius-md);
|
|
316
|
+
background: var(--sv-surface-2);
|
|
317
|
+
display: flex;
|
|
318
|
+
align-items: center;
|
|
319
|
+
justify-content: center;
|
|
320
|
+
overflow: hidden;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* ---------- PostGrid + Sidebar layout ---------- */
|
|
324
|
+
.sv-post-grid {
|
|
325
|
+
display: grid;
|
|
326
|
+
grid-template-columns: 1fr;
|
|
327
|
+
gap: var(--sv-space-6);
|
|
328
|
+
}
|
|
329
|
+
@media (min-width: 640px) {
|
|
330
|
+
.sv-post-grid {
|
|
331
|
+
grid-template-columns: repeat(2, 1fr);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
.sv-layout {
|
|
335
|
+
display: grid;
|
|
336
|
+
/* minmax(0, 1fr), not 1fr: a bare 1fr is minmax(auto, 1fr), so the column
|
|
337
|
+
grew to its content's min-content and pushed narrow pages sideways. */
|
|
338
|
+
grid-template-columns: minmax(0, 1fr);
|
|
339
|
+
gap: var(--sv-space-10);
|
|
340
|
+
max-width: 1120px;
|
|
341
|
+
margin: 0 auto;
|
|
342
|
+
padding: var(--sv-space-8) var(--sv-space-6);
|
|
343
|
+
}
|
|
344
|
+
@media (min-width: 1024px) {
|
|
345
|
+
.sv-layout--with-sidebar {
|
|
346
|
+
grid-template-columns: minmax(0, 1fr) 280px;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
.sv-sidebar {
|
|
350
|
+
display: flex;
|
|
351
|
+
flex-direction: column;
|
|
352
|
+
gap: var(--sv-space-8);
|
|
353
|
+
}
|
|
354
|
+
.sv-sidebar__section-title {
|
|
355
|
+
font-size: var(--sv-text-sm);
|
|
356
|
+
font-weight: 600;
|
|
357
|
+
letter-spacing: 0.08em;
|
|
358
|
+
text-transform: uppercase;
|
|
359
|
+
color: var(--sv-text-3);
|
|
360
|
+
margin: 0 0 var(--sv-space-4);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ---------- Hero ---------- */
|
|
364
|
+
.sv-hero {
|
|
365
|
+
display: flex;
|
|
366
|
+
flex-direction: column;
|
|
367
|
+
gap: var(--sv-space-4);
|
|
368
|
+
padding: var(--sv-space-16) 0 var(--sv-space-12);
|
|
369
|
+
}
|
|
370
|
+
/* DESIGN "Label" step: Manrope 600, 0.75rem, 0.08em tracking, uppercase — a
|
|
371
|
+
weight/tracking/case treatment, not a typeface change (Sparse-Display Rule). */
|
|
372
|
+
.sv-hero__eyebrow {
|
|
373
|
+
color: var(--sv-accent-ink);
|
|
374
|
+
font-family: var(--sv-font-body);
|
|
375
|
+
font-size: var(--sv-text-xs);
|
|
376
|
+
font-weight: 600;
|
|
377
|
+
letter-spacing: 0.08em;
|
|
378
|
+
text-transform: uppercase;
|
|
379
|
+
}
|
|
380
|
+
.sv-hero__title {
|
|
381
|
+
font-family: var(--sv-font-display);
|
|
382
|
+
font-size: var(--sv-text-4xl);
|
|
383
|
+
font-weight: 700;
|
|
384
|
+
letter-spacing: -0.02em;
|
|
385
|
+
line-height: 1.15;
|
|
386
|
+
text-wrap: balance;
|
|
387
|
+
color: var(--sv-text);
|
|
388
|
+
margin: 0;
|
|
389
|
+
}
|
|
390
|
+
.sv-hero__description {
|
|
391
|
+
color: var(--sv-text-2);
|
|
392
|
+
font-size: var(--sv-text-lg);
|
|
393
|
+
line-height: 1.7;
|
|
394
|
+
max-width: 60ch;
|
|
395
|
+
margin: 0;
|
|
396
|
+
}
|
|
397
|
+
/* Narrow viewports: the display step (2.75rem) pushes the page's content below
|
|
398
|
+
the fold on a phone, so the title drops to the headline step (1.75rem). */
|
|
399
|
+
@media (width < 40rem) {
|
|
400
|
+
.sv-hero__title {
|
|
401
|
+
font-size: var(--sv-text-2xl);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/* ---------- PageHeader ---------- */
|
|
406
|
+
/* Mobile first: title block and actions stack; side by side from 40rem. The
|
|
407
|
+
title row never wraps (a badge hopping lines when the web font swaps in
|
|
408
|
+
moves the whole page); a wide badge opts into `--stack` instead, which is
|
|
409
|
+
decided by viewport width only. */
|
|
410
|
+
.sv-page-header {
|
|
411
|
+
display: flex;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
gap: var(--sv-space-4);
|
|
414
|
+
margin-bottom: var(--sv-space-6);
|
|
415
|
+
}
|
|
416
|
+
.sv-page-header__main {
|
|
417
|
+
min-width: 0;
|
|
418
|
+
}
|
|
419
|
+
.sv-page-header__leading {
|
|
420
|
+
margin-bottom: var(--sv-space-2);
|
|
421
|
+
}
|
|
422
|
+
.sv-page-header__title-row {
|
|
423
|
+
display: flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
gap: var(--sv-space-3);
|
|
426
|
+
}
|
|
427
|
+
.sv-page-header__title-row--stack {
|
|
428
|
+
flex-direction: column;
|
|
429
|
+
align-items: flex-start;
|
|
430
|
+
gap: var(--sv-space-2);
|
|
431
|
+
}
|
|
432
|
+
.sv-page-header__title {
|
|
433
|
+
min-width: 0;
|
|
434
|
+
margin: 0;
|
|
435
|
+
color: var(--sv-text);
|
|
436
|
+
font-family: var(--sv-font-display);
|
|
437
|
+
font-size: var(--sv-text-2xl);
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
letter-spacing: -0.02em;
|
|
440
|
+
line-height: 1.15;
|
|
441
|
+
overflow-wrap: anywhere;
|
|
442
|
+
}
|
|
443
|
+
.sv-page-header__badge {
|
|
444
|
+
display: flex;
|
|
445
|
+
flex-wrap: wrap;
|
|
446
|
+
align-items: center;
|
|
447
|
+
gap: var(--sv-space-2);
|
|
448
|
+
}
|
|
449
|
+
.sv-page-header__description {
|
|
450
|
+
max-width: 68ch;
|
|
451
|
+
margin-top: var(--sv-space-1);
|
|
452
|
+
color: var(--sv-text-2);
|
|
453
|
+
font-size: var(--sv-text-sm);
|
|
454
|
+
}
|
|
455
|
+
.sv-page-header__actions {
|
|
456
|
+
display: flex;
|
|
457
|
+
flex-wrap: wrap;
|
|
458
|
+
align-items: center;
|
|
459
|
+
gap: var(--sv-space-2);
|
|
460
|
+
}
|
|
461
|
+
@media (width >= 40rem) {
|
|
462
|
+
.sv-page-header {
|
|
463
|
+
flex-direction: row;
|
|
464
|
+
align-items: flex-end;
|
|
465
|
+
justify-content: space-between;
|
|
466
|
+
}
|
|
467
|
+
.sv-page-header__title-row--stack {
|
|
468
|
+
flex-direction: row;
|
|
469
|
+
align-items: center;
|
|
470
|
+
gap: var(--sv-space-3);
|
|
471
|
+
}
|
|
472
|
+
.sv-page-header__actions {
|
|
473
|
+
flex-shrink: 0;
|
|
474
|
+
justify-content: flex-end;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* ---------- Skeleton ---------- */
|
|
479
|
+
.sv-skeleton-line {
|
|
480
|
+
height: var(--sv-space-4);
|
|
481
|
+
}
|
|
482
|
+
.sv-skeleton-line--sm {
|
|
483
|
+
height: var(--sv-space-3);
|
|
484
|
+
width: 40%;
|
|
485
|
+
}
|
|
486
|
+
.sv-card-skeleton {
|
|
487
|
+
display: flex;
|
|
488
|
+
flex-direction: column;
|
|
489
|
+
gap: var(--sv-space-3);
|
|
490
|
+
padding: var(--sv-space-6);
|
|
491
|
+
border: 1px solid var(--sv-border);
|
|
492
|
+
border-radius: var(--sv-radius-lg);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* ---------- CodeBlock ---------- */
|
|
496
|
+
.sv-code-block {
|
|
497
|
+
position: relative;
|
|
498
|
+
background: var(--sv-bg-elev);
|
|
499
|
+
border: 1px solid var(--sv-border);
|
|
500
|
+
border-radius: var(--sv-radius-lg);
|
|
501
|
+
overflow: hidden;
|
|
502
|
+
font-family: var(--sv-font-mono);
|
|
503
|
+
font-size: var(--sv-text-sm);
|
|
504
|
+
}
|
|
505
|
+
.sv-code-block__header {
|
|
506
|
+
display: flex;
|
|
507
|
+
align-items: center;
|
|
508
|
+
justify-content: space-between;
|
|
509
|
+
gap: var(--sv-space-3);
|
|
510
|
+
padding: var(--sv-space-2) var(--sv-space-4);
|
|
511
|
+
border-bottom: 1px solid var(--sv-border);
|
|
512
|
+
color: var(--sv-text-3);
|
|
513
|
+
font-size: var(--sv-text-xs);
|
|
514
|
+
letter-spacing: 0.08em;
|
|
515
|
+
text-transform: uppercase;
|
|
516
|
+
}
|
|
517
|
+
.sv-code-block__pre {
|
|
518
|
+
margin: 0;
|
|
519
|
+
padding: var(--sv-space-4);
|
|
520
|
+
overflow-x: auto;
|
|
521
|
+
line-height: 1.7;
|
|
522
|
+
color: var(--sv-text);
|
|
523
|
+
}
|
|
524
|
+
.sv-code-block__copy {
|
|
525
|
+
appearance: none;
|
|
526
|
+
border: 1px solid var(--sv-border);
|
|
527
|
+
background: var(--sv-surface);
|
|
528
|
+
color: var(--sv-text-2);
|
|
529
|
+
font-family: var(--sv-font-body);
|
|
530
|
+
font-size: var(--sv-text-xs);
|
|
531
|
+
font-weight: 600;
|
|
532
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
533
|
+
border-radius: var(--sv-radius-sm);
|
|
534
|
+
cursor: pointer;
|
|
535
|
+
transition:
|
|
536
|
+
color var(--sv-duration-fast) var(--sv-ease-hover),
|
|
537
|
+
border-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
538
|
+
/* WCAG 2.5.8 (AA): 24×24 CSS px minimum target size. */
|
|
539
|
+
display: inline-flex;
|
|
540
|
+
align-items: center;
|
|
541
|
+
justify-content: center;
|
|
542
|
+
min-height: 24px;
|
|
543
|
+
}
|
|
544
|
+
.sv-code-block__copy:hover {
|
|
545
|
+
color: var(--sv-text);
|
|
546
|
+
border-color: var(--sv-border-strong);
|
|
547
|
+
}
|
|
548
|
+
.sv-code-block__copy--copied {
|
|
549
|
+
color: var(--sv-accent-ink);
|
|
550
|
+
border-color: var(--sv-accent-ink);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/* ---------- Callout ---------- */
|
|
554
|
+
.sv-callout {
|
|
555
|
+
display: flex;
|
|
556
|
+
gap: var(--sv-space-3);
|
|
557
|
+
padding: var(--sv-space-4) var(--sv-space-5);
|
|
558
|
+
border: 1px solid var(--sv-border);
|
|
559
|
+
border-inline-start: 2px solid var(--sv-callout-color, var(--sv-accent-ink));
|
|
560
|
+
border-radius: var(--sv-radius-md);
|
|
561
|
+
background: var(--sv-surface);
|
|
562
|
+
color: var(--sv-text-2);
|
|
563
|
+
font-size: var(--sv-text-base);
|
|
564
|
+
line-height: 1.5;
|
|
565
|
+
}
|
|
566
|
+
.sv-callout--note {
|
|
567
|
+
--sv-callout-color: var(--sv-accent-cyan-ink);
|
|
568
|
+
}
|
|
569
|
+
.sv-callout--warn {
|
|
570
|
+
--sv-callout-color: var(--sv-accent-amber-ink);
|
|
571
|
+
}
|
|
572
|
+
.sv-callout--aha {
|
|
573
|
+
--sv-callout-color: var(--sv-accent-violet-ink);
|
|
574
|
+
}
|
|
575
|
+
.sv-callout__label {
|
|
576
|
+
font-family: var(--sv-font-mono);
|
|
577
|
+
font-size: var(--sv-text-xs);
|
|
578
|
+
font-weight: 500;
|
|
579
|
+
letter-spacing: 0.08em;
|
|
580
|
+
text-transform: uppercase;
|
|
581
|
+
color: var(--sv-callout-color, var(--sv-accent-ink));
|
|
582
|
+
flex-shrink: 0;
|
|
583
|
+
padding-top: 2px;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/* ---------- TableOfContents ---------- */
|
|
587
|
+
.sv-toc {
|
|
588
|
+
display: flex;
|
|
589
|
+
flex-direction: column;
|
|
590
|
+
gap: var(--sv-space-2);
|
|
591
|
+
border-inline-start: 1px solid var(--sv-border);
|
|
592
|
+
padding-inline-start: var(--sv-space-4);
|
|
593
|
+
}
|
|
594
|
+
.sv-toc__link {
|
|
595
|
+
display: inline-flex;
|
|
596
|
+
align-items: center;
|
|
597
|
+
/* WCAG 2.5.8 (AA): 24×24 CSS px minimum target size. */
|
|
598
|
+
min-height: 24px;
|
|
599
|
+
color: var(--sv-text-3);
|
|
600
|
+
text-decoration: none;
|
|
601
|
+
font-size: var(--sv-text-sm);
|
|
602
|
+
line-height: 1.5;
|
|
603
|
+
transition: color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
604
|
+
}
|
|
605
|
+
.sv-toc__link:hover {
|
|
606
|
+
color: var(--sv-text-2);
|
|
607
|
+
}
|
|
608
|
+
.sv-toc__link--active {
|
|
609
|
+
color: var(--sv-accent-ink);
|
|
610
|
+
}
|
|
611
|
+
.sv-toc__link--depth-3 {
|
|
612
|
+
padding-inline-start: var(--sv-space-4);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/* ---------- ReadingProgress ---------- */
|
|
616
|
+
.sv-reading-progress {
|
|
617
|
+
position: fixed;
|
|
618
|
+
top: 0;
|
|
619
|
+
left: 0;
|
|
620
|
+
right: 0;
|
|
621
|
+
height: 2px;
|
|
622
|
+
z-index: var(--sv-z-toast);
|
|
623
|
+
background: transparent;
|
|
624
|
+
pointer-events: none;
|
|
625
|
+
}
|
|
626
|
+
.sv-reading-progress__bar {
|
|
627
|
+
height: 100%;
|
|
628
|
+
width: 100%;
|
|
629
|
+
background: var(--sv-accent-ink);
|
|
630
|
+
transform-origin: 0 50%;
|
|
631
|
+
transform: scaleX(var(--sv-reading-progress, 0));
|
|
632
|
+
/* progress is linear by spec — no hover easing here */
|
|
633
|
+
transition: transform var(--sv-duration-fast) linear;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/* ---------- ArticleHeader ---------- */
|
|
637
|
+
.sv-article-header {
|
|
638
|
+
display: flex;
|
|
639
|
+
flex-direction: column;
|
|
640
|
+
gap: var(--sv-space-5);
|
|
641
|
+
padding: var(--sv-space-12) 0 var(--sv-space-8);
|
|
642
|
+
border-bottom: 1px solid var(--sv-border);
|
|
643
|
+
}
|
|
644
|
+
.sv-article-header__title {
|
|
645
|
+
font-family: var(--sv-font-display);
|
|
646
|
+
font-size: var(--sv-text-3xl);
|
|
647
|
+
font-weight: 700;
|
|
648
|
+
letter-spacing: -0.02em;
|
|
649
|
+
line-height: 1.15;
|
|
650
|
+
text-wrap: balance;
|
|
651
|
+
color: var(--sv-text);
|
|
652
|
+
margin: 0;
|
|
653
|
+
}
|
|
654
|
+
.sv-article-header__meta {
|
|
655
|
+
display: flex;
|
|
656
|
+
align-items: center;
|
|
657
|
+
gap: var(--sv-space-3);
|
|
658
|
+
color: var(--sv-text-3);
|
|
659
|
+
font-size: var(--sv-text-sm);
|
|
660
|
+
}
|
|
661
|
+
.sv-article-header__author {
|
|
662
|
+
color: var(--sv-text-2);
|
|
663
|
+
font-weight: 600;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/* ---------- Prose ---------- */
|
|
667
|
+
.sv-prose {
|
|
668
|
+
/* Article body is the primary content, not metadata — --sv-text-2 (muted)
|
|
669
|
+
reads as an AI-slop tell here (long-form copy dimmed "for elegance")
|
|
670
|
+
and is the wrong semantic role: --sv-text-2 is for secondary/meta text. */
|
|
671
|
+
color: var(--sv-text);
|
|
672
|
+
font-family: var(--sv-font-body);
|
|
673
|
+
font-size: var(--sv-text-md);
|
|
674
|
+
line-height: 1.7;
|
|
675
|
+
max-width: 68ch;
|
|
676
|
+
}
|
|
677
|
+
.sv-prose h2 {
|
|
678
|
+
font-family: var(--sv-font-display);
|
|
679
|
+
font-size: var(--sv-text-2xl);
|
|
680
|
+
font-weight: 600;
|
|
681
|
+
letter-spacing: -0.02em;
|
|
682
|
+
text-wrap: balance;
|
|
683
|
+
color: var(--sv-text);
|
|
684
|
+
margin: var(--sv-space-10) 0 var(--sv-space-4);
|
|
685
|
+
}
|
|
686
|
+
.sv-prose h3 {
|
|
687
|
+
font-family: var(--sv-font-display);
|
|
688
|
+
font-size: var(--sv-text-xl);
|
|
689
|
+
font-weight: 600;
|
|
690
|
+
letter-spacing: -0.02em;
|
|
691
|
+
text-wrap: balance;
|
|
692
|
+
color: var(--sv-text);
|
|
693
|
+
margin: var(--sv-space-8) 0 var(--sv-space-3);
|
|
694
|
+
}
|
|
695
|
+
.sv-prose p {
|
|
696
|
+
margin: 0 0 var(--sv-space-5);
|
|
697
|
+
}
|
|
698
|
+
.sv-prose .sv-prose__lead {
|
|
699
|
+
font-size: var(--sv-text-lg);
|
|
700
|
+
color: var(--sv-text);
|
|
701
|
+
}
|
|
702
|
+
.sv-prose a {
|
|
703
|
+
color: var(--sv-accent-ink);
|
|
704
|
+
text-decoration: underline;
|
|
705
|
+
text-underline-offset: 3px;
|
|
706
|
+
}
|
|
707
|
+
.sv-prose code {
|
|
708
|
+
font-family: var(--sv-font-mono);
|
|
709
|
+
font-size: 0.9em;
|
|
710
|
+
background: var(--sv-surface-2);
|
|
711
|
+
border: 1px solid var(--sv-border);
|
|
712
|
+
border-radius: var(--sv-radius-sm);
|
|
713
|
+
padding: 1px var(--sv-space-1);
|
|
714
|
+
}
|
|
715
|
+
.sv-prose pre code {
|
|
716
|
+
background: none;
|
|
717
|
+
border: none;
|
|
718
|
+
padding: 0;
|
|
719
|
+
}
|
|
720
|
+
.sv-prose ul,
|
|
721
|
+
.sv-prose ol {
|
|
722
|
+
padding-inline-start: var(--sv-space-5);
|
|
723
|
+
margin: 0 0 var(--sv-space-5);
|
|
724
|
+
}
|
|
725
|
+
.sv-prose li {
|
|
726
|
+
margin-bottom: var(--sv-space-2);
|
|
727
|
+
}
|
|
728
|
+
.sv-prose blockquote {
|
|
729
|
+
border-inline-start: 2px solid var(--sv-accent);
|
|
730
|
+
margin: var(--sv-space-6) 0;
|
|
731
|
+
padding-inline-start: var(--sv-space-5);
|
|
732
|
+
color: var(--sv-text);
|
|
733
|
+
font-style: italic;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
/* ---------- Link ---------- */
|
|
737
|
+
/* Inline text link outside Prose (TextLink): accent ink, underline on hover.
|
|
738
|
+
Touch sizing lives with the other targets (Touch targets section). */
|
|
739
|
+
.sv-link {
|
|
740
|
+
color: var(--sv-accent-ink);
|
|
741
|
+
text-decoration: underline;
|
|
742
|
+
text-decoration-color: color-mix(in srgb, var(--sv-accent-ink) 40%, transparent);
|
|
743
|
+
text-underline-offset: 3px;
|
|
744
|
+
transition: text-decoration-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
745
|
+
}
|
|
746
|
+
.sv-link:hover {
|
|
747
|
+
text-decoration-color: currentColor;
|
|
748
|
+
}
|
|
749
|
+
.sv-link:focus-visible {
|
|
750
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
751
|
+
outline-offset: 2px;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* ---------- Forms ---------- */
|
|
755
|
+
/* Single source of truth for the field frame. Input, Textarea, NativeSelect
|
|
756
|
+
and FileInput all render .sv-field, so border, radius, surface, typography
|
|
757
|
+
and focus ring are defined once and follow [data-theme] with zero consumer
|
|
758
|
+
configuration. */
|
|
759
|
+
.sv-field {
|
|
760
|
+
display: block;
|
|
761
|
+
width: 100%;
|
|
762
|
+
height: var(--sv-space-10);
|
|
763
|
+
padding: var(--sv-space-2) var(--sv-space-3);
|
|
764
|
+
border: 1px solid var(--sv-control-border);
|
|
765
|
+
border-radius: var(--sv-radius-sm);
|
|
766
|
+
background: var(--sv-surface);
|
|
767
|
+
color: var(--sv-text);
|
|
768
|
+
font-family: var(--sv-font-body);
|
|
769
|
+
font-size: var(--sv-text-base);
|
|
770
|
+
line-height: 1.5;
|
|
771
|
+
}
|
|
772
|
+
.sv-field::placeholder {
|
|
773
|
+
color: var(--sv-text-2);
|
|
774
|
+
}
|
|
775
|
+
/* Tailwind's ring-* is box-shadow based and its `accent` color is not declared
|
|
776
|
+
in this package's config, so fields had no visible focus at all. Outline is
|
|
777
|
+
the system's focus state — never box-shadow. */
|
|
778
|
+
.sv-field:focus-visible {
|
|
779
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
780
|
+
outline-offset: 2px;
|
|
781
|
+
}
|
|
782
|
+
.sv-field:disabled {
|
|
783
|
+
cursor: not-allowed;
|
|
784
|
+
opacity: 0.5;
|
|
785
|
+
}
|
|
786
|
+
/* Invalid state reads the native aria-invalid attribute, not a boolean prop
|
|
787
|
+
— Input/Textarea/NativeSelect/FileInput need no change to support it. */
|
|
788
|
+
.sv-field[aria-invalid='true'] {
|
|
789
|
+
border-color: var(--sv-danger-ink);
|
|
790
|
+
}
|
|
791
|
+
.sv-field[aria-invalid='true']:focus-visible {
|
|
792
|
+
outline-color: var(--sv-danger-ink);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.sv-field--textarea {
|
|
796
|
+
height: auto;
|
|
797
|
+
min-height: calc(var(--sv-space-10) * 2);
|
|
798
|
+
resize: vertical;
|
|
799
|
+
}
|
|
800
|
+
/* A multi-select list box has to grow past the single-row field height. */
|
|
801
|
+
.sv-field--select[multiple] {
|
|
802
|
+
height: auto;
|
|
803
|
+
}
|
|
804
|
+
/* Native date/time inputs carry their own intrinsic minimum width (over
|
|
805
|
+
100px in iOS Safari), which ignores `width: 100%` and overflows a grid cell
|
|
806
|
+
or the viewport. `min-width: 0` lets them shrink to the container. On iOS
|
|
807
|
+
(the only engine with -webkit-touch-callout) the native appearance is
|
|
808
|
+
dropped so the value aligns left like every other field. */
|
|
809
|
+
.sv-field:is([type='date'], [type='time'], [type='datetime-local'], [type='month'], [type='week']) {
|
|
810
|
+
min-width: 0;
|
|
811
|
+
max-width: 100%;
|
|
812
|
+
}
|
|
813
|
+
@supports (-webkit-touch-callout: none) {
|
|
814
|
+
.sv-field:is([type='date'], [type='time'], [type='datetime-local'], [type='month'], [type='week']) {
|
|
815
|
+
-webkit-appearance: none;
|
|
816
|
+
appearance: none;
|
|
817
|
+
}
|
|
818
|
+
.sv-field::-webkit-date-and-time-value {
|
|
819
|
+
text-align: start;
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
.sv-field--file {
|
|
823
|
+
height: auto;
|
|
824
|
+
padding: var(--sv-space-1) var(--sv-space-2);
|
|
825
|
+
}
|
|
826
|
+
/* Two rules, not one selector list: an unsupported pseudo-element in a group
|
|
827
|
+
invalidates the whole rule, so the standard and the -webkit- fallback are
|
|
828
|
+
declared separately. */
|
|
829
|
+
.sv-field--file::file-selector-button {
|
|
830
|
+
margin-inline-end: var(--sv-space-3);
|
|
831
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
832
|
+
border: 1px solid var(--sv-border);
|
|
833
|
+
border-radius: var(--sv-radius-sm);
|
|
834
|
+
background: var(--sv-surface-2);
|
|
835
|
+
color: var(--sv-text);
|
|
836
|
+
font: inherit;
|
|
837
|
+
cursor: pointer;
|
|
838
|
+
}
|
|
839
|
+
.sv-field--file::-webkit-file-upload-button {
|
|
840
|
+
margin-inline-end: var(--sv-space-3);
|
|
841
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
842
|
+
border: 1px solid var(--sv-border);
|
|
843
|
+
border-radius: var(--sv-radius-sm);
|
|
844
|
+
background: var(--sv-surface-2);
|
|
845
|
+
color: var(--sv-text);
|
|
846
|
+
font: inherit;
|
|
847
|
+
cursor: pointer;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/* Select trigger: a <button> sharing the .sv-field frame. Buttons centre
|
|
851
|
+
their text by default; a field reads from the start, with the chevron
|
|
852
|
+
pushed to the end and a long value truncated instead of wrapping. */
|
|
853
|
+
.sv-field--trigger {
|
|
854
|
+
display: flex;
|
|
855
|
+
align-items: center;
|
|
856
|
+
justify-content: space-between;
|
|
857
|
+
gap: var(--sv-space-2);
|
|
858
|
+
text-align: start;
|
|
859
|
+
cursor: pointer;
|
|
860
|
+
}
|
|
861
|
+
.sv-field--trigger > span:first-child {
|
|
862
|
+
min-width: 0;
|
|
863
|
+
overflow: hidden;
|
|
864
|
+
text-overflow: ellipsis;
|
|
865
|
+
white-space: nowrap;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/* Field: label + control + description + error, stacked. */
|
|
869
|
+
.sv-form-field {
|
|
870
|
+
display: flex;
|
|
871
|
+
flex-direction: column;
|
|
872
|
+
gap: var(--sv-space-2);
|
|
873
|
+
min-width: 0;
|
|
874
|
+
}
|
|
875
|
+
.sv-form-field > .sv-field-message {
|
|
876
|
+
margin-top: 0;
|
|
877
|
+
}
|
|
878
|
+
.sv-label {
|
|
879
|
+
color: var(--sv-text);
|
|
880
|
+
font-family: var(--sv-font-body);
|
|
881
|
+
font-size: var(--sv-text-sm);
|
|
882
|
+
font-weight: 500;
|
|
883
|
+
line-height: 1.4;
|
|
884
|
+
}
|
|
885
|
+
.sv-label__required {
|
|
886
|
+
margin-inline-start: var(--sv-space-1);
|
|
887
|
+
color: var(--sv-danger-ink);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/* Helper/error text sat under a field, associated via aria-describedby. */
|
|
891
|
+
.sv-field-message {
|
|
892
|
+
display: block;
|
|
893
|
+
margin-top: var(--sv-space-2);
|
|
894
|
+
color: var(--sv-text-2);
|
|
895
|
+
font-family: var(--sv-font-body);
|
|
896
|
+
font-size: var(--sv-text-sm);
|
|
897
|
+
line-height: 1.5;
|
|
898
|
+
}
|
|
899
|
+
.sv-field-message--error {
|
|
900
|
+
color: var(--sv-danger-ink);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/* No appearance:none — the native check/radio chrome follows color-scheme
|
|
904
|
+
from theme.css, and accent-color tints it with the system accent. */
|
|
905
|
+
.sv-check,
|
|
906
|
+
.sv-radio {
|
|
907
|
+
width: var(--sv-space-4);
|
|
908
|
+
height: var(--sv-space-4);
|
|
909
|
+
accent-color: var(--sv-accent-ink);
|
|
910
|
+
margin: 0;
|
|
911
|
+
cursor: pointer;
|
|
912
|
+
}
|
|
913
|
+
.sv-check:focus-visible,
|
|
914
|
+
.sv-radio:focus-visible {
|
|
915
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
916
|
+
outline-offset: 2px;
|
|
917
|
+
}
|
|
918
|
+
.sv-check:disabled,
|
|
919
|
+
.sv-radio:disabled {
|
|
920
|
+
cursor: not-allowed;
|
|
921
|
+
opacity: 0.5;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.sv-choice {
|
|
925
|
+
display: inline-flex;
|
|
926
|
+
align-items: center;
|
|
927
|
+
gap: var(--sv-space-2);
|
|
928
|
+
cursor: pointer;
|
|
929
|
+
color: var(--sv-text);
|
|
930
|
+
}
|
|
931
|
+
.sv-radio-group {
|
|
932
|
+
border: 0;
|
|
933
|
+
margin: 0;
|
|
934
|
+
padding: 0;
|
|
935
|
+
display: flex;
|
|
936
|
+
flex-direction: column;
|
|
937
|
+
gap: var(--sv-space-2);
|
|
938
|
+
}
|
|
939
|
+
.sv-radio-group--horizontal {
|
|
940
|
+
flex-direction: row;
|
|
941
|
+
flex-wrap: wrap;
|
|
942
|
+
gap: var(--sv-space-4);
|
|
943
|
+
}
|
|
944
|
+
.sv-radio-group__legend {
|
|
945
|
+
padding: 0;
|
|
946
|
+
margin-bottom: var(--sv-space-2);
|
|
947
|
+
color: var(--sv-text-2);
|
|
948
|
+
font-size: var(--sv-text-sm);
|
|
949
|
+
}
|
|
950
|
+
/* Visually hidden, still announced. Never display:none or visibility:hidden —
|
|
951
|
+
both remove the element from the accessibility tree. */
|
|
952
|
+
.sv-sr-only {
|
|
953
|
+
position: absolute;
|
|
954
|
+
width: 1px;
|
|
955
|
+
height: 1px;
|
|
956
|
+
padding: 0;
|
|
957
|
+
margin: -1px;
|
|
958
|
+
overflow: hidden;
|
|
959
|
+
clip-path: inset(50%);
|
|
960
|
+
white-space: nowrap;
|
|
961
|
+
border: 0;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/* ---------- Table ---------- */
|
|
965
|
+
/* Presentational only — sorting, paging and selection are a data-table
|
|
966
|
+
concern with a different API surface. The header decoration here is the
|
|
967
|
+
one consumers were repeating by hand on every table screen. */
|
|
968
|
+
.sv-table-container {
|
|
969
|
+
width: 100%;
|
|
970
|
+
overflow-x: auto;
|
|
971
|
+
}
|
|
972
|
+
.sv-table {
|
|
973
|
+
width: 100%;
|
|
974
|
+
border-collapse: collapse;
|
|
975
|
+
caption-side: bottom;
|
|
976
|
+
font-size: var(--sv-text-sm);
|
|
977
|
+
color: var(--sv-text);
|
|
978
|
+
}
|
|
979
|
+
.sv-table__head {
|
|
980
|
+
background: var(--sv-bg);
|
|
981
|
+
}
|
|
982
|
+
.sv-table__th {
|
|
983
|
+
height: var(--sv-space-10);
|
|
984
|
+
padding: 0 var(--sv-space-3);
|
|
985
|
+
text-align: start;
|
|
986
|
+
font-size: var(--sv-text-xs);
|
|
987
|
+
text-transform: uppercase;
|
|
988
|
+
letter-spacing: 0.04em;
|
|
989
|
+
color: var(--sv-text-3);
|
|
990
|
+
font-weight: 600;
|
|
991
|
+
border-bottom: 1px solid var(--sv-border);
|
|
992
|
+
}
|
|
993
|
+
.sv-table__td {
|
|
994
|
+
padding: var(--sv-space-3);
|
|
995
|
+
vertical-align: middle;
|
|
996
|
+
}
|
|
997
|
+
.sv-table__row {
|
|
998
|
+
border-bottom: 1px solid var(--sv-border);
|
|
999
|
+
transition: background var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1000
|
+
}
|
|
1001
|
+
.sv-table__body .sv-table__row:last-child {
|
|
1002
|
+
border-bottom: 0;
|
|
1003
|
+
}
|
|
1004
|
+
.sv-table__row:hover {
|
|
1005
|
+
background: var(--sv-surface-2);
|
|
1006
|
+
}
|
|
1007
|
+
.sv-table__foot {
|
|
1008
|
+
border-top: 1px solid var(--sv-border);
|
|
1009
|
+
background: var(--sv-surface);
|
|
1010
|
+
font-weight: 600;
|
|
1011
|
+
}
|
|
1012
|
+
.sv-table__caption {
|
|
1013
|
+
margin-top: var(--sv-space-4);
|
|
1014
|
+
color: var(--sv-text-2);
|
|
1015
|
+
font-size: var(--sv-text-sm);
|
|
1016
|
+
}
|
|
1017
|
+
/* Stacked mode (<Table stack>): below 40rem each row becomes a block and each
|
|
1018
|
+
cell a label/value pair, the label read from data-label (<TableCell label>).
|
|
1019
|
+
The head is hidden visually but stays in the accessibility tree. At 40rem and
|
|
1020
|
+
up nothing here applies and the table renders exactly as above. */
|
|
1021
|
+
@media (width < 40rem) {
|
|
1022
|
+
.sv-table--stack .sv-table__head {
|
|
1023
|
+
position: absolute;
|
|
1024
|
+
width: 1px;
|
|
1025
|
+
height: 1px;
|
|
1026
|
+
overflow: hidden;
|
|
1027
|
+
clip-path: inset(50%);
|
|
1028
|
+
white-space: nowrap;
|
|
1029
|
+
}
|
|
1030
|
+
.sv-table--stack,
|
|
1031
|
+
.sv-table--stack .sv-table__body,
|
|
1032
|
+
.sv-table--stack .sv-table__foot {
|
|
1033
|
+
display: block;
|
|
1034
|
+
}
|
|
1035
|
+
.sv-table--stack .sv-table__row {
|
|
1036
|
+
display: block;
|
|
1037
|
+
padding: var(--sv-space-2) 0;
|
|
1038
|
+
}
|
|
1039
|
+
/* A labelled cell is a two-column grid: the label (::before) in the first
|
|
1040
|
+
column, every child of the cell in the second, one per row. The label is
|
|
1041
|
+
in flow, so a label that wraps grows the cell instead of overlapping the
|
|
1042
|
+
next one. !important on the geometry only: consumers put padding and
|
|
1043
|
+
text-align utilities on cells for the desktop table, and utilities outrank
|
|
1044
|
+
this package's layer. */
|
|
1045
|
+
.sv-table--stack .sv-table__td {
|
|
1046
|
+
display: block;
|
|
1047
|
+
padding: var(--sv-space-1) var(--sv-space-3) !important;
|
|
1048
|
+
text-align: start !important;
|
|
1049
|
+
overflow-wrap: anywhere;
|
|
1050
|
+
}
|
|
1051
|
+
.sv-table--stack .sv-table__td[data-label] {
|
|
1052
|
+
display: grid;
|
|
1053
|
+
grid-template-columns: minmax(0, 35%) minmax(0, 1fr);
|
|
1054
|
+
column-gap: var(--sv-space-3);
|
|
1055
|
+
align-items: baseline;
|
|
1056
|
+
}
|
|
1057
|
+
.sv-table--stack .sv-table__td[data-label] > * {
|
|
1058
|
+
grid-column: 2;
|
|
1059
|
+
}
|
|
1060
|
+
.sv-table--stack .sv-table__td[data-label]::before {
|
|
1061
|
+
content: attr(data-label);
|
|
1062
|
+
grid-column: 1;
|
|
1063
|
+
grid-row: 1;
|
|
1064
|
+
font-size: var(--sv-text-xs);
|
|
1065
|
+
text-transform: uppercase;
|
|
1066
|
+
letter-spacing: 0.04em;
|
|
1067
|
+
font-weight: 600;
|
|
1068
|
+
color: var(--sv-text-3);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/* ---------- Button ---------- */
|
|
1073
|
+
/* Default variant/size need no modifier class — .sv-btn alone is a complete,
|
|
1074
|
+
Tailwind-independent button, the same pattern .sv-field uses for its
|
|
1075
|
+
default 'input' variant. Modifiers only override what a variant/size
|
|
1076
|
+
changes. */
|
|
1077
|
+
.sv-btn {
|
|
1078
|
+
appearance: none;
|
|
1079
|
+
display: inline-flex;
|
|
1080
|
+
align-items: center;
|
|
1081
|
+
justify-content: center;
|
|
1082
|
+
gap: var(--sv-space-2);
|
|
1083
|
+
height: var(--sv-space-10);
|
|
1084
|
+
padding: 0 var(--sv-space-4);
|
|
1085
|
+
margin: 0;
|
|
1086
|
+
border: 1px solid transparent;
|
|
1087
|
+
border-radius: var(--sv-radius-sm);
|
|
1088
|
+
background: var(--sv-surface);
|
|
1089
|
+
color: var(--sv-text);
|
|
1090
|
+
font: inherit;
|
|
1091
|
+
font-family: var(--sv-font-body);
|
|
1092
|
+
font-weight: 500;
|
|
1093
|
+
white-space: nowrap;
|
|
1094
|
+
cursor: pointer;
|
|
1095
|
+
transition:
|
|
1096
|
+
background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
1097
|
+
color var(--sv-duration-fast) var(--sv-ease-hover),
|
|
1098
|
+
border-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1099
|
+
}
|
|
1100
|
+
.sv-btn:hover {
|
|
1101
|
+
background: var(--sv-surface-2);
|
|
1102
|
+
}
|
|
1103
|
+
.sv-btn:focus-visible {
|
|
1104
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1105
|
+
outline-offset: 2px;
|
|
1106
|
+
}
|
|
1107
|
+
.sv-btn:disabled {
|
|
1108
|
+
cursor: not-allowed;
|
|
1109
|
+
opacity: 0.5;
|
|
1110
|
+
pointer-events: none;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
.sv-btn--destructive {
|
|
1114
|
+
background: var(--sv-danger-ink);
|
|
1115
|
+
color: var(--sv-bg);
|
|
1116
|
+
}
|
|
1117
|
+
.sv-btn--destructive:hover {
|
|
1118
|
+
background: color-mix(in srgb, var(--sv-danger-ink) 90%, var(--sv-text));
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.sv-btn--outline {
|
|
1122
|
+
border-color: var(--sv-border);
|
|
1123
|
+
background: var(--sv-bg);
|
|
1124
|
+
color: var(--sv-text);
|
|
1125
|
+
}
|
|
1126
|
+
.sv-btn--outline:hover {
|
|
1127
|
+
background: var(--sv-surface);
|
|
1128
|
+
color: var(--sv-accent-ink);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.sv-btn--secondary {
|
|
1132
|
+
background: var(--sv-surface-2);
|
|
1133
|
+
color: var(--sv-text);
|
|
1134
|
+
}
|
|
1135
|
+
.sv-btn--secondary:hover {
|
|
1136
|
+
background: var(--sv-surface);
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
.sv-btn--ghost {
|
|
1140
|
+
background: transparent;
|
|
1141
|
+
color: var(--sv-text);
|
|
1142
|
+
}
|
|
1143
|
+
.sv-btn--ghost:hover {
|
|
1144
|
+
background: var(--sv-surface);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.sv-btn--link {
|
|
1148
|
+
background: transparent;
|
|
1149
|
+
color: var(--sv-accent-ink);
|
|
1150
|
+
text-underline-offset: 4px;
|
|
1151
|
+
}
|
|
1152
|
+
.sv-btn--link:hover {
|
|
1153
|
+
text-decoration: underline;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.sv-btn--accent {
|
|
1157
|
+
background: var(--sv-accent-ink);
|
|
1158
|
+
color: var(--sv-bg);
|
|
1159
|
+
}
|
|
1160
|
+
.sv-btn--accent:hover {
|
|
1161
|
+
background: color-mix(in srgb, var(--sv-accent-ink) 90%, var(--sv-text));
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
.sv-btn--sm {
|
|
1165
|
+
height: calc(var(--sv-space-8) + var(--sv-space-1));
|
|
1166
|
+
padding: 0 var(--sv-space-3);
|
|
1167
|
+
font-size: var(--sv-text-sm);
|
|
1168
|
+
}
|
|
1169
|
+
.sv-btn--lg {
|
|
1170
|
+
height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1171
|
+
padding: 0 var(--sv-space-8);
|
|
1172
|
+
}
|
|
1173
|
+
.sv-btn--icon {
|
|
1174
|
+
width: var(--sv-space-10);
|
|
1175
|
+
padding: 0;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/* ---------- Touch targets ---------- */
|
|
1179
|
+
/* Below 64rem (tablet) or on a coarse primary pointer every button and field
|
|
1180
|
+
reaches 44x44px (WCAG 2.5.5). A fine pointer on a wide window keeps the
|
|
1181
|
+
heights above. */
|
|
1182
|
+
@media (width < 64rem), (pointer: coarse) {
|
|
1183
|
+
.sv-btn,
|
|
1184
|
+
.sv-field {
|
|
1185
|
+
min-height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1186
|
+
}
|
|
1187
|
+
.sv-btn {
|
|
1188
|
+
min-width: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1189
|
+
}
|
|
1190
|
+
/* A checkbox stays its drawn size; the label wrapping it is the target, since
|
|
1191
|
+
tapping the label toggles the input. */
|
|
1192
|
+
label:has(> .sv-check),
|
|
1193
|
+
label:has(> .sv-radio),
|
|
1194
|
+
.sv-choice {
|
|
1195
|
+
min-height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1196
|
+
}
|
|
1197
|
+
/* Bare icon controls keep their drawn size; an invisible 44x44px pseudo-element
|
|
1198
|
+
centred on the control extends the hit area without moving the icon. */
|
|
1199
|
+
.sv-dialog__close::after,
|
|
1200
|
+
.sv-toast__close::after,
|
|
1201
|
+
.sv-app-sidebar-trigger::after {
|
|
1202
|
+
content: '';
|
|
1203
|
+
position: absolute;
|
|
1204
|
+
top: 50%;
|
|
1205
|
+
left: 50%;
|
|
1206
|
+
width: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1207
|
+
height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1208
|
+
transform: translate(-50%, -50%);
|
|
1209
|
+
}
|
|
1210
|
+
.sv-toast__close {
|
|
1211
|
+
position: relative;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/* WCAG 2.5.8 (AA) baseline at every width and pointer: every target this
|
|
1216
|
+
package draws is at least 24x24 CSS px, without changing the drawn icon or
|
|
1217
|
+
text. Up to 3.5.1 the logo measured 22px tall and the icon-only close
|
|
1218
|
+
buttons (Dialog, sidebar drawer, Toast) 16-24px. */
|
|
1219
|
+
.sv-logo,
|
|
1220
|
+
.sv-footer__link,
|
|
1221
|
+
.sv-link {
|
|
1222
|
+
min-height: var(--sv-space-6);
|
|
1223
|
+
}
|
|
1224
|
+
.sv-footer__link,
|
|
1225
|
+
.sv-link {
|
|
1226
|
+
display: inline-flex;
|
|
1227
|
+
align-items: center;
|
|
1228
|
+
}
|
|
1229
|
+
.sv-dialog__close,
|
|
1230
|
+
.sv-toast__close {
|
|
1231
|
+
min-width: var(--sv-space-6);
|
|
1232
|
+
min-height: var(--sv-space-6);
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/* Same touch widening as above for the text targets: the logo, footer links
|
|
1236
|
+
and `.sv-link` reach 44px tall below 64rem or on a coarse pointer. */
|
|
1237
|
+
@media (width < 64rem), (pointer: coarse) {
|
|
1238
|
+
.sv-logo,
|
|
1239
|
+
.sv-footer__link,
|
|
1240
|
+
.sv-link {
|
|
1241
|
+
min-height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/* iOS Safari zooms the page when a focused field's font is below 16px, and
|
|
1246
|
+
--sv-text-base is 15px. Same narrow-or-touch scope as the other touch
|
|
1247
|
+
rules: fields render at 16px or more. */
|
|
1248
|
+
@media (width < 64rem), (pointer: coarse) {
|
|
1249
|
+
.sv-field {
|
|
1250
|
+
font-size: max(1rem, var(--sv-text-base));
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
/* ---------- Card ---------- */
|
|
1255
|
+
.sv-card {
|
|
1256
|
+
border: 1px solid var(--sv-border);
|
|
1257
|
+
border-radius: var(--sv-radius-md);
|
|
1258
|
+
background: var(--sv-surface);
|
|
1259
|
+
color: var(--sv-text);
|
|
1260
|
+
}
|
|
1261
|
+
.sv-card__header {
|
|
1262
|
+
display: flex;
|
|
1263
|
+
flex-direction: column;
|
|
1264
|
+
gap: var(--sv-space-2);
|
|
1265
|
+
padding: var(--sv-space-6);
|
|
1266
|
+
}
|
|
1267
|
+
/* DESIGN "Title" step (same as PostCard): Sora 600, 1.375rem, line-height 1.3.
|
|
1268
|
+
Up to 3.5.1 this was Manrope at 1.75rem with line-height 1, so a title that
|
|
1269
|
+
wrapped had its lines touching. */
|
|
1270
|
+
.sv-card__title {
|
|
1271
|
+
margin: 0;
|
|
1272
|
+
font-family: var(--sv-font-display);
|
|
1273
|
+
font-size: var(--sv-text-xl);
|
|
1274
|
+
font-weight: 600;
|
|
1275
|
+
line-height: 1.3;
|
|
1276
|
+
letter-spacing: -0.02em;
|
|
1277
|
+
text-wrap: balance;
|
|
1278
|
+
}
|
|
1279
|
+
.sv-card__description {
|
|
1280
|
+
margin: 0;
|
|
1281
|
+
font-size: var(--sv-text-sm);
|
|
1282
|
+
color: var(--sv-text-2);
|
|
1283
|
+
}
|
|
1284
|
+
.sv-card__content {
|
|
1285
|
+
padding: var(--sv-space-6);
|
|
1286
|
+
padding-top: 0;
|
|
1287
|
+
}
|
|
1288
|
+
.sv-card__footer {
|
|
1289
|
+
display: flex;
|
|
1290
|
+
align-items: center;
|
|
1291
|
+
padding: var(--sv-space-6);
|
|
1292
|
+
padding-top: 0;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/* ---------- Alert ---------- */
|
|
1296
|
+
.sv-alert {
|
|
1297
|
+
position: relative;
|
|
1298
|
+
width: 100%;
|
|
1299
|
+
padding: var(--sv-space-4);
|
|
1300
|
+
border: 1px solid var(--sv-border);
|
|
1301
|
+
border-radius: var(--sv-radius-md);
|
|
1302
|
+
background: var(--sv-surface);
|
|
1303
|
+
color: var(--sv-text);
|
|
1304
|
+
}
|
|
1305
|
+
.sv-alert > svg {
|
|
1306
|
+
position: absolute;
|
|
1307
|
+
top: var(--sv-space-4);
|
|
1308
|
+
left: var(--sv-space-4);
|
|
1309
|
+
color: var(--sv-text);
|
|
1310
|
+
}
|
|
1311
|
+
.sv-alert > svg ~ * {
|
|
1312
|
+
padding-left: calc(var(--sv-space-6) + var(--sv-space-1));
|
|
1313
|
+
}
|
|
1314
|
+
.sv-alert__title {
|
|
1315
|
+
margin: 0 0 var(--sv-space-1);
|
|
1316
|
+
font-weight: 500;
|
|
1317
|
+
line-height: 1.25;
|
|
1318
|
+
letter-spacing: -0.025em;
|
|
1319
|
+
}
|
|
1320
|
+
.sv-alert__description {
|
|
1321
|
+
font-size: var(--sv-text-sm);
|
|
1322
|
+
color: var(--sv-text-2);
|
|
1323
|
+
}
|
|
1324
|
+
.sv-alert__description p {
|
|
1325
|
+
line-height: 1.625;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
/* Semantic variants (T1, R5-09) */
|
|
1329
|
+
.sv-alert--info {
|
|
1330
|
+
--sv-alert-color: var(--sv-info-ink);
|
|
1331
|
+
|
|
1332
|
+
border-color: var(--sv-alert-color);
|
|
1333
|
+
}
|
|
1334
|
+
.sv-alert--info > svg {
|
|
1335
|
+
color: var(--sv-alert-color);
|
|
1336
|
+
}
|
|
1337
|
+
.sv-alert--info .sv-alert__title {
|
|
1338
|
+
color: var(--sv-alert-color);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.sv-alert--success {
|
|
1342
|
+
--sv-alert-color: var(--sv-success-ink);
|
|
1343
|
+
|
|
1344
|
+
border-color: var(--sv-alert-color);
|
|
1345
|
+
}
|
|
1346
|
+
.sv-alert--success > svg {
|
|
1347
|
+
color: var(--sv-alert-color);
|
|
1348
|
+
}
|
|
1349
|
+
.sv-alert--success .sv-alert__title {
|
|
1350
|
+
color: var(--sv-alert-color);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
.sv-alert--warning {
|
|
1354
|
+
--sv-alert-color: var(--sv-warning-ink);
|
|
1355
|
+
|
|
1356
|
+
border-color: var(--sv-alert-color);
|
|
1357
|
+
}
|
|
1358
|
+
.sv-alert--warning > svg {
|
|
1359
|
+
color: var(--sv-alert-color);
|
|
1360
|
+
}
|
|
1361
|
+
.sv-alert--warning .sv-alert__title {
|
|
1362
|
+
color: var(--sv-alert-color);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
.sv-alert--danger {
|
|
1366
|
+
--sv-alert-color: var(--sv-danger-ink);
|
|
1367
|
+
|
|
1368
|
+
border-color: var(--sv-alert-color);
|
|
1369
|
+
}
|
|
1370
|
+
.sv-alert--danger > svg {
|
|
1371
|
+
color: var(--sv-alert-color);
|
|
1372
|
+
}
|
|
1373
|
+
.sv-alert--danger .sv-alert__title {
|
|
1374
|
+
color: var(--sv-alert-color);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/* Action slot (T2, R5-10) */
|
|
1378
|
+
.sv-alert__action {
|
|
1379
|
+
margin-top: var(--sv-space-3);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/* ---------- Badge ---------- */
|
|
1383
|
+
/* Filled variants paint the *ink* step of their hue, never the surface step,
|
|
1384
|
+
under light text (`var(--sv-bg)`). The ink step is what makes a hue safe to
|
|
1385
|
+
pair with text: in dark mode `--sv-accent-ink`/`--sv-danger-ink` resolve to
|
|
1386
|
+
the very same values as `--sv-accent`/`--sv-danger` (so nothing changes
|
|
1387
|
+
there), and in light mode they are the darker per-hue steps that clear
|
|
1388
|
+
WCAG AA (≥4.5:1) against `--sv-bg`. Painting the surface step instead —
|
|
1389
|
+
what this rule did up to 3.5.1 — measured 1.79:1 (badge, cyan) and 2.93:1
|
|
1390
|
+
(destructive) in light mode: near-white text on a light fill. The default
|
|
1391
|
+
variant still follows [data-accent] (One-Accent Rule); `.sv-btn--accent`
|
|
1392
|
+
uses the same ink-fill pairing. Pairs are asserted in tests/contrast.test.ts. */
|
|
1393
|
+
.sv-badge {
|
|
1394
|
+
display: inline-flex;
|
|
1395
|
+
align-items: center;
|
|
1396
|
+
padding: var(--sv-space-1) var(--sv-space-2);
|
|
1397
|
+
border: 1px solid transparent;
|
|
1398
|
+
border-radius: var(--sv-radius-full);
|
|
1399
|
+
background: var(--sv-accent-ink);
|
|
1400
|
+
color: var(--sv-bg);
|
|
1401
|
+
font-size: var(--sv-text-xs);
|
|
1402
|
+
font-weight: 600;
|
|
1403
|
+
transition:
|
|
1404
|
+
background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
1405
|
+
color var(--sv-duration-fast) var(--sv-ease-hover),
|
|
1406
|
+
border-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1407
|
+
}
|
|
1408
|
+
.sv-badge:focus-visible {
|
|
1409
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1410
|
+
outline-offset: 2px;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
.sv-badge--secondary {
|
|
1414
|
+
background: var(--sv-surface-2);
|
|
1415
|
+
color: var(--sv-text);
|
|
1416
|
+
}
|
|
1417
|
+
.sv-badge--secondary:hover {
|
|
1418
|
+
background: var(--sv-surface);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
.sv-badge--destructive {
|
|
1422
|
+
background: var(--sv-danger-ink);
|
|
1423
|
+
color: var(--sv-bg);
|
|
1424
|
+
}
|
|
1425
|
+
.sv-badge--destructive:hover {
|
|
1426
|
+
background: color-mix(in srgb, var(--sv-danger-ink) 90%, var(--sv-text));
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
.sv-badge--outline {
|
|
1430
|
+
background: transparent;
|
|
1431
|
+
border-color: var(--sv-border);
|
|
1432
|
+
color: var(--sv-text);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
/* ---------- Icons ---------- */
|
|
1436
|
+
/* Heroicons render on the 24 grid with no width/height attribute and no size
|
|
1437
|
+
prop, so CSS is the only thing that sizes them. `md` is the default and is
|
|
1438
|
+
carried by the base rule, which is why it has no modifier. Each step is a
|
|
1439
|
+
spacing token so an icon lines up with the control it sits inside. */
|
|
1440
|
+
.sv-icon {
|
|
1441
|
+
width: var(--sv-space-5);
|
|
1442
|
+
height: var(--sv-space-5);
|
|
1443
|
+
color: currentcolor;
|
|
1444
|
+
flex-shrink: 0;
|
|
1445
|
+
}
|
|
1446
|
+
.sv-icon--sm {
|
|
1447
|
+
width: var(--sv-space-4);
|
|
1448
|
+
height: var(--sv-space-4);
|
|
1449
|
+
}
|
|
1450
|
+
.sv-icon--lg {
|
|
1451
|
+
width: var(--sv-space-6);
|
|
1452
|
+
height: var(--sv-space-6);
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
/* ---------- Overlays ---------- */
|
|
1456
|
+
/* Shared fade for every portal surface (overlay, dialog panel, popover panel).
|
|
1457
|
+
Driven by `animation`, not `transition` — Radix's Presence decides whether
|
|
1458
|
+
to keep a closing element mounted long enough to animate out by reading the
|
|
1459
|
+
node's computed `animation-name`, and a `transition` never sets it, so
|
|
1460
|
+
Presence would unmount before a frame renders. The `sv-fade-in`/
|
|
1461
|
+
`sv-fade-out` keyframes themselves live in theme.css, next to
|
|
1462
|
+
`sv-skeleton-shimmer` — this section's own selector-body parser (in the CSS
|
|
1463
|
+
contract tests) is flat and cannot handle a rule with nested braces. */
|
|
1464
|
+
|
|
1465
|
+
/* The shared backdrop behind Dialog and AlertDialog. The class this replaces
|
|
1466
|
+
named `bg-background/80`, a color no config in this package ever declared, so
|
|
1467
|
+
the overlay rendered fully transparent and the page behind a modal stayed at
|
|
1468
|
+
full contrast. Mixing over --sv-bg follows [data-theme] with zero consumer
|
|
1469
|
+
configuration, and the layer comes from the named z scale rather than the
|
|
1470
|
+
literal `z-50` that made a dialog and a tooltip stack by accident. */
|
|
1471
|
+
.sv-overlay {
|
|
1472
|
+
position: fixed;
|
|
1473
|
+
inset: 0;
|
|
1474
|
+
z-index: var(--sv-z-backdrop);
|
|
1475
|
+
background: color-mix(in srgb, var(--sv-bg) 80%, transparent);
|
|
1476
|
+
backdrop-filter: blur(var(--sv-space-1));
|
|
1477
|
+
-webkit-backdrop-filter: blur(var(--sv-space-1));
|
|
1478
|
+
}
|
|
1479
|
+
/* AD-009: fade only -- no zoom, no slide. The selector is always anchored to
|
|
1480
|
+
the system class, because a bare [data-state='open'] would reach into the
|
|
1481
|
+
consumer's own markup. */
|
|
1482
|
+
.sv-overlay[data-state='open'] {
|
|
1483
|
+
animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1484
|
+
}
|
|
1485
|
+
.sv-overlay[data-state='closed'] {
|
|
1486
|
+
animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
/* ---------- Dialog ---------- */
|
|
1490
|
+
/* Centred panel on the modal layer. `shadow-lg` is gone: depth in this system
|
|
1491
|
+
comes from the surface step and the border, never from a shadow. The max
|
|
1492
|
+
width is the old max-w-lg (32rem) expressed on the spacing scale so it stays
|
|
1493
|
+
in step with the rest of the sheet. */
|
|
1494
|
+
.sv-dialog {
|
|
1495
|
+
position: fixed;
|
|
1496
|
+
left: 50%;
|
|
1497
|
+
top: 50%;
|
|
1498
|
+
transform: translate(-50%, -50%);
|
|
1499
|
+
z-index: var(--sv-z-modal);
|
|
1500
|
+
display: grid;
|
|
1501
|
+
gap: var(--sv-space-4);
|
|
1502
|
+
width: 100%;
|
|
1503
|
+
max-width: calc(var(--sv-space-16) * 8);
|
|
1504
|
+
padding: var(--sv-space-6);
|
|
1505
|
+
border: 1px solid var(--sv-border);
|
|
1506
|
+
border-radius: var(--sv-radius-lg);
|
|
1507
|
+
background: var(--sv-surface);
|
|
1508
|
+
color: var(--sv-text);
|
|
1509
|
+
}
|
|
1510
|
+
.sv-dialog[data-state='open'] {
|
|
1511
|
+
animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1512
|
+
}
|
|
1513
|
+
.sv-dialog[data-state='closed'] {
|
|
1514
|
+
animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.sv-dialog__header {
|
|
1518
|
+
display: flex;
|
|
1519
|
+
flex-direction: column;
|
|
1520
|
+
gap: var(--sv-space-1);
|
|
1521
|
+
}
|
|
1522
|
+
.sv-dialog__footer {
|
|
1523
|
+
display: flex;
|
|
1524
|
+
flex-direction: row;
|
|
1525
|
+
justify-content: flex-end;
|
|
1526
|
+
gap: var(--sv-space-2);
|
|
1527
|
+
}
|
|
1528
|
+
.sv-dialog__title {
|
|
1529
|
+
font-family: var(--sv-font-display);
|
|
1530
|
+
font-size: var(--sv-text-lg);
|
|
1531
|
+
font-weight: 600;
|
|
1532
|
+
line-height: 1.2;
|
|
1533
|
+
color: var(--sv-text);
|
|
1534
|
+
}
|
|
1535
|
+
.sv-dialog__description {
|
|
1536
|
+
font-size: var(--sv-text-sm);
|
|
1537
|
+
line-height: 1.5;
|
|
1538
|
+
color: var(--sv-text-2);
|
|
1539
|
+
}
|
|
1540
|
+
/* The close button is a bare control: no border, no fill, and a hit target the
|
|
1541
|
+
icon alone would not give it. Focus is an outline (AD-005) -- the ring-* the
|
|
1542
|
+
shadcn layer used is box-shadow based and named a color that did not exist,
|
|
1543
|
+
so this button had no visible focus at all. */
|
|
1544
|
+
.sv-dialog__close {
|
|
1545
|
+
position: absolute;
|
|
1546
|
+
top: var(--sv-space-4);
|
|
1547
|
+
right: var(--sv-space-4);
|
|
1548
|
+
display: inline-flex;
|
|
1549
|
+
align-items: center;
|
|
1550
|
+
justify-content: center;
|
|
1551
|
+
padding: var(--sv-space-1);
|
|
1552
|
+
border: none;
|
|
1553
|
+
border-radius: var(--sv-radius-sm);
|
|
1554
|
+
background: none;
|
|
1555
|
+
color: var(--sv-text-2);
|
|
1556
|
+
cursor: pointer;
|
|
1557
|
+
transition: color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1558
|
+
}
|
|
1559
|
+
.sv-dialog__close:hover {
|
|
1560
|
+
color: var(--sv-text);
|
|
1561
|
+
}
|
|
1562
|
+
.sv-dialog__close:focus-visible {
|
|
1563
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1564
|
+
outline-offset: 2px;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
/* ---------- Bottom sheet ---------- */
|
|
1568
|
+
/* The mobile counterpart of Dialog: anchored to the bottom edge, full width,
|
|
1569
|
+
rounded only on top. Same surface/border language as .sv-dialog -- no shadow.
|
|
1570
|
+
Height is capped at 90dvh so the overlay stays visible and tappable; the
|
|
1571
|
+
content scrolls inside .sv-sheet__body. The bottom padding adds the device
|
|
1572
|
+
safe area so actions never sit under the home indicator. */
|
|
1573
|
+
.sv-sheet {
|
|
1574
|
+
position: fixed;
|
|
1575
|
+
left: 0;
|
|
1576
|
+
right: 0;
|
|
1577
|
+
bottom: 0;
|
|
1578
|
+
z-index: var(--sv-z-modal);
|
|
1579
|
+
display: flex;
|
|
1580
|
+
flex-direction: column;
|
|
1581
|
+
gap: var(--sv-space-4);
|
|
1582
|
+
max-height: 90dvh;
|
|
1583
|
+
padding: var(--sv-space-2) var(--sv-space-4) calc(var(--sv-space-4) + env(safe-area-inset-bottom, 0px));
|
|
1584
|
+
border: 1px solid var(--sv-border);
|
|
1585
|
+
border-bottom: none;
|
|
1586
|
+
border-radius: var(--sv-radius-xl) var(--sv-radius-xl) 0 0;
|
|
1587
|
+
background: var(--sv-surface);
|
|
1588
|
+
color: var(--sv-text);
|
|
1589
|
+
transform: translateY(var(--sv-sheet-drag, 0px));
|
|
1590
|
+
}
|
|
1591
|
+
.sv-sheet[data-state='open'] {
|
|
1592
|
+
animation: sv-sheet-in var(--sv-duration-base) var(--sv-ease-hover);
|
|
1593
|
+
}
|
|
1594
|
+
.sv-sheet[data-state='closed'] {
|
|
1595
|
+
animation: sv-sheet-out var(--sv-duration-base) var(--sv-ease-hover);
|
|
1596
|
+
}
|
|
1597
|
+
.sv-sheet[data-dragging='true'] {
|
|
1598
|
+
animation: none;
|
|
1599
|
+
user-select: none;
|
|
1600
|
+
}
|
|
1601
|
+
/* The grab area is 24px tall (WCAG 2.5.8 minimum target); the visible bar is the
|
|
1602
|
+
pseudo-element. touch-action: none keeps the page from scrolling mid-drag. */
|
|
1603
|
+
.sv-sheet__handle {
|
|
1604
|
+
display: flex;
|
|
1605
|
+
align-items: center;
|
|
1606
|
+
justify-content: center;
|
|
1607
|
+
align-self: stretch;
|
|
1608
|
+
flex: none;
|
|
1609
|
+
height: var(--sv-space-6);
|
|
1610
|
+
margin-inline: calc(var(--sv-space-4) * -1);
|
|
1611
|
+
}
|
|
1612
|
+
.sv-sheet__handle[data-draggable='true'] {
|
|
1613
|
+
touch-action: none;
|
|
1614
|
+
cursor: grab;
|
|
1615
|
+
}
|
|
1616
|
+
.sv-sheet__handle::before {
|
|
1617
|
+
content: '';
|
|
1618
|
+
width: var(--sv-space-10);
|
|
1619
|
+
height: var(--sv-space-1);
|
|
1620
|
+
border-radius: var(--sv-radius-full);
|
|
1621
|
+
background: var(--sv-control-border);
|
|
1622
|
+
}
|
|
1623
|
+
.sv-sheet__close {
|
|
1624
|
+
position: absolute;
|
|
1625
|
+
top: var(--sv-space-2);
|
|
1626
|
+
right: var(--sv-space-2);
|
|
1627
|
+
}
|
|
1628
|
+
.sv-sheet__header {
|
|
1629
|
+
display: flex;
|
|
1630
|
+
flex-direction: column;
|
|
1631
|
+
gap: var(--sv-space-1);
|
|
1632
|
+
padding-right: var(--sv-space-18);
|
|
1633
|
+
}
|
|
1634
|
+
.sv-sheet__body {
|
|
1635
|
+
flex: 1 1 auto;
|
|
1636
|
+
min-height: 0;
|
|
1637
|
+
overflow-y: auto;
|
|
1638
|
+
overscroll-behavior: contain;
|
|
1639
|
+
}
|
|
1640
|
+
.sv-sheet__footer {
|
|
1641
|
+
display: flex;
|
|
1642
|
+
flex-direction: row;
|
|
1643
|
+
justify-content: flex-end;
|
|
1644
|
+
gap: var(--sv-space-2);
|
|
1645
|
+
}
|
|
1646
|
+
.sv-sheet__title {
|
|
1647
|
+
font-family: var(--sv-font-display);
|
|
1648
|
+
font-size: var(--sv-text-lg);
|
|
1649
|
+
font-weight: 600;
|
|
1650
|
+
line-height: 1.2;
|
|
1651
|
+
color: var(--sv-text);
|
|
1652
|
+
}
|
|
1653
|
+
.sv-sheet__description {
|
|
1654
|
+
font-size: var(--sv-text-sm);
|
|
1655
|
+
line-height: 1.5;
|
|
1656
|
+
color: var(--sv-text-2);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/* ---------- Popovers ---------- */
|
|
1660
|
+
/* One floating surface for the SelectContent, the DropdownMenuContent and the
|
|
1661
|
+
TooltipContent. They were three near-identical utility strings before, which
|
|
1662
|
+
is how SelectContent kept a `shadow-md` that Flat-By-Default forbids while
|
|
1663
|
+
the other two had already lost theirs. min-width is the old 8rem expressed on
|
|
1664
|
+
the spacing scale, so the panel stays in step with the rest of the sheet. */
|
|
1665
|
+
.sv-pop {
|
|
1666
|
+
z-index: var(--sv-z-dropdown);
|
|
1667
|
+
min-width: calc(var(--sv-space-16) * 2);
|
|
1668
|
+
overflow: hidden;
|
|
1669
|
+
padding: var(--sv-space-1);
|
|
1670
|
+
border: 1px solid var(--sv-border);
|
|
1671
|
+
border-radius: var(--sv-radius-md);
|
|
1672
|
+
background: var(--sv-surface);
|
|
1673
|
+
color: var(--sv-text);
|
|
1674
|
+
font-family: var(--sv-font-body);
|
|
1675
|
+
font-size: var(--sv-text-base);
|
|
1676
|
+
}
|
|
1677
|
+
.sv-pop[data-state='open'] {
|
|
1678
|
+
animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1679
|
+
}
|
|
1680
|
+
.sv-pop[data-state='closed'] {
|
|
1681
|
+
animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
/* The scrollable window inside a Select. The cap is the old max-h-96 (24rem)
|
|
1685
|
+
on the spacing scale; without it a long option list runs off the viewport. */
|
|
1686
|
+
.sv-pop__viewport {
|
|
1687
|
+
max-height: calc(var(--sv-space-16) * 6);
|
|
1688
|
+
overflow-y: auto;
|
|
1689
|
+
}
|
|
1690
|
+
/* Select's scroll-up / scroll-down affordances. */
|
|
1691
|
+
.sv-pop__scroll {
|
|
1692
|
+
display: flex;
|
|
1693
|
+
align-items: center;
|
|
1694
|
+
justify-content: center;
|
|
1695
|
+
height: var(--sv-space-5);
|
|
1696
|
+
color: var(--sv-text-2);
|
|
1697
|
+
cursor: default;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
/* In "popper" mode Radix anchors SelectContent to the trigger and writes
|
|
1701
|
+
data-side once it resolves which side it flipped to; --sv-space-1 (4px) is
|
|
1702
|
+
the same nudge the old build wrote as Tailwind's `translate-y-1`, now a
|
|
1703
|
+
real declaration instead of four arbitrary-variant utilities. */
|
|
1704
|
+
.sv-pop--popper[data-side='bottom'] {
|
|
1705
|
+
transform: translateY(var(--sv-space-1));
|
|
1706
|
+
}
|
|
1707
|
+
.sv-pop--popper[data-side='top'] {
|
|
1708
|
+
transform: translateY(calc(var(--sv-space-1) * -1));
|
|
1709
|
+
}
|
|
1710
|
+
.sv-pop--popper[data-side='right'] {
|
|
1711
|
+
transform: translateX(var(--sv-space-1));
|
|
1712
|
+
}
|
|
1713
|
+
.sv-pop--popper[data-side='left'] {
|
|
1714
|
+
transform: translateX(calc(var(--sv-space-1) * -1));
|
|
1715
|
+
}
|
|
1716
|
+
/* Matches the panel to the trigger's own footprint so it never renders
|
|
1717
|
+
narrower or wider than the control that opened it. The custom properties
|
|
1718
|
+
are Radix's own — set on the DOM node regardless of build tooling — not a
|
|
1719
|
+
Tailwind arbitrary value, so this needs no bracket syntax to read them. */
|
|
1720
|
+
.sv-pop__viewport--popper {
|
|
1721
|
+
width: 100%;
|
|
1722
|
+
min-width: var(--radix-select-trigger-width);
|
|
1723
|
+
height: var(--radix-select-trigger-height);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
/* Combobox: the list is in flow-positioned under the input (no portal), so it
|
|
1727
|
+
scrolls with its field; it reuses .sv-pop's surface and .sv-menu-item's rows. */
|
|
1728
|
+
.sv-combobox {
|
|
1729
|
+
position: relative;
|
|
1730
|
+
}
|
|
1731
|
+
.sv-combobox__list {
|
|
1732
|
+
position: absolute;
|
|
1733
|
+
inset-inline: 0;
|
|
1734
|
+
top: 100%;
|
|
1735
|
+
margin: var(--sv-space-1) 0 0;
|
|
1736
|
+
max-height: calc(var(--sv-space-16) * 4);
|
|
1737
|
+
overflow-y: auto;
|
|
1738
|
+
list-style: none;
|
|
1739
|
+
}
|
|
1740
|
+
.sv-combobox__list[hidden] {
|
|
1741
|
+
display: none;
|
|
1742
|
+
}
|
|
1743
|
+
.sv-combobox__option {
|
|
1744
|
+
flex-direction: column;
|
|
1745
|
+
align-items: flex-start;
|
|
1746
|
+
gap: 0;
|
|
1747
|
+
}
|
|
1748
|
+
.sv-combobox__description {
|
|
1749
|
+
color: var(--sv-text-2);
|
|
1750
|
+
font-size: var(--sv-text-sm);
|
|
1751
|
+
}
|
|
1752
|
+
.sv-combobox__status {
|
|
1753
|
+
margin-top: var(--sv-space-1);
|
|
1754
|
+
color: var(--sv-text-3);
|
|
1755
|
+
font-size: var(--sv-text-sm);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
/* ---------- Tooltip ---------- */
|
|
1759
|
+
/* Declares only what differs from .sv-pop: a tooltip floats above every other
|
|
1760
|
+
layer, holds one line of text rather than a list, and needs no min-width. */
|
|
1761
|
+
.sv-tooltip {
|
|
1762
|
+
z-index: var(--sv-z-tooltip);
|
|
1763
|
+
min-width: 0;
|
|
1764
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
1765
|
+
font-size: var(--sv-text-sm);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/* ---------- Menu items ---------- */
|
|
1769
|
+
/* The shared list row for Select and DropdownMenu, plus the labels, separators
|
|
1770
|
+
and shortcuts that sit beside it. The indicator gets a real slot in the flex
|
|
1771
|
+
row instead of the `pl-8` these items used to carry: that padding reserved
|
|
1772
|
+
room for an indicator neither component ever rendered, so every option sat
|
|
1773
|
+
indented against nothing. */
|
|
1774
|
+
.sv-menu-item {
|
|
1775
|
+
position: relative;
|
|
1776
|
+
display: flex;
|
|
1777
|
+
align-items: center;
|
|
1778
|
+
gap: var(--sv-space-2);
|
|
1779
|
+
width: 100%;
|
|
1780
|
+
padding: var(--sv-space-1) var(--sv-space-2);
|
|
1781
|
+
border-radius: var(--sv-radius-sm);
|
|
1782
|
+
color: var(--sv-text);
|
|
1783
|
+
font-family: var(--sv-font-body);
|
|
1784
|
+
font-size: var(--sv-text-base);
|
|
1785
|
+
line-height: 1.5;
|
|
1786
|
+
text-align: start;
|
|
1787
|
+
cursor: pointer;
|
|
1788
|
+
user-select: none;
|
|
1789
|
+
transition: background var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1790
|
+
}
|
|
1791
|
+
/* Radix moves [data-highlighted] with the keyboard as well as the pointer, so
|
|
1792
|
+
hover and roving focus have to look identical or the two input modes drift. */
|
|
1793
|
+
.sv-menu-item:hover,
|
|
1794
|
+
.sv-menu-item[data-highlighted] {
|
|
1795
|
+
background: var(--sv-surface-2);
|
|
1796
|
+
color: var(--sv-text);
|
|
1797
|
+
}
|
|
1798
|
+
.sv-menu-item:focus-visible {
|
|
1799
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1800
|
+
outline-offset: 2px;
|
|
1801
|
+
}
|
|
1802
|
+
.sv-menu-item[data-disabled] {
|
|
1803
|
+
pointer-events: none;
|
|
1804
|
+
opacity: 0.5;
|
|
1805
|
+
}
|
|
1806
|
+
/* An inset row lines up with the rows that do carry an indicator. */
|
|
1807
|
+
.sv-menu-item--inset {
|
|
1808
|
+
padding-left: var(--sv-space-8);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.sv-menu-item__indicator {
|
|
1812
|
+
display: inline-flex;
|
|
1813
|
+
align-items: center;
|
|
1814
|
+
justify-content: center;
|
|
1815
|
+
flex-shrink: 0;
|
|
1816
|
+
width: var(--sv-space-4);
|
|
1817
|
+
height: var(--sv-space-4);
|
|
1818
|
+
}
|
|
1819
|
+
/* An indicator that renders nothing must take no room. A reserved-but-empty
|
|
1820
|
+
slot is exactly the defect this section replaces, and `icon={null}` has to
|
|
1821
|
+
collapse it rather than reintroduce it under a new name. */
|
|
1822
|
+
.sv-menu-item__indicator:empty {
|
|
1823
|
+
display: none;
|
|
1824
|
+
}
|
|
1825
|
+
/* The radio mark is a circle in CSS: the curated heroicons set has no dot on
|
|
1826
|
+
the 24 grid, and currentColor keeps it in step with the row's text. */
|
|
1827
|
+
.sv-menu-item__dot {
|
|
1828
|
+
width: var(--sv-space-2);
|
|
1829
|
+
height: var(--sv-space-2);
|
|
1830
|
+
border-radius: var(--sv-radius-full);
|
|
1831
|
+
background: currentcolor;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
.sv-menu-label {
|
|
1835
|
+
padding: var(--sv-space-1) var(--sv-space-2);
|
|
1836
|
+
color: var(--sv-text-2);
|
|
1837
|
+
font-size: var(--sv-text-sm);
|
|
1838
|
+
font-weight: 600;
|
|
1839
|
+
}
|
|
1840
|
+
/* A border rather than a filled box: the hairline is a length the spacing scale
|
|
1841
|
+
does not carry, and border-width is where a literal 1px belongs. */
|
|
1842
|
+
.sv-menu-separator {
|
|
1843
|
+
height: 0;
|
|
1844
|
+
margin: var(--sv-space-1) 0;
|
|
1845
|
+
border: none;
|
|
1846
|
+
border-top: 1px solid var(--sv-border);
|
|
1847
|
+
}
|
|
1848
|
+
.sv-menu-shortcut {
|
|
1849
|
+
margin-inline-start: auto;
|
|
1850
|
+
color: var(--sv-text-3);
|
|
1851
|
+
font-family: var(--sv-font-mono);
|
|
1852
|
+
font-size: var(--sv-text-xs);
|
|
1853
|
+
letter-spacing: 0.05em;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
/* ---------- Tabs ---------- */
|
|
1857
|
+
/* The list is a raised strip and the active trigger sits on the base surface,
|
|
1858
|
+
one tonal step above it. That step is the whole affordance: the shadcn
|
|
1859
|
+
original stacked a `shadow-sm` on top, which Flat-By-Default forbids and
|
|
1860
|
+
which this system reads as depth the border already carries. */
|
|
1861
|
+
.sv-tabs {
|
|
1862
|
+
display: flex;
|
|
1863
|
+
flex-direction: column;
|
|
1864
|
+
/* align-items defaults to stretch, which would force .sv-tabs__list — an
|
|
1865
|
+
inline-flex element — to the container's full width, contradicting its
|
|
1866
|
+
own display. flex-start keeps the list sized to its content. */
|
|
1867
|
+
align-items: flex-start;
|
|
1868
|
+
}
|
|
1869
|
+
.sv-tabs__list {
|
|
1870
|
+
display: inline-flex;
|
|
1871
|
+
align-items: center;
|
|
1872
|
+
justify-content: center;
|
|
1873
|
+
gap: var(--sv-space-1);
|
|
1874
|
+
height: var(--sv-space-10);
|
|
1875
|
+
padding: var(--sv-space-1);
|
|
1876
|
+
border-radius: var(--sv-radius-md);
|
|
1877
|
+
background: var(--sv-surface-2);
|
|
1878
|
+
color: var(--sv-text-2);
|
|
1879
|
+
}
|
|
1880
|
+
.sv-tabs__trigger {
|
|
1881
|
+
display: inline-flex;
|
|
1882
|
+
align-items: center;
|
|
1883
|
+
justify-content: center;
|
|
1884
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
1885
|
+
border: none;
|
|
1886
|
+
border-radius: var(--sv-radius-sm);
|
|
1887
|
+
background: none;
|
|
1888
|
+
color: inherit;
|
|
1889
|
+
font-family: var(--sv-font-body);
|
|
1890
|
+
font-size: var(--sv-text-base);
|
|
1891
|
+
font-weight: 500;
|
|
1892
|
+
white-space: nowrap;
|
|
1893
|
+
cursor: pointer;
|
|
1894
|
+
transition:
|
|
1895
|
+
background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
1896
|
+
color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1897
|
+
}
|
|
1898
|
+
/* AD-005: the ring-* utilities this replaces are box-shadow based and named a
|
|
1899
|
+
ring color the package never declared, so a keyboard user tabbing through
|
|
1900
|
+
the strip saw nothing at all. */
|
|
1901
|
+
.sv-tabs__trigger:focus-visible {
|
|
1902
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1903
|
+
outline-offset: 2px;
|
|
1904
|
+
}
|
|
1905
|
+
.sv-tabs__trigger:disabled {
|
|
1906
|
+
pointer-events: none;
|
|
1907
|
+
opacity: 0.5;
|
|
1908
|
+
}
|
|
1909
|
+
.sv-tabs__trigger[data-state='active'] {
|
|
1910
|
+
background: var(--sv-surface);
|
|
1911
|
+
color: var(--sv-text);
|
|
1912
|
+
}
|
|
1913
|
+
.sv-tabs__content {
|
|
1914
|
+
margin-top: var(--sv-space-2);
|
|
1915
|
+
/* The root aligns flex-start so the list keeps its content width; the panel
|
|
1916
|
+
must still fill the container, or a form inside it shrinks to min-content. */
|
|
1917
|
+
align-self: stretch;
|
|
1918
|
+
}
|
|
1919
|
+
.sv-tabs__content:focus-visible {
|
|
1920
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
1921
|
+
outline-offset: 2px;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
/* ---------- Tabs touch ---------- */
|
|
1925
|
+
/* Triggers reach 44px and a strip wider than the viewport scrolls inside
|
|
1926
|
+
itself instead of widening the page. Declared after the base rules above so
|
|
1927
|
+
the list's height override wins at equal specificity. */
|
|
1928
|
+
@media (width < 64rem), (pointer: coarse) {
|
|
1929
|
+
.sv-tabs__list {
|
|
1930
|
+
height: auto;
|
|
1931
|
+
max-width: 100%;
|
|
1932
|
+
overflow-x: auto;
|
|
1933
|
+
/* Centered content that overflows spills to the left, where it cannot be
|
|
1934
|
+
scrolled to; start-aligned keeps the first trigger reachable. */
|
|
1935
|
+
justify-content: flex-start;
|
|
1936
|
+
}
|
|
1937
|
+
.sv-tabs__trigger {
|
|
1938
|
+
min-height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1939
|
+
min-width: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/* ---------- Separator ---------- */
|
|
1944
|
+
/* A hairline in the flat sense (Elevation section, DESIGN.md): a 1px slab of
|
|
1945
|
+
the same border color the rest of the system uses, never a shadow. Sizing
|
|
1946
|
+
is opposite on each axis by design — horizontal fills the inline
|
|
1947
|
+
direction and is a fixed 1px tall; vertical fills the block direction
|
|
1948
|
+
(the parent must give it a height) and is a fixed 1px wide. */
|
|
1949
|
+
.sv-separator {
|
|
1950
|
+
flex-shrink: 0;
|
|
1951
|
+
background: var(--sv-border);
|
|
1952
|
+
height: 1px;
|
|
1953
|
+
width: 100%;
|
|
1954
|
+
}
|
|
1955
|
+
.sv-separator--vertical {
|
|
1956
|
+
height: 100%;
|
|
1957
|
+
width: 1px;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
/* ---------- Progress ---------- */
|
|
1961
|
+
/* A track and a fill, same tonal pair the rest of the system uses for a
|
|
1962
|
+
surface-on-surface relationship: Surface 2 (one step up from Void) under
|
|
1963
|
+
the accent fill, never a shadow to suggest depth. The indicator's width is
|
|
1964
|
+
the one value in this component that cannot come from a token — it is
|
|
1965
|
+
`value`/`max` at render time — so it is the sole inline `style` in the
|
|
1966
|
+
server-safe catalog. */
|
|
1967
|
+
.sv-progress {
|
|
1968
|
+
position: relative;
|
|
1969
|
+
overflow: hidden;
|
|
1970
|
+
width: 100%;
|
|
1971
|
+
height: var(--sv-space-2);
|
|
1972
|
+
border-radius: var(--sv-radius-full);
|
|
1973
|
+
background: var(--sv-surface-2);
|
|
1974
|
+
}
|
|
1975
|
+
.sv-progress__indicator {
|
|
1976
|
+
height: 100%;
|
|
1977
|
+
background: var(--sv-accent);
|
|
1978
|
+
border-radius: var(--sv-radius-full);
|
|
1979
|
+
transition: width var(--sv-duration-fast) var(--sv-ease-hover);
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
/* ---------- Pagination ---------- */
|
|
1983
|
+
/* A row of pill-shaped controls, same border/radius/surface vocabulary as
|
|
1984
|
+
the rest of the catalog — no shadow, one active state (Accent), one hover
|
|
1985
|
+
state (Surface 2). PaginationLink is deliberately NOT built on `.sv-btn`:
|
|
1986
|
+
it needs the active/current styling `.sv-btn` has no variant for, and
|
|
1987
|
+
reusing it would drag button-specific states (disabled opacity, size
|
|
1988
|
+
scale) into a control this system's own doc doesn't ask for. */
|
|
1989
|
+
.sv-pagination {
|
|
1990
|
+
display: flex;
|
|
1991
|
+
width: 100%;
|
|
1992
|
+
justify-content: center;
|
|
1993
|
+
}
|
|
1994
|
+
.sv-pagination__content {
|
|
1995
|
+
display: flex;
|
|
1996
|
+
flex-direction: row;
|
|
1997
|
+
align-items: center;
|
|
1998
|
+
gap: var(--sv-space-1);
|
|
1999
|
+
list-style: none;
|
|
2000
|
+
margin: 0;
|
|
2001
|
+
padding: 0;
|
|
2002
|
+
}
|
|
2003
|
+
.sv-pagination__item {
|
|
2004
|
+
display: flex;
|
|
2005
|
+
}
|
|
2006
|
+
.sv-pagination__link {
|
|
2007
|
+
display: inline-flex;
|
|
2008
|
+
align-items: center;
|
|
2009
|
+
justify-content: center;
|
|
2010
|
+
gap: var(--sv-space-1);
|
|
2011
|
+
min-width: var(--sv-space-10);
|
|
2012
|
+
height: var(--sv-space-10);
|
|
2013
|
+
padding: 0 var(--sv-space-3);
|
|
2014
|
+
border: 1px solid transparent;
|
|
2015
|
+
border-radius: var(--sv-radius-sm);
|
|
2016
|
+
background: transparent;
|
|
2017
|
+
color: var(--sv-text-2);
|
|
2018
|
+
font-family: var(--sv-font-body);
|
|
2019
|
+
font-size: var(--sv-text-base);
|
|
2020
|
+
text-decoration: none;
|
|
2021
|
+
cursor: pointer;
|
|
2022
|
+
transition:
|
|
2023
|
+
background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
2024
|
+
color var(--sv-duration-fast) var(--sv-ease-hover),
|
|
2025
|
+
border-color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2026
|
+
}
|
|
2027
|
+
.sv-pagination__link:hover {
|
|
2028
|
+
background: var(--sv-surface-2);
|
|
2029
|
+
color: var(--sv-text);
|
|
2030
|
+
}
|
|
2031
|
+
.sv-pagination__link:focus-visible {
|
|
2032
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
2033
|
+
outline-offset: 2px;
|
|
2034
|
+
}
|
|
2035
|
+
.sv-pagination__link--active {
|
|
2036
|
+
border-color: var(--sv-border);
|
|
2037
|
+
background: var(--sv-surface);
|
|
2038
|
+
color: var(--sv-text);
|
|
2039
|
+
}
|
|
2040
|
+
.sv-pagination__link--previous,
|
|
2041
|
+
.sv-pagination__link--next {
|
|
2042
|
+
padding: 0 var(--sv-space-4);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.sv-pagination__ellipsis {
|
|
2046
|
+
display: inline-flex;
|
|
2047
|
+
align-items: center;
|
|
2048
|
+
justify-content: center;
|
|
2049
|
+
min-width: var(--sv-space-10);
|
|
2050
|
+
height: var(--sv-space-10);
|
|
2051
|
+
color: var(--sv-text-3);
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
/* ---------- Pagination touch ---------- */
|
|
2055
|
+
/* Page links and "load more" reach 44x44px on narrow or touch viewports. */
|
|
2056
|
+
@media (width < 64rem), (pointer: coarse) {
|
|
2057
|
+
.sv-pagination__link {
|
|
2058
|
+
min-height: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
2059
|
+
min-width: calc(var(--sv-space-10) + var(--sv-space-1));
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/* ---------- Chart ---------- */
|
|
2064
|
+
/* Visual geometry only — no scale engine, see design.md. `overflow: visible`
|
|
2065
|
+
is the one non-default here: an axis label sitting exactly at the SVG's
|
|
2066
|
+
own edge (a common case — the last tick on a bottom axis) must not be
|
|
2067
|
+
clipped by the viewBox the way an ordinary <svg> would clip it. Series
|
|
2068
|
+
color (line stroke, bar fill) is a caller prop, not a class, because the
|
|
2069
|
+
three series tokens (--sv-accent-ink/--sv-info-ink/--sv-warning-ink) are
|
|
2070
|
+
assigned per-series by the consumer, not fixed by the primitive. */
|
|
2071
|
+
.sv-chart {
|
|
2072
|
+
overflow: visible;
|
|
2073
|
+
font-family: var(--sv-font-mono);
|
|
2074
|
+
}
|
|
2075
|
+
.sv-chart__grid-line {
|
|
2076
|
+
stroke: var(--sv-border);
|
|
2077
|
+
stroke-width: 1;
|
|
2078
|
+
}
|
|
2079
|
+
.sv-chart__axis {
|
|
2080
|
+
stroke: var(--sv-text-2);
|
|
2081
|
+
stroke-width: 1;
|
|
2082
|
+
}
|
|
2083
|
+
.sv-chart__axis-label {
|
|
2084
|
+
fill: var(--sv-text-2);
|
|
2085
|
+
font-size: var(--sv-text-xs);
|
|
2086
|
+
}
|
|
2087
|
+
.sv-chart__line {
|
|
2088
|
+
stroke-linecap: round;
|
|
2089
|
+
stroke-linejoin: round;
|
|
2090
|
+
}
|
|
2091
|
+
.sv-chart__bar {
|
|
2092
|
+
shape-rendering: crispEdges;
|
|
2093
|
+
}
|
|
2094
|
+
/* Point markers (ChartLine markers): filled with the series color, ringed in
|
|
2095
|
+
the page background so overlapping series stay distinguishable. */
|
|
2096
|
+
.sv-chart__marker {
|
|
2097
|
+
stroke: var(--sv-bg);
|
|
2098
|
+
stroke-width: 2;
|
|
2099
|
+
}
|
|
2100
|
+
/* Legend: an HTML list next to the SVG (not inside it), so it wraps, reads as
|
|
2101
|
+
a list to assistive tech and uses the body font. */
|
|
2102
|
+
.sv-chart-legend {
|
|
2103
|
+
display: flex;
|
|
2104
|
+
flex-wrap: wrap;
|
|
2105
|
+
gap: var(--sv-space-2) var(--sv-space-4);
|
|
2106
|
+
margin: var(--sv-space-3) 0 0;
|
|
2107
|
+
padding: 0;
|
|
2108
|
+
list-style: none;
|
|
2109
|
+
color: var(--sv-text-2);
|
|
2110
|
+
font-family: var(--sv-font-body);
|
|
2111
|
+
font-size: var(--sv-text-xs);
|
|
2112
|
+
}
|
|
2113
|
+
.sv-chart-legend__item {
|
|
2114
|
+
display: inline-flex;
|
|
2115
|
+
align-items: center;
|
|
2116
|
+
gap: var(--sv-space-2);
|
|
2117
|
+
}
|
|
2118
|
+
.sv-chart-legend__swatch {
|
|
2119
|
+
flex-shrink: 0;
|
|
2120
|
+
width: var(--sv-space-4);
|
|
2121
|
+
height: 0;
|
|
2122
|
+
border-top: 2px solid var(--sv-series-color, var(--sv-text-2));
|
|
2123
|
+
}
|
|
2124
|
+
.sv-chart-legend__swatch--dashed {
|
|
2125
|
+
border-top-style: dashed;
|
|
2126
|
+
}
|
|
2127
|
+
.sv-chart-legend__swatch--bar {
|
|
2128
|
+
height: var(--sv-space-2);
|
|
2129
|
+
border-top: none;
|
|
2130
|
+
background: var(--sv-series-color, var(--sv-text-2));
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/* ---------- App Sidebar ---------- */
|
|
2134
|
+
/* R5-02, R5-03, R5-04: Sidebar de aplicação responsiva.
|
|
2135
|
+
The wrapper (.sv-app-shell) carries data-state (open/closed), data-collapsible
|
|
2136
|
+
(offcanvas/icon/none), and data-mobile (true/false). The panel (.sv-app-sidebar)
|
|
2137
|
+
is static in-flow above the breakpoint, drawer in portal below. No box-shadow
|
|
2138
|
+
per Flat-By-Default Rule. Focus is outline (AD-005). Fade animation is driven
|
|
2139
|
+
by data-state with var(--sv-duration-fast) and var(--sv-ease-hover).
|
|
2140
|
+
|
|
2141
|
+
.sv-app-shell is the flex container that lays SidebarPanel (the <aside>)
|
|
2142
|
+
and SidebarInset (the <main>) side by side above the breakpoint — both are
|
|
2143
|
+
rendered as direct children of it (SidebarProvider wraps `children` in this
|
|
2144
|
+
one div). Below the breakpoint SidebarPanel renders into a portal instead
|
|
2145
|
+
(it's not a flex child at all in that mode), so the inset alone fills the
|
|
2146
|
+
row — AC R5-04.3 ("full width below the breakpoint") falls out of the flex
|
|
2147
|
+
layout for free, no separate rule needed. */
|
|
2148
|
+
.sv-app-shell {
|
|
2149
|
+
display: flex;
|
|
2150
|
+
align-items: stretch;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
.sv-app-sidebar {
|
|
2154
|
+
flex-shrink: 0;
|
|
2155
|
+
background: var(--sv-surface);
|
|
2156
|
+
color: var(--sv-text);
|
|
2157
|
+
border-right: 1px solid var(--sv-border);
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/* CSS-first first paint (SSR). Before hydration SidebarProvider omits
|
|
2161
|
+
`data-mobile` and SidebarPanel renders the in-flow <aside>, so desktop
|
|
2162
|
+
paints with the sidebar already in place (no layout shift). Below the
|
|
2163
|
+
default breakpoint (1024px, SidebarProvider's default) this hides that
|
|
2164
|
+
<aside> until JS mounts the drawer instead. A custom `breakpoint` prop gets
|
|
2165
|
+
the equivalent rule from the provider itself (scoped by `data-breakpoint`).
|
|
2166
|
+
`collapsible="none"` stays in flow at every width, as after hydration. */
|
|
2167
|
+
@media (width < 1024px) {
|
|
2168
|
+
.sv-app-shell:not([data-mobile]):not([data-breakpoint]):not([data-collapsible='none'])
|
|
2169
|
+
.sv-app-sidebar {
|
|
2170
|
+
display: none;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
.sv-app-sidebar__drawer {
|
|
2175
|
+
position: fixed;
|
|
2176
|
+
inset: 0;
|
|
2177
|
+
z-index: var(--sv-z-modal);
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
/* Dialog.Content animates via data-state=[open|closed] */
|
|
2181
|
+
.sv-app-sidebar[data-state='open'] {
|
|
2182
|
+
animation: sv-fade-in var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
.sv-app-sidebar[data-state='closed'] {
|
|
2186
|
+
animation: sv-fade-out var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
.sv-app-sidebar__body {
|
|
2190
|
+
display: flex;
|
|
2191
|
+
flex-direction: column;
|
|
2192
|
+
gap: var(--sv-space-6);
|
|
2193
|
+
padding: var(--sv-space-6);
|
|
2194
|
+
max-height: 100vh;
|
|
2195
|
+
overflow-y: auto;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
/* `sv-app-sidebar__label` carries no typography of its own — it's a bare
|
|
2199
|
+
hook for the collapsed-state hiding rule below, and content it wraps is
|
|
2200
|
+
always something else's text (a nav link, a heading) that already owns
|
|
2201
|
+
its own font. A Sora/text-lg/600 default shipped here in v3.3.0 fought
|
|
2202
|
+
whatever it wrapped and broke the Sparse-Display Rule (DESIGN.md §3:
|
|
2203
|
+
Sora never sets label text) the moment a consumer used it on ordinary
|
|
2204
|
+
nav-item copy, as the App Sidebar story did. */
|
|
2205
|
+
|
|
2206
|
+
.sv-app-sidebar-inset {
|
|
2207
|
+
flex: 1;
|
|
2208
|
+
/* Without this a flex item's default `min-width: auto` lets its content
|
|
2209
|
+
(e.g. a wide table) push it wider than the row, shrinking the sidebar
|
|
2210
|
+
instead of scrolling internally. */
|
|
2211
|
+
min-width: 0;
|
|
2212
|
+
overflow: auto;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
.sv-app-sidebar-trigger {
|
|
2216
|
+
position: relative;
|
|
2217
|
+
display: inline-flex;
|
|
2218
|
+
align-items: center;
|
|
2219
|
+
justify-content: center;
|
|
2220
|
+
padding: var(--sv-space-2);
|
|
2221
|
+
border: 1px solid transparent;
|
|
2222
|
+
border-radius: var(--sv-radius-sm);
|
|
2223
|
+
background: none;
|
|
2224
|
+
color: var(--sv-text-2);
|
|
2225
|
+
cursor: pointer;
|
|
2226
|
+
transition: background var(--sv-duration-fast) var(--sv-ease-hover),
|
|
2227
|
+
color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.sv-app-sidebar-trigger:hover {
|
|
2231
|
+
background: var(--sv-surface-2);
|
|
2232
|
+
color: var(--sv-text);
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
.sv-app-sidebar-trigger:focus-visible {
|
|
2236
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
2237
|
+
outline-offset: 2px;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
/* R5-03: collapsible="icon" mode — `open` toggles rail width vs. full width,
|
|
2241
|
+
the same way `offcanvas` toggles visible vs. hidden. Both rules below key
|
|
2242
|
+
off data-state="closed" *together with* data-collapsible="icon" — without
|
|
2243
|
+
that, a collapsed-width rail would also apply while `open` (the expanded,
|
|
2244
|
+
labels-visible state), which is the opposite of what "collapsible" means
|
|
2245
|
+
here. .sv-app-shell carries data-state from SidebarProvider's own `open`. */
|
|
2246
|
+
.sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar:not(.sv-app-sidebar__drawer) {
|
|
2247
|
+
width: var(--sv-space-14);
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
/* Hide text labels only in the collapsed (closed) state; keep them
|
|
2251
|
+
accessible to screen readers via the sr-only pattern rather than
|
|
2252
|
+
removing them, since the icon alone is not a reliable label. */
|
|
2253
|
+
.sv-app-shell[data-collapsible='icon'][data-state='closed'] .sv-app-sidebar__label {
|
|
2254
|
+
position: absolute;
|
|
2255
|
+
width: 1px;
|
|
2256
|
+
height: 1px;
|
|
2257
|
+
overflow: hidden;
|
|
2258
|
+
clip-path: inset(50%);
|
|
2259
|
+
white-space: nowrap;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/* ---------- Toast ---------- */
|
|
2263
|
+
/* Toast viewport container (region role). The Radix primitive renders the
|
|
2264
|
+
list here; our wrapper manages the queue. */
|
|
2265
|
+
.sv-toast__viewport {
|
|
2266
|
+
position: fixed;
|
|
2267
|
+
bottom: var(--sv-space-4);
|
|
2268
|
+
right: var(--sv-space-4);
|
|
2269
|
+
display: flex;
|
|
2270
|
+
flex-direction: column;
|
|
2271
|
+
gap: var(--sv-space-3);
|
|
2272
|
+
pointer-events: none;
|
|
2273
|
+
z-index: var(--sv-z-toast);
|
|
2274
|
+
max-width: calc(100vw - var(--sv-space-8));
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
/* Individual toast item */
|
|
2278
|
+
.sv-toast {
|
|
2279
|
+
display: flex;
|
|
2280
|
+
align-items: flex-start;
|
|
2281
|
+
gap: var(--sv-space-3);
|
|
2282
|
+
padding: var(--sv-space-3) var(--sv-space-4);
|
|
2283
|
+
border: 1px solid var(--sv-border);
|
|
2284
|
+
border-radius: var(--sv-radius-md);
|
|
2285
|
+
background: var(--sv-surface);
|
|
2286
|
+
color: var(--sv-text);
|
|
2287
|
+
pointer-events: auto;
|
|
2288
|
+
animation: sv-toast-enter var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2289
|
+
}
|
|
2290
|
+
.sv-toast[data-state="closed"] {
|
|
2291
|
+
animation: sv-toast-exit var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
@keyframes sv-toast-enter {
|
|
2295
|
+
from {
|
|
2296
|
+
opacity: 0;
|
|
2297
|
+
}
|
|
2298
|
+
to {
|
|
2299
|
+
opacity: 1;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
@keyframes sv-toast-exit {
|
|
2304
|
+
from {
|
|
2305
|
+
opacity: 1;
|
|
2306
|
+
}
|
|
2307
|
+
to {
|
|
2308
|
+
opacity: 0;
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
/* Icon */
|
|
2313
|
+
.sv-toast__icon {
|
|
2314
|
+
flex-shrink: 0;
|
|
2315
|
+
margin-top: 2px;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
/* Content wrapper */
|
|
2319
|
+
.sv-toast__content {
|
|
2320
|
+
flex: 1;
|
|
2321
|
+
min-width: 0;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
/* Title */
|
|
2325
|
+
.sv-toast__title {
|
|
2326
|
+
margin: 0 0 var(--sv-space-1);
|
|
2327
|
+
font-weight: 500;
|
|
2328
|
+
line-height: 1.25;
|
|
2329
|
+
letter-spacing: -0.025em;
|
|
2330
|
+
color: var(--sv-text);
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
/* Description */
|
|
2334
|
+
.sv-toast__description {
|
|
2335
|
+
font-size: var(--sv-text-sm);
|
|
2336
|
+
color: var(--sv-text-2);
|
|
2337
|
+
line-height: 1.5;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
/* Variant colors (info, success, warning, danger) */
|
|
2341
|
+
.sv-toast--info .sv-toast__icon {
|
|
2342
|
+
color: var(--sv-info-ink);
|
|
2343
|
+
}
|
|
2344
|
+
.sv-toast--info .sv-toast__title {
|
|
2345
|
+
color: var(--sv-info-ink);
|
|
2346
|
+
}
|
|
2347
|
+
.sv-toast--info {
|
|
2348
|
+
border-color: var(--sv-info-ink);
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
.sv-toast--success .sv-toast__icon {
|
|
2352
|
+
color: var(--sv-success-ink);
|
|
2353
|
+
}
|
|
2354
|
+
.sv-toast--success .sv-toast__title {
|
|
2355
|
+
color: var(--sv-success-ink);
|
|
2356
|
+
}
|
|
2357
|
+
.sv-toast--success {
|
|
2358
|
+
border-color: var(--sv-success-ink);
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
.sv-toast--warning .sv-toast__icon {
|
|
2362
|
+
color: var(--sv-warning-ink);
|
|
2363
|
+
}
|
|
2364
|
+
.sv-toast--warning .sv-toast__title {
|
|
2365
|
+
color: var(--sv-warning-ink);
|
|
2366
|
+
}
|
|
2367
|
+
.sv-toast--warning {
|
|
2368
|
+
border-color: var(--sv-warning-ink);
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
.sv-toast--danger .sv-toast__icon {
|
|
2372
|
+
color: var(--sv-danger-ink);
|
|
2373
|
+
}
|
|
2374
|
+
.sv-toast--danger .sv-toast__title {
|
|
2375
|
+
color: var(--sv-danger-ink);
|
|
2376
|
+
}
|
|
2377
|
+
.sv-toast--danger {
|
|
2378
|
+
border-color: var(--sv-danger-ink);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
/* Actions container */
|
|
2382
|
+
.sv-toast__actions {
|
|
2383
|
+
display: flex;
|
|
2384
|
+
gap: var(--sv-space-2);
|
|
2385
|
+
flex-shrink: 0;
|
|
2386
|
+
align-items: center;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
/* Action button */
|
|
2390
|
+
.sv-toast__action {
|
|
2391
|
+
padding: var(--sv-space-2) var(--sv-space-3);
|
|
2392
|
+
border: 1px solid var(--sv-border);
|
|
2393
|
+
border-radius: var(--sv-radius-md);
|
|
2394
|
+
background: var(--sv-surface-2);
|
|
2395
|
+
color: var(--sv-text);
|
|
2396
|
+
font-size: var(--sv-text-sm);
|
|
2397
|
+
font-weight: 500;
|
|
2398
|
+
cursor: pointer;
|
|
2399
|
+
transition: background var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2400
|
+
}
|
|
2401
|
+
.sv-toast__action:hover {
|
|
2402
|
+
/* --sv-surface-3 does not exist (2-tier system only). Same base/hover
|
|
2403
|
+
pair as .sv-btn--secondary, which shares this button's surface-2 base. */
|
|
2404
|
+
background: var(--sv-surface);
|
|
2405
|
+
}
|
|
2406
|
+
.sv-toast__action:focus-visible {
|
|
2407
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
2408
|
+
outline-offset: 2px;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
/* Close button */
|
|
2412
|
+
.sv-toast__close {
|
|
2413
|
+
padding: 0;
|
|
2414
|
+
border: none;
|
|
2415
|
+
background: transparent;
|
|
2416
|
+
color: var(--sv-text-2);
|
|
2417
|
+
cursor: pointer;
|
|
2418
|
+
display: flex;
|
|
2419
|
+
align-items: center;
|
|
2420
|
+
justify-content: center;
|
|
2421
|
+
flex-shrink: 0;
|
|
2422
|
+
transition: color var(--sv-duration-fast) var(--sv-ease-hover);
|
|
2423
|
+
}
|
|
2424
|
+
.sv-toast__close:hover {
|
|
2425
|
+
color: var(--sv-text);
|
|
2426
|
+
}
|
|
2427
|
+
.sv-toast__close:focus-visible {
|
|
2428
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
2429
|
+
outline-offset: 2px;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
/* ---------- Reduced motion ---------- */
|
|
2433
|
+
/* This block lives here, at the end of style.css, and not in theme.css, for a
|
|
2434
|
+
cascade reason: `@media` adds no specificity, and README documents the
|
|
2435
|
+
import order as theme.css then style.css. A `transition: none` written in
|
|
2436
|
+
theme.css therefore loses to the base rule in this file — same specificity,
|
|
2437
|
+
later document order — and the override silently never applies. Five classes
|
|
2438
|
+
shipped in v2 exactly that way. tests/reduced-motion-contract.test.ts pins
|
|
2439
|
+
the property: the reduce rule for a class must sit in the same sheet as its
|
|
2440
|
+
base rule, and after it. */
|
|
2441
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2442
|
+
/* Hover and active colour fades across nav, pills, buttons, badges, table
|
|
2443
|
+
rows and menu chrome are non-essential motion — instant is the
|
|
2444
|
+
reduced-motion default. The reading progress bar is deliberately absent:
|
|
2445
|
+
its transition tracks the user's own scroll input 1:1, so it is not
|
|
2446
|
+
decoration. */
|
|
2447
|
+
.sv-header__link,
|
|
2448
|
+
.sv-footer__link,
|
|
2449
|
+
.sv-pill--interactive,
|
|
2450
|
+
.sv-code-block__copy,
|
|
2451
|
+
.sv-toc__link,
|
|
2452
|
+
.sv-table__row,
|
|
2453
|
+
.sv-btn,
|
|
2454
|
+
.sv-badge,
|
|
2455
|
+
.sv-dialog__close,
|
|
2456
|
+
.sv-menu-item,
|
|
2457
|
+
.sv-tabs__trigger,
|
|
2458
|
+
.sv-progress__indicator,
|
|
2459
|
+
.sv-pagination__link {
|
|
2460
|
+
transition: none;
|
|
2461
|
+
}
|
|
2462
|
+
/* AD-009 lets the portal family fade because open/closed carries state, but
|
|
2463
|
+
the fade is still an enhancement — under reduced motion the panel simply
|
|
2464
|
+
appears/disappears. `animation: none` (not `transition: none` — the fade
|
|
2465
|
+
is driven by @keyframes so Presence's animationend-based unmount timing
|
|
2466
|
+
detects it) means Presence sees no animation and unmounts on close the
|
|
2467
|
+
same instant it would if the browser had no reduced-motion support at
|
|
2468
|
+
all — the closed panel never has a chance to snap into view. */
|
|
2469
|
+
.sv-overlay,
|
|
2470
|
+
.sv-dialog,
|
|
2471
|
+
.sv-sheet,
|
|
2472
|
+
.sv-pop,
|
|
2473
|
+
.sv-app-sidebar,
|
|
2474
|
+
.sv-toast {
|
|
2475
|
+
animation: none;
|
|
2476
|
+
}
|
|
2477
|
+
.sv-app-sidebar-trigger {
|
|
2478
|
+
transition: none;
|
|
2479
|
+
}
|
|
2480
|
+
}
|