@nyxwire/starlight 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +221 -2
- package/dist/config.d.ts +9 -0
- package/dist/config.js +32 -0
- package/dist/docs/foundations/accessibility.md +71 -0
- package/dist/docs/foundations/color-roles.md +114 -0
- package/dist/docs/foundations/effects-motion.md +150 -0
- package/dist/docs/foundations/flavors.md +156 -0
- package/dist/docs/foundations/icons.md +45 -0
- package/dist/docs/foundations/palette.md +180 -0
- package/dist/docs/foundations/spacing-elevation.md +168 -0
- package/dist/docs/foundations/typography.md +80 -0
- package/dist/docs/index.md +51 -0
- package/dist/docs/kitchen-sink.md +283 -0
- package/dist/docs/manifest.json +61 -0
- package/dist/docs/setup.md +190 -0
- package/dist/ec-themes.d.ts +443 -0
- package/dist/ec-themes.js +217 -0
- package/dist/expressive-code.d.ts +75 -0
- package/dist/expressive-code.js +101 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +25 -0
- package/dist/options.d.ts +29 -0
- package/dist/options.js +56 -0
- package/dist/runtime.d.ts +16 -0
- package/dist/runtime.js +52 -0
- package/dist/theme-bridge.d.ts +27 -0
- package/dist/theme-bridge.js +73 -0
- package/package.json +67 -3
- package/src/chrome.css +191 -0
- package/src/components/ThemeProvider.astro +15 -0
- package/src/components/ThemeSelect.astro +51 -0
- package/src/components/env.d.ts +5 -0
- package/src/config.ts +53 -0
- package/src/content-components.css +154 -0
- package/src/ec-themes.ts +246 -0
- package/src/expressive-code.ts +115 -0
- package/src/index.ts +32 -0
- package/src/options.ts +80 -0
- package/src/prose.css +108 -0
- package/src/runtime.ts +67 -0
- package/src/theme-bridge.css +130 -0
- package/src/theme-bridge.ts +89 -0
- package/styles.css +299 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* Unlayered so both of Starlight's color modes receive the same semantic roles.
|
|
2
|
+
Repeat on scopes that change Nyxwire tokens: custom properties resolve where declared. */
|
|
3
|
+
:where(:root, [data-flavor], [data-accent]) {
|
|
4
|
+
--sl-color-white: var(--nw-fg);
|
|
5
|
+
--sl-color-gray-1: var(--nw-fg);
|
|
6
|
+
--sl-color-gray-2: var(--nw-fg-muted);
|
|
7
|
+
--sl-color-gray-3: var(--nw-fg-subtle);
|
|
8
|
+
--sl-color-gray-4: var(--nw-line-strong);
|
|
9
|
+
--sl-color-gray-5: var(--nw-line);
|
|
10
|
+
--sl-color-gray-6: var(--nw-panel);
|
|
11
|
+
--sl-color-gray-7: var(--nw-canvas-subtle);
|
|
12
|
+
--sl-color-black: var(--nw-canvas);
|
|
13
|
+
|
|
14
|
+
--sl-color-orange-low: var(--nw-warning-soft);
|
|
15
|
+
--sl-color-orange: var(--nw-warning);
|
|
16
|
+
--sl-color-orange-high: color-mix(in oklab, var(--nw-warning) var(--nw-soft-ink), var(--nw-fg));
|
|
17
|
+
--sl-color-green-low: var(--nw-success-soft);
|
|
18
|
+
--sl-color-green: var(--nw-success);
|
|
19
|
+
--sl-color-green-high: color-mix(in oklab, var(--nw-success) var(--nw-soft-ink), var(--nw-fg));
|
|
20
|
+
--sl-color-blue-low: var(--nw-info-soft);
|
|
21
|
+
--sl-color-blue: var(--nw-info);
|
|
22
|
+
--sl-color-blue-high: color-mix(in oklab, var(--nw-info) var(--nw-soft-ink), var(--nw-fg));
|
|
23
|
+
--sl-color-purple-low: var(--nw-secondary-soft);
|
|
24
|
+
--sl-color-purple: var(--nw-secondary);
|
|
25
|
+
--sl-color-purple-high: color-mix(in oklab, var(--nw-secondary) var(--nw-soft-ink), var(--nw-fg));
|
|
26
|
+
--sl-color-red-low: var(--nw-danger-soft);
|
|
27
|
+
--sl-color-red: var(--nw-danger);
|
|
28
|
+
--sl-color-red-high: color-mix(in oklab, var(--nw-danger) var(--nw-soft-ink), var(--nw-fg));
|
|
29
|
+
|
|
30
|
+
--sl-color-accent-low: var(--nw-primary-soft);
|
|
31
|
+
--sl-color-accent: var(--nw-primary);
|
|
32
|
+
--sl-color-accent-high: color-mix(in oklab, var(--nw-primary) var(--nw-soft-ink), var(--nw-fg));
|
|
33
|
+
--sl-color-text: var(--nw-fg);
|
|
34
|
+
--sl-color-text-accent: var(--nw-link);
|
|
35
|
+
--sl-color-text-invert: var(--nw-on-primary);
|
|
36
|
+
--sl-color-bg: var(--nw-canvas);
|
|
37
|
+
--sl-color-bg-nav: var(--nw-canvas-sunken);
|
|
38
|
+
--sl-color-bg-sidebar: var(--nw-canvas-subtle);
|
|
39
|
+
--sl-color-bg-inline-code: var(--nw-panel);
|
|
40
|
+
--sl-color-bg-accent: var(--nw-primary);
|
|
41
|
+
--sl-color-hairline-light: var(--nw-line-strong);
|
|
42
|
+
--sl-color-hairline: var(--nw-line);
|
|
43
|
+
--sl-color-hairline-shade: var(--nw-line);
|
|
44
|
+
--sl-color-backdrop-overlay: var(--nw-backdrop);
|
|
45
|
+
|
|
46
|
+
--sl-color-banner-bg: var(--nw-primary);
|
|
47
|
+
--sl-color-banner-text: var(--nw-on-primary);
|
|
48
|
+
|
|
49
|
+
--sl-shadow-sm: var(--nw-shadow-sm);
|
|
50
|
+
--sl-shadow-md: var(--nw-shadow-md);
|
|
51
|
+
--sl-shadow-lg: var(--nw-shadow-lg);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(:root) {
|
|
55
|
+
--sl-font: var(--nw-font-sans);
|
|
56
|
+
--sl-font-mono: var(--nw-font-mono);
|
|
57
|
+
--sl-text-2xs: var(--nw-text-2xs);
|
|
58
|
+
--sl-text-xs: var(--nw-text-xs);
|
|
59
|
+
--sl-text-sm: var(--nw-text-sm);
|
|
60
|
+
--sl-text-base: var(--nw-text-base);
|
|
61
|
+
--sl-text-lg: var(--nw-text-lg);
|
|
62
|
+
--sl-text-xl: var(--nw-text-xl);
|
|
63
|
+
--sl-text-2xl: var(--nw-text-2xl);
|
|
64
|
+
--sl-text-3xl: var(--nw-text-3xl);
|
|
65
|
+
--sl-text-4xl: var(--nw-text-4xl);
|
|
66
|
+
--sl-text-5xl: var(--nw-text-5xl);
|
|
67
|
+
--sl-text-6xl: var(--nw-text-6xl);
|
|
68
|
+
--sl-line-height: var(--nw-leading-normal);
|
|
69
|
+
--sl-line-height-headings: var(--nw-leading-tight);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.starlight-aside {
|
|
73
|
+
--sl-color-asides-border: var(--nw-info);
|
|
74
|
+
--sl-color-asides-text-accent: var(--sl-color-blue-high);
|
|
75
|
+
--nw-aside-fill: var(--nw-info-soft);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.starlight-aside--tip {
|
|
79
|
+
--sl-color-asides-border: var(--nw-secondary);
|
|
80
|
+
--sl-color-asides-text-accent: var(--sl-color-purple-high);
|
|
81
|
+
--nw-aside-fill: var(--nw-secondary-soft);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.starlight-aside--caution {
|
|
85
|
+
--sl-color-asides-border: var(--nw-warning);
|
|
86
|
+
--sl-color-asides-text-accent: var(--sl-color-orange-high);
|
|
87
|
+
--nw-aside-fill: var(--nw-warning-soft);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.starlight-aside--danger {
|
|
91
|
+
--sl-color-asides-border: var(--nw-danger);
|
|
92
|
+
--sl-color-asides-text-accent: var(--sl-color-red-high);
|
|
93
|
+
--nw-aside-fill: var(--nw-danger-soft);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sl-badge {
|
|
97
|
+
--sl-color-bg-badge: var(--nw-primary-soft);
|
|
98
|
+
--sl-color-border-badge: var(--nw-primary);
|
|
99
|
+
--sl-color-text-badge: var(--sl-color-accent-high);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sl-badge.note {
|
|
103
|
+
--sl-color-bg-badge: var(--nw-info-soft);
|
|
104
|
+
--sl-color-border-badge: var(--nw-info);
|
|
105
|
+
--sl-color-text-badge: var(--sl-color-blue-high);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sl-badge.tip {
|
|
109
|
+
--sl-color-bg-badge: var(--nw-secondary-soft);
|
|
110
|
+
--sl-color-border-badge: var(--nw-secondary);
|
|
111
|
+
--sl-color-text-badge: var(--sl-color-purple-high);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sl-badge.caution {
|
|
115
|
+
--sl-color-bg-badge: var(--nw-warning-soft);
|
|
116
|
+
--sl-color-border-badge: var(--nw-warning);
|
|
117
|
+
--sl-color-text-badge: var(--sl-color-orange-high);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.sl-badge.danger {
|
|
121
|
+
--sl-color-bg-badge: var(--nw-danger-soft);
|
|
122
|
+
--sl-color-border-badge: var(--nw-danger);
|
|
123
|
+
--sl-color-text-badge: var(--sl-color-red-high);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.sl-badge.success {
|
|
127
|
+
--sl-color-bg-badge: var(--nw-success-soft);
|
|
128
|
+
--sl-color-border-badge: var(--nw-success);
|
|
129
|
+
--sl-color-text-badge: var(--sl-color-green-high);
|
|
130
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type {} from '@nyxwire/astro'
|
|
2
|
+
import type { DarkFlavorName } from '@nyxwire/palette'
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
StarlightThemeProvider?: { readonly updatePickers: (theme?: string) => void }
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type StarlightThemeBridgeConfig = {
|
|
11
|
+
readonly dark: DarkFlavorName
|
|
12
|
+
readonly light: 'lumen'
|
|
13
|
+
readonly storageKey: string
|
|
14
|
+
readonly legacyKey: string
|
|
15
|
+
readonly changeEvent: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Connects Starlight's theme API to the Nyxwire flavor runtime. Runs inline in `<head>` right
|
|
20
|
+
* after the flavor runtime and is stringified: it must not reference anything outside its body.
|
|
21
|
+
*
|
|
22
|
+
* - `window.StarlightThemeProvider.updatePickers(theme?)` keeps Starlight's contract: it syncs every
|
|
23
|
+
* `<starlight-theme-select>` / `<nw-starlight-flavor-select>` (value + label icon). Called with a
|
|
24
|
+
* Starlight theme that differs from the current one (Starlight's own select changed), it maps
|
|
25
|
+
* `dark|light|auto` to the configured dark flavor, the light flavor, or auto.
|
|
26
|
+
* - The Starlight `starlight-theme` storage key mirrors the flavor (`''` for auto), and a stored
|
|
27
|
+
* Starlight preference is adopted once when no flavor has been stored yet.
|
|
28
|
+
*/
|
|
29
|
+
export function starlightThemeBridge(config: StarlightThemeBridgeConfig): void {
|
|
30
|
+
const controller = window.nyxwire
|
|
31
|
+
if (!controller) return
|
|
32
|
+
const read = (key: string): string | null => {
|
|
33
|
+
try {
|
|
34
|
+
return localStorage.getItem(key)
|
|
35
|
+
} catch (error) {
|
|
36
|
+
if (!(error instanceof DOMException)) throw error
|
|
37
|
+
// Storage is blocked: behave as if nothing was stored.
|
|
38
|
+
return null
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const write = (key: string, value: string): void => {
|
|
42
|
+
try {
|
|
43
|
+
localStorage.setItem(key, value)
|
|
44
|
+
} catch (error) {
|
|
45
|
+
if (!(error instanceof DOMException)) throw error
|
|
46
|
+
// Storage is blocked or full: the in-memory flavor still applies.
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const legacy = read(config.legacyKey)
|
|
50
|
+
if (read(config.storageKey) === null && (legacy === 'dark' || legacy === 'light')) {
|
|
51
|
+
controller.setFlavor(legacy === 'dark' ? config.dark : config.light)
|
|
52
|
+
}
|
|
53
|
+
const current = (): 'auto' | 'dark' | 'light' =>
|
|
54
|
+
controller.getFlavor() === 'auto'
|
|
55
|
+
? 'auto'
|
|
56
|
+
: controller.resolve() === config.light
|
|
57
|
+
? 'light'
|
|
58
|
+
: 'dark'
|
|
59
|
+
const sync = (): void => {
|
|
60
|
+
const theme = current()
|
|
61
|
+
const legacy = theme === 'auto' ? '' : theme
|
|
62
|
+
if (read(config.legacyKey) !== legacy) write(config.legacyKey, legacy)
|
|
63
|
+
const template = document.getElementById('theme-icons')
|
|
64
|
+
const icon =
|
|
65
|
+
template instanceof HTMLTemplateElement ? template.content.querySelector(`.${theme}`) : null
|
|
66
|
+
for (const picker of document.querySelectorAll(
|
|
67
|
+
'starlight-theme-select, nw-starlight-flavor-select',
|
|
68
|
+
)) {
|
|
69
|
+
const select = picker.querySelector('select')
|
|
70
|
+
if (select) {
|
|
71
|
+
select.value =
|
|
72
|
+
picker.localName === 'starlight-theme-select' ? theme : controller.getFlavor()
|
|
73
|
+
}
|
|
74
|
+
const label = picker.querySelector('svg.label-icon')
|
|
75
|
+
if (icon && label) label.replaceChildren(...icon.cloneNode(true).childNodes)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const updatePickers = (theme?: string): void => {
|
|
79
|
+
if ((theme === 'auto' || theme === 'dark' || theme === 'light') && theme !== current()) {
|
|
80
|
+
controller.setFlavor(
|
|
81
|
+
theme === 'auto' ? 'auto' : theme === 'dark' ? config.dark : config.light,
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
sync()
|
|
85
|
+
}
|
|
86
|
+
window.StarlightThemeProvider = { ...window.StarlightThemeProvider, updatePickers }
|
|
87
|
+
document.addEventListener(config.changeEvent, sync)
|
|
88
|
+
sync()
|
|
89
|
+
}
|
package/styles.css
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
@layer base, starlight, theme, nyxwire-print, components, utilities;
|
|
2
|
+
@layer starlight.base, starlight.reset, starlight.core, starlight.content, starlight.components, starlight.utils, starlight.nyxwire;
|
|
3
|
+
|
|
4
|
+
@import '@nyxwire/css/tokens.css';
|
|
5
|
+
@import '@nyxwire/css/fonts.css';
|
|
6
|
+
@import '@nyxwire/palette/css/lumen.css' layer(nyxwire-print) print;
|
|
7
|
+
@import './src/theme-bridge.css';
|
|
8
|
+
@import './src/chrome.css' layer(starlight.nyxwire) screen;
|
|
9
|
+
@import './src/prose.css' layer(starlight.nyxwire) screen;
|
|
10
|
+
@import './src/content-components.css' layer(starlight.nyxwire) screen;
|
|
11
|
+
|
|
12
|
+
@layer starlight.nyxwire {
|
|
13
|
+
@media screen {
|
|
14
|
+
.site-title,
|
|
15
|
+
.hero h1,
|
|
16
|
+
main h1,
|
|
17
|
+
.sl-markdown-content :is(h2, h3, h4, h5, h6),
|
|
18
|
+
.sl-markdown-content .card > .title {
|
|
19
|
+
font-family: var(--nw-font-display);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hero h1,
|
|
23
|
+
main h1 {
|
|
24
|
+
letter-spacing: var(--nw-tracking-tighter);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hero .tagline {
|
|
28
|
+
color: var(--nw-fg-muted);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
::selection {
|
|
32
|
+
background: var(--nw-selection);
|
|
33
|
+
color: var(--nw-fg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:is(input, textarea, [contenteditable]) {
|
|
37
|
+
caret-color: var(--nw-ring);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:is(html, .sidebar-pane, .dialog-frame, .expressive-code pre, .tablist-wrapper) {
|
|
41
|
+
scrollbar-color: var(--nw-line-strong) var(--nw-canvas-sunken);
|
|
42
|
+
scrollbar-width: thin;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sl-markdown-content a {
|
|
46
|
+
text-underline-offset: 0.18em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.page :focus-visible {
|
|
50
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
51
|
+
outline-offset: var(--nw-ring-offset);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.page :is(button, select, input, summary, .sl-link-button):focus-visible {
|
|
55
|
+
box-shadow: var(--nw-glow-sm);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.page > header {
|
|
59
|
+
border-block-end-color: var(--nw-line);
|
|
60
|
+
background: var(--nw-canvas-sunken);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sidebar-pane {
|
|
64
|
+
background: var(--nw-canvas-subtle);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.sidebar-content :is(a, summary):hover {
|
|
68
|
+
background: var(--nw-panel);
|
|
69
|
+
color: var(--nw-fg);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.sidebar-content a[aria-current='page'] {
|
|
73
|
+
background: var(--nw-primary-soft);
|
|
74
|
+
color: var(--sl-color-accent-high);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.sidebar-content :is(a, summary),
|
|
78
|
+
:is(starlight-toc, mobile-starlight-toc) a {
|
|
79
|
+
min-block-size: var(--nw-control-xs);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:is(starlight-toc, mobile-starlight-toc) a[aria-current='true'] {
|
|
83
|
+
color: var(--nw-link);
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
mobile-starlight-toc .dropdown {
|
|
88
|
+
background: var(--nw-canvas-subtle);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.page :is([data-open-modal], [data-close-modal]) {
|
|
92
|
+
min-block-size: calc(var(--nw-control-md) + var(--nw-space-1));
|
|
93
|
+
min-inline-size: calc(var(--nw-control-md) + var(--nw-space-1));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
site-search [data-open-modal] {
|
|
97
|
+
border-color: var(--nw-line-strong);
|
|
98
|
+
justify-content: center;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
site-search dialog {
|
|
102
|
+
background: var(--nw-canvas-subtle);
|
|
103
|
+
border-color: var(--nw-line-strong);
|
|
104
|
+
color: var(--nw-fg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
site-search dialog::backdrop {
|
|
108
|
+
background-color: var(--nw-backdrop);
|
|
109
|
+
-webkit-backdrop-filter: none;
|
|
110
|
+
backdrop-filter: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
#starlight__search {
|
|
114
|
+
--pagefind-ui-primary: var(--nw-link);
|
|
115
|
+
--pagefind-ui-text: var(--nw-fg);
|
|
116
|
+
--pagefind-ui-background: var(--nw-canvas-sunken);
|
|
117
|
+
--pagefind-ui-border: var(--nw-line-strong);
|
|
118
|
+
--pagefind-ui-tag: var(--nw-panel);
|
|
119
|
+
--pagefind-ui-border-radius: var(--nw-radius-sm);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#starlight__search .pagefind-ui__search-input::placeholder {
|
|
123
|
+
color: var(--nw-fg-subtle);
|
|
124
|
+
opacity: 1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
#starlight__search mark {
|
|
128
|
+
background: var(--nw-selection);
|
|
129
|
+
color: var(--nw-fg);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.sl-markdown-content :is(article.card, .sl-link-card) {
|
|
133
|
+
border: var(--nw-space-px) solid transparent;
|
|
134
|
+
border-radius: var(--nw-radius-md);
|
|
135
|
+
background:
|
|
136
|
+
linear-gradient(var(--nw-canvas-subtle), var(--nw-canvas-subtle)) padding-box,
|
|
137
|
+
var(--nw-gradient-wire) border-box;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.sl-markdown-content .sl-link-card:is(:hover, :focus-within) {
|
|
141
|
+
background:
|
|
142
|
+
linear-gradient(var(--nw-panel), var(--nw-panel)) padding-box,
|
|
143
|
+
var(--nw-gradient-wire) border-box;
|
|
144
|
+
border-color: transparent;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.sl-markdown-content .card .icon {
|
|
148
|
+
color: var(--nw-primary);
|
|
149
|
+
border-color: transparent;
|
|
150
|
+
background: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.starlight-aside {
|
|
154
|
+
--nw-fill: var(--nw-aside-fill);
|
|
155
|
+
position: relative;
|
|
156
|
+
isolation: isolate;
|
|
157
|
+
border: 0;
|
|
158
|
+
background: var(--nw-cut-surface);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.starlight-aside::before {
|
|
162
|
+
content: '';
|
|
163
|
+
position: absolute;
|
|
164
|
+
inset: 0;
|
|
165
|
+
z-index: -1;
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
background: var(--nw-line-strong);
|
|
168
|
+
clip-path: var(--nw-cut-ring);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
starlight-tabs [role='tablist'] {
|
|
172
|
+
border-bottom: var(--nw-space-px) solid var(--nw-line);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
starlight-tabs .tab > [role='tab'] {
|
|
176
|
+
min-block-size: calc(var(--nw-control-md) + var(--nw-space-1));
|
|
177
|
+
border-radius: var(--nw-radius-sm) var(--nw-radius-sm) 0 0;
|
|
178
|
+
box-shadow: none;
|
|
179
|
+
color: var(--nw-fg-muted);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
starlight-tabs [role='tab'][aria-selected='true'] {
|
|
183
|
+
background: var(--nw-primary-soft);
|
|
184
|
+
color: var(--sl-color-accent-high);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.sl-badge {
|
|
188
|
+
font-family: var(--nw-font-sans);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.sidebar-content a[aria-current='page'] .sl-badge {
|
|
192
|
+
--sl-color-bg-badge: transparent;
|
|
193
|
+
--sl-color-border-badge: currentColor;
|
|
194
|
+
--sl-color-text-badge: currentColor;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:is(.hero .action, .sl-link-button) {
|
|
198
|
+
min-block-size: calc(var(--nw-control-md) + var(--nw-space-1));
|
|
199
|
+
border-radius: var(--nw-radius-sm);
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
:is(.hero .action, .sl-link-button).primary {
|
|
204
|
+
border-color: var(--nw-primary);
|
|
205
|
+
background: var(--nw-primary);
|
|
206
|
+
color: var(--nw-on-primary);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:is(.hero .action, .sl-link-button).primary:hover {
|
|
210
|
+
border-color: var(--nw-primary);
|
|
211
|
+
background: color-mix(in oklab, var(--nw-primary) 92%, var(--nw-fg));
|
|
212
|
+
color: var(--nw-on-primary);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:is(.hero .action, .sl-link-button).secondary {
|
|
216
|
+
border-color: var(--nw-line-strong);
|
|
217
|
+
background: var(--nw-canvas-subtle);
|
|
218
|
+
color: var(--nw-fg);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:is(.hero .action, .sl-link-button).secondary:hover {
|
|
222
|
+
border-color: var(--nw-line-bright);
|
|
223
|
+
background: var(--nw-panel);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.pagination-links > a {
|
|
227
|
+
background: var(--nw-canvas-subtle);
|
|
228
|
+
border-color: var(--nw-line-strong);
|
|
229
|
+
border-radius: var(--nw-radius-md);
|
|
230
|
+
box-shadow: none;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.pagination-links > a:hover {
|
|
234
|
+
background: var(--nw-panel);
|
|
235
|
+
border-color: var(--nw-line-bright);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.sl-markdown-content :is(th, td):not(:where(.not-content *)) {
|
|
239
|
+
border-color: var(--nw-line);
|
|
240
|
+
font-variant-numeric: tabular-nums;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.sl-markdown-content th:not(:where(.not-content *)) {
|
|
244
|
+
background: var(--nw-panel);
|
|
245
|
+
color: var(--nw-fg);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (max-width: 49.999rem) {
|
|
249
|
+
/* Starlight does not render a mobile sidebar on splash and other sidebar-free pages. */
|
|
250
|
+
:root:not([data-has-sidebar]) .header > .right-group:has(> nw-starlight-flavor-select) {
|
|
251
|
+
display: flex;
|
|
252
|
+
gap: var(--nw-space-2);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:root:not([data-has-sidebar])
|
|
256
|
+
.header
|
|
257
|
+
> .right-group:has(> nw-starlight-flavor-select)
|
|
258
|
+
> :not(nw-starlight-flavor-select) {
|
|
259
|
+
display: none;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@media (prefers-reduced-motion: reduce) {
|
|
264
|
+
:is(
|
|
265
|
+
.sidebar-content .caret,
|
|
266
|
+
.site-title,
|
|
267
|
+
site-search *,
|
|
268
|
+
.sl-link-card,
|
|
269
|
+
.pagination-links > a
|
|
270
|
+
) {
|
|
271
|
+
transition: none;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media (forced-colors: active) {
|
|
276
|
+
.sl-markdown-content :is(article.card, .sl-link-card),
|
|
277
|
+
.starlight-aside {
|
|
278
|
+
border: var(--nw-space-px) solid CanvasText;
|
|
279
|
+
background: Canvas;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.starlight-aside::before {
|
|
283
|
+
display: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.page :focus-visible {
|
|
287
|
+
outline-color: Highlight;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
:is(
|
|
291
|
+
.sidebar-content a[aria-current='page'],
|
|
292
|
+
starlight-tabs [role='tab'][aria-selected='true']
|
|
293
|
+
) {
|
|
294
|
+
outline: var(--nw-space-px) solid currentColor;
|
|
295
|
+
outline-offset: calc(-1 * var(--nw-space-px));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|