@minidocs/astro 0.0.0-stage → 0.2.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 +40 -2
- package/dist/behaviors.d.mts +114 -0
- package/dist/behaviors.mjs +635 -0
- package/dist/index.d.mts +23 -0
- package/dist/index.mjs +275 -0
- package/dist/links-Dp7d5R-O.mjs +242 -0
- package/dist/loaders.d.mts +25 -0
- package/dist/loaders.mjs +88 -0
- package/dist/routing-D28b92w8.mjs +60 -0
- package/dist/runtime.d.mts +202 -0
- package/dist/runtime.mjs +327 -0
- package/package.json +80 -3
- package/src/components/Prose.astro +9 -0
- package/src/components/callout/Root.astro +14 -0
- package/src/components/callout/Title.astro +9 -0
- package/src/components/callout/index.ts +2 -0
- package/src/components/index.ts +7 -0
- package/src/components/layout/Aside.astro +29 -0
- package/src/components/layout/Header.astro +18 -0
- package/src/components/layout/Main.astro +9 -0
- package/src/components/layout/Root.astro +15 -0
- package/src/components/layout/Sidebar.astro +9 -0
- package/src/components/layout/Title.astro +10 -0
- package/src/components/layout/index.ts +6 -0
- package/src/components/pager/Label.astro +9 -0
- package/src/components/pager/Link.astro +12 -0
- package/src/components/pager/Root.astro +12 -0
- package/src/components/pager/Title.astro +9 -0
- package/src/components/pager/index.ts +4 -0
- package/src/components/search/Count.astro +10 -0
- package/src/components/search/Dialog.astro +14 -0
- package/src/components/search/Empty.astro +10 -0
- package/src/components/search/Error.astro +10 -0
- package/src/components/search/Found.astro +10 -0
- package/src/components/search/Idle.astro +10 -0
- package/src/components/search/Input.astro +26 -0
- package/src/components/search/Loading.astro +10 -0
- package/src/components/search/Query.astro +10 -0
- package/src/components/search/Results.astro +20 -0
- package/src/components/search/Root.astro +15 -0
- package/src/components/search/Shortcut.astro +14 -0
- package/src/components/search/Trigger.astro +28 -0
- package/src/components/search/index.ts +13 -0
- package/src/components/sidebar/Group.astro +45 -0
- package/src/components/sidebar/Item.astro +9 -0
- package/src/components/sidebar/Label.astro +9 -0
- package/src/components/sidebar/Link.astro +23 -0
- package/src/components/sidebar/List.astro +11 -0
- package/src/components/sidebar/Root.astro +24 -0
- package/src/components/sidebar/Trigger.astro +29 -0
- package/src/components/sidebar/index.ts +7 -0
- package/src/components/toc/Item.astro +9 -0
- package/src/components/toc/Link.astro +12 -0
- package/src/components/toc/List.astro +11 -0
- package/src/components/toc/Root.astro +20 -0
- package/src/components/toc/index.ts +4 -0
- package/src/styles/base.css +42 -0
- package/src/styles/callout.css +58 -0
- package/src/styles/layout.css +406 -0
- package/src/styles/pager.css +56 -0
- package/src/styles/prose.css +218 -0
- package/src/styles/search.css +207 -0
- package/src/styles/sidebar.css +162 -0
- package/src/styles/toc.css +79 -0
- package/src/styles.css +9 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/* Rendered Markdown content, from the Prose component or the md-prose class. */
|
|
2
|
+
@layer minidocs {
|
|
3
|
+
.md-prose {
|
|
4
|
+
color: var(--md-color-text);
|
|
5
|
+
font-size: var(--md-prose-font-size);
|
|
6
|
+
line-height: var(--md-prose-line-height);
|
|
7
|
+
overflow-wrap: break-word;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.md-prose > :first-child {
|
|
11
|
+
margin-block-start: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.md-prose > :last-child {
|
|
15
|
+
margin-block-end: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.md-prose :is(h1, h2, h3, h4, h5, h6) {
|
|
19
|
+
color: var(--md-color-heading);
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
line-height: 1.35;
|
|
22
|
+
text-wrap: balance;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.md-prose h1 {
|
|
26
|
+
margin-block: 0 1rem;
|
|
27
|
+
font-size: 1.875em;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
letter-spacing: -0.015em;
|
|
30
|
+
line-height: 1.25;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.md-prose h2 {
|
|
34
|
+
margin-block: 2.5em 0.75em;
|
|
35
|
+
font-size: 1.5em;
|
|
36
|
+
letter-spacing: -0.01em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.md-prose h3 {
|
|
40
|
+
margin-block: 2em 0.5em;
|
|
41
|
+
font-size: 1.125em;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.md-prose :is(h4, h5, h6) {
|
|
45
|
+
margin-block: 1.75em 0.5em;
|
|
46
|
+
font-size: 1em;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* A heading right after another one already has enough space above it */
|
|
50
|
+
.md-prose :is(h1, h2, h3, h4, h5, h6) + :is(h2, h3, h4, h5, h6) {
|
|
51
|
+
margin-block-start: 0.75em;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Except under the page title, which needs a clear gap before the first section */
|
|
55
|
+
.md-prose h1 + :is(h2, h3, h4, h5, h6) {
|
|
56
|
+
margin-block-start: 1.75em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.md-prose :is(p, ul, ol, blockquote, pre, table, figure) {
|
|
60
|
+
margin-block: 1.125em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.md-prose a {
|
|
64
|
+
color: var(--md-color-accent);
|
|
65
|
+
text-decoration: underline;
|
|
66
|
+
text-decoration-color: color-mix(in srgb, var(--md-color-accent) 35%, transparent);
|
|
67
|
+
text-decoration-thickness: 1px;
|
|
68
|
+
text-underline-offset: 0.22em;
|
|
69
|
+
transition: text-decoration-color 0.15s;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.md-prose a:hover {
|
|
73
|
+
text-decoration-color: currentColor;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.md-prose strong {
|
|
77
|
+
color: var(--md-color-heading);
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Set explicitly, since resets like Tailwind's Preflight remove the browser defaults */
|
|
82
|
+
.md-prose :is(ul, ol) {
|
|
83
|
+
padding-inline-start: 1.375em;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.md-prose ul {
|
|
87
|
+
list-style-type: disc;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.md-prose ol {
|
|
91
|
+
list-style-type: decimal;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.md-prose :is(ul, ol) ul {
|
|
95
|
+
list-style-type: circle;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.md-prose li {
|
|
99
|
+
margin-block: 0.375em;
|
|
100
|
+
padding-inline-start: 0.125em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.md-prose li > :is(ul, ol) {
|
|
104
|
+
margin-block: 0.375em;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.md-prose li::marker {
|
|
108
|
+
color: var(--md-color-muted);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.md-prose ol > li::marker {
|
|
112
|
+
font-variant-numeric: tabular-nums;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.md-prose blockquote {
|
|
116
|
+
margin-inline: 0;
|
|
117
|
+
padding-inline-start: 1em;
|
|
118
|
+
border-inline-start: 2px solid var(--md-color-border);
|
|
119
|
+
color: var(--md-color-muted);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.md-prose hr {
|
|
123
|
+
margin-block: 3em;
|
|
124
|
+
border: 0;
|
|
125
|
+
border-block-start: 1px solid var(--md-color-border);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.md-prose img {
|
|
129
|
+
max-width: 100%;
|
|
130
|
+
height: auto;
|
|
131
|
+
border-radius: var(--md-radius);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.md-prose code,
|
|
135
|
+
.md-prose kbd {
|
|
136
|
+
font-family: var(--md-font-mono);
|
|
137
|
+
font-size: 0.875em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.md-prose :not(pre) > code {
|
|
141
|
+
padding: 0.125em 0.375em;
|
|
142
|
+
border-radius: 0.3125rem;
|
|
143
|
+
background: color-mix(in srgb, var(--md-color-heading) 6%, transparent);
|
|
144
|
+
color: var(--md-color-heading);
|
|
145
|
+
overflow-wrap: anywhere;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.md-prose a code {
|
|
149
|
+
color: inherit;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.md-prose kbd {
|
|
153
|
+
padding: 0.0625em 0.375em;
|
|
154
|
+
border: 1px solid var(--md-color-border);
|
|
155
|
+
border-block-end-width: 2px;
|
|
156
|
+
border-radius: 0.3125rem;
|
|
157
|
+
color: var(--md-color-heading);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.md-prose pre {
|
|
161
|
+
padding: 0.875rem 1rem;
|
|
162
|
+
border: 1px solid var(--md-color-border);
|
|
163
|
+
border-radius: 0.5rem;
|
|
164
|
+
background-color: var(--md-color-code-bg);
|
|
165
|
+
font-size: 0.8125rem;
|
|
166
|
+
line-height: 1.7;
|
|
167
|
+
overflow-x: auto;
|
|
168
|
+
tab-size: 2;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.md-prose pre > code {
|
|
172
|
+
font-size: inherit;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Shiki dual themes with defaultColor: false leave colors to CSS; single themes set them inline and win */
|
|
176
|
+
.md-prose :is(pre, pre span) {
|
|
177
|
+
color: light-dark(var(--shiki-light), var(--shiki-dark));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.md-prose pre:focus-visible {
|
|
181
|
+
outline: var(--md-focus-ring);
|
|
182
|
+
outline-offset: 2px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Wide tables scroll inside themselves instead of widening the page */
|
|
186
|
+
.md-prose table {
|
|
187
|
+
display: block;
|
|
188
|
+
width: max-content;
|
|
189
|
+
max-width: 100%;
|
|
190
|
+
overflow-x: auto;
|
|
191
|
+
border-collapse: collapse;
|
|
192
|
+
font-size: 0.9375em;
|
|
193
|
+
line-height: 1.6;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.md-prose :is(th, td) {
|
|
197
|
+
padding: 0.625em 1.25em 0.625em 0;
|
|
198
|
+
border-block-end: 1px solid var(--md-color-border);
|
|
199
|
+
text-align: start;
|
|
200
|
+
vertical-align: top;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.md-prose :is(th, td):last-child {
|
|
204
|
+
padding-inline-end: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Tables scroll sideways, so code in them stays whole instead of breaking mid-word */
|
|
208
|
+
.md-prose :is(th, td) code {
|
|
209
|
+
overflow-wrap: normal;
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.md-prose th {
|
|
214
|
+
border-block-end-color: color-mix(in srgb, var(--md-color-heading) 25%, transparent);
|
|
215
|
+
color: var(--md-color-heading);
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/* Search: the trigger, the dialog, and the states around results. Options are styled by their ARIA state. */
|
|
2
|
+
@layer minidocs {
|
|
3
|
+
.md-search-trigger {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 0.5rem;
|
|
7
|
+
min-width: 13rem;
|
|
8
|
+
height: 2rem;
|
|
9
|
+
padding-inline: 0.625rem 0.5rem;
|
|
10
|
+
border: 0;
|
|
11
|
+
border-radius: 0.5rem;
|
|
12
|
+
background: color-mix(in srgb, var(--md-color-heading) 4.5%, transparent);
|
|
13
|
+
color: var(--md-color-muted);
|
|
14
|
+
font: inherit;
|
|
15
|
+
font-size: 0.8125rem;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
transition:
|
|
18
|
+
color 0.15s,
|
|
19
|
+
background-color 0.15s;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.md-search-trigger:hover {
|
|
23
|
+
background: color-mix(in srgb, var(--md-color-heading) 8%, transparent);
|
|
24
|
+
color: var(--md-color-heading);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.md-search-trigger:focus-visible {
|
|
28
|
+
outline: var(--md-focus-ring);
|
|
29
|
+
outline-offset: 2px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* One nested kbd per key, which styles can box or join, e.g. with a "+" before every key but the first */
|
|
33
|
+
.md-search-shortcut {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
gap: 0.1875em;
|
|
36
|
+
margin-inline-start: auto;
|
|
37
|
+
color: var(--md-color-muted);
|
|
38
|
+
font-family: var(--md-font-sans);
|
|
39
|
+
font-size: 0.75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.md-search-shortcut[data-platform="apple"] {
|
|
43
|
+
gap: 0.0625em;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.md-search-shortcut kbd {
|
|
47
|
+
font: inherit;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.md-search-dialog {
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
width: min(36rem, 100vw - 1.5rem);
|
|
53
|
+
max-height: min(32rem, 100dvh - 2 * min(14vh, 7rem));
|
|
54
|
+
margin: min(14vh, 7rem) auto auto;
|
|
55
|
+
padding: 0;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
border: 1px solid var(--md-color-border);
|
|
58
|
+
border-radius: 0.875rem;
|
|
59
|
+
background: var(--md-color-bg);
|
|
60
|
+
color: var(--md-color-text);
|
|
61
|
+
box-shadow: 0 24px 48px -12px rgb(0 0 0 / 0.18);
|
|
62
|
+
/* Set here, not on [open]: closing keeps display flex until it fades out, and a row would flash meanwhile */
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
opacity: 0;
|
|
65
|
+
transform: scale(0.98);
|
|
66
|
+
transition:
|
|
67
|
+
opacity 0.18s,
|
|
68
|
+
transform 0.18s cubic-bezier(0.32, 0.72, 0, 1),
|
|
69
|
+
overlay 0.18s allow-discrete,
|
|
70
|
+
display 0.18s allow-discrete;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Results scroll on their own, below whatever sits above them */
|
|
74
|
+
.md-search-dialog[open] {
|
|
75
|
+
display: flex;
|
|
76
|
+
opacity: 1;
|
|
77
|
+
transform: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* The page behind a modal stays put, as with the sidebar drawer */
|
|
81
|
+
:root:has(.md-search-dialog[open]) {
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.md-search-dialog::backdrop {
|
|
86
|
+
background: transparent;
|
|
87
|
+
transition:
|
|
88
|
+
background-color 0.18s,
|
|
89
|
+
overlay 0.18s allow-discrete,
|
|
90
|
+
display 0.18s allow-discrete;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.md-search-dialog[open]::backdrop {
|
|
94
|
+
background: light-dark(rgb(0 0 0 / 0.16), rgb(0 0 0 / 0.5));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@starting-style {
|
|
98
|
+
.md-search-dialog[open] {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: scale(0.98);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.md-search-dialog[open]::backdrop {
|
|
104
|
+
background: transparent;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.md-search-input {
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
width: 100%;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
padding: 0.875rem 1rem;
|
|
113
|
+
border: 0;
|
|
114
|
+
border-block-end: 1px solid var(--md-color-border);
|
|
115
|
+
background: transparent;
|
|
116
|
+
color: var(--md-color-heading);
|
|
117
|
+
font: inherit;
|
|
118
|
+
font-size: 0.9375rem;
|
|
119
|
+
outline: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.md-search-input::placeholder {
|
|
123
|
+
color: var(--md-color-muted);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.md-search-results {
|
|
127
|
+
flex: 1;
|
|
128
|
+
min-height: 0;
|
|
129
|
+
padding: 0.375rem;
|
|
130
|
+
overflow-y: auto;
|
|
131
|
+
overscroll-behavior: contain;
|
|
132
|
+
scroll-padding-block: 0.375rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.md-search-results [role="group"] + [role="group"] {
|
|
136
|
+
margin-block-start: 0.5rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.md-search-results [role="option"] {
|
|
140
|
+
display: block;
|
|
141
|
+
padding: 0.5rem 0.625rem;
|
|
142
|
+
border-radius: 0.5rem;
|
|
143
|
+
color: var(--md-color-text);
|
|
144
|
+
font-size: 0.875rem;
|
|
145
|
+
line-height: 1.45;
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.md-search-results [role="option"][aria-selected="true"] {
|
|
151
|
+
background: var(--md-color-hover);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* The underline keeps matches visible even when the accent is the heading color */
|
|
155
|
+
.md-search-results mark {
|
|
156
|
+
background: none;
|
|
157
|
+
color: var(--md-color-accent);
|
|
158
|
+
text-decoration: underline;
|
|
159
|
+
text-decoration-color: color-mix(in srgb, var(--md-color-accent) 50%, transparent);
|
|
160
|
+
text-decoration-thickness: 1px;
|
|
161
|
+
text-underline-offset: 0.2em;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.md-search-idle,
|
|
165
|
+
.md-search-loading,
|
|
166
|
+
.md-search-empty,
|
|
167
|
+
.md-search-error {
|
|
168
|
+
padding: 2.25rem 1.5rem;
|
|
169
|
+
color: var(--md-color-muted);
|
|
170
|
+
font-size: 0.8125rem;
|
|
171
|
+
text-align: center;
|
|
172
|
+
text-wrap: balance;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.md-search-found {
|
|
176
|
+
color: var(--md-color-muted);
|
|
177
|
+
font-size: 0.75rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.md-search-query {
|
|
181
|
+
color: var(--md-color-heading);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Local engines answer within a frame, so a loading message that appeared at once would only flash */
|
|
185
|
+
.md-search-loading {
|
|
186
|
+
animation: md-search-reveal 0.15s 0.3s backwards;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Over earlier results, a message would push them down on every keystroke; place a spinner there yourself */
|
|
190
|
+
.md-search:not([data-status="loading"]) .md-search-loading {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@keyframes md-search-reveal {
|
|
195
|
+
from {
|
|
196
|
+
opacity: 0;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (prefers-reduced-motion: reduce) {
|
|
201
|
+
.md-search-trigger,
|
|
202
|
+
.md-search-dialog,
|
|
203
|
+
.md-search-dialog::backdrop {
|
|
204
|
+
transition: none;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/* Sidebar: the tree itself. Where it sits and the drawer on narrow screens belong to layout.css. */
|
|
2
|
+
@layer minidocs {
|
|
3
|
+
.md-sidebar {
|
|
4
|
+
color: var(--md-color-text);
|
|
5
|
+
font-size: var(--md-sidebar-font-size);
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.md-sidebar-list {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
list-style: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.md-sidebar-item + .md-sidebar-item {
|
|
16
|
+
margin-block-start: 1px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.md-sidebar-link,
|
|
20
|
+
.md-sidebar-group-title {
|
|
21
|
+
position: relative;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 0.5rem;
|
|
25
|
+
padding: var(--md-sidebar-item-padding-block) var(--md-sidebar-item-padding-inline);
|
|
26
|
+
border-radius: var(--md-radius);
|
|
27
|
+
color: inherit;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
transition:
|
|
31
|
+
color 0.15s,
|
|
32
|
+
background-color 0.15s;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.md-sidebar-link:hover,
|
|
36
|
+
.md-sidebar-group-title:hover {
|
|
37
|
+
background: var(--md-color-hover);
|
|
38
|
+
color: var(--md-color-heading);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.md-sidebar :is(.md-sidebar-link, .md-sidebar-group-title):focus-visible {
|
|
42
|
+
outline: var(--md-focus-ring);
|
|
43
|
+
outline-offset: -2px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.md-sidebar [aria-current="page"] {
|
|
47
|
+
background: var(--md-color-current);
|
|
48
|
+
color: var(--md-color-accent);
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Levels inside a group hang off a hairline; the current page marks its stretch of it */
|
|
53
|
+
.md-sidebar-group .md-sidebar-list {
|
|
54
|
+
margin-block: 1px;
|
|
55
|
+
margin-inline-start: var(--md-sidebar-indent);
|
|
56
|
+
padding-inline-start: var(--md-sidebar-rail-gap);
|
|
57
|
+
border-inline-start: 1px solid var(--md-color-border);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.md-sidebar-group .md-sidebar-list [aria-current="page"] {
|
|
61
|
+
background: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.md-sidebar-group .md-sidebar-list [aria-current="page"]::before {
|
|
65
|
+
content: "";
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset-block: 0.25rem;
|
|
68
|
+
inset-inline-start: calc(-1 * var(--md-sidebar-rail-gap) - 1.5px);
|
|
69
|
+
width: 2px;
|
|
70
|
+
border-radius: 1px;
|
|
71
|
+
background: var(--md-color-accent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.md-sidebar-label {
|
|
75
|
+
display: block;
|
|
76
|
+
margin-block-start: 1.5rem;
|
|
77
|
+
padding: var(--md-sidebar-item-padding-block) var(--md-sidebar-item-padding-inline);
|
|
78
|
+
padding-block-end: 0.25rem;
|
|
79
|
+
color: var(--md-color-heading);
|
|
80
|
+
font-size: 0.8125rem;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.md-sidebar-item:first-child > .md-sidebar-label {
|
|
85
|
+
margin-block-start: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* A labelled section lists its pages without another level of indentation */
|
|
89
|
+
.md-sidebar-label + .md-sidebar-list {
|
|
90
|
+
margin-inline-start: 0;
|
|
91
|
+
padding-inline-start: 0;
|
|
92
|
+
border: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.md-sidebar-group-title {
|
|
96
|
+
list-style: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.md-sidebar-group-title::-webkit-details-marker {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Native markers vary between browsers, so groups draw their own chevron */
|
|
104
|
+
.md-sidebar-group-title::after {
|
|
105
|
+
content: "";
|
|
106
|
+
flex: none;
|
|
107
|
+
width: 0.3125rem;
|
|
108
|
+
height: 0.3125rem;
|
|
109
|
+
margin-inline: auto 0.25rem;
|
|
110
|
+
border-block-end: 1.5px solid currentColor;
|
|
111
|
+
border-inline-end: 1.5px solid currentColor;
|
|
112
|
+
opacity: 0.45;
|
|
113
|
+
transform: rotate(-45deg);
|
|
114
|
+
transition: transform 0.2s;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.md-sidebar-group[data-state="open"] > .md-sidebar-group-title::after {
|
|
118
|
+
transform: rotate(45deg);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.md-sidebar-link[data-external]::after {
|
|
122
|
+
content: "";
|
|
123
|
+
flex: none;
|
|
124
|
+
width: 0.4375rem;
|
|
125
|
+
height: 0.4375rem;
|
|
126
|
+
margin-inline-start: -0.125rem;
|
|
127
|
+
border-block-start: 1.5px solid currentColor;
|
|
128
|
+
border-inline-end: 1.5px solid currentColor;
|
|
129
|
+
opacity: 0.45;
|
|
130
|
+
transform: translateY(-0.125rem);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Always shown here; layout.css hides it where the sidebar has its own column */
|
|
134
|
+
.md-sidebar-trigger {
|
|
135
|
+
display: inline-flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: 0.375rem;
|
|
138
|
+
padding: 0.375rem 0.75rem;
|
|
139
|
+
border: 1px solid var(--md-color-border);
|
|
140
|
+
border-radius: var(--md-radius);
|
|
141
|
+
background: transparent;
|
|
142
|
+
color: var(--md-color-heading);
|
|
143
|
+
font: inherit;
|
|
144
|
+
font-size: 0.875rem;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.md-sidebar-trigger:hover {
|
|
149
|
+
background: var(--md-color-hover);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.md-sidebar-trigger:focus-visible {
|
|
153
|
+
outline: var(--md-focus-ring);
|
|
154
|
+
outline-offset: 2px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (prefers-reduced-motion: reduce) {
|
|
158
|
+
.md-sidebar-group-title::after {
|
|
159
|
+
transition: none;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* Table of contents. */
|
|
2
|
+
@layer minidocs {
|
|
3
|
+
.md-toc {
|
|
4
|
+
position: relative;
|
|
5
|
+
padding-inline-start: var(--md-toc-indent);
|
|
6
|
+
color: var(--md-color-muted);
|
|
7
|
+
font-size: var(--md-toc-font-size);
|
|
8
|
+
line-height: 1.45;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* The track the reading position moves along */
|
|
12
|
+
.md-toc::before {
|
|
13
|
+
content: "";
|
|
14
|
+
position: absolute;
|
|
15
|
+
inset-block: 0;
|
|
16
|
+
inset-inline-start: 0;
|
|
17
|
+
width: 1px;
|
|
18
|
+
background: var(--md-color-border);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* attachToc places the marker on the current link through these variables */
|
|
22
|
+
.md-toc::after {
|
|
23
|
+
content: "";
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
inset-inline-start: -0.5px;
|
|
27
|
+
width: 2px;
|
|
28
|
+
height: var(--md-toc-marker-height, 0);
|
|
29
|
+
border-radius: 1px;
|
|
30
|
+
background: var(--md-color-accent);
|
|
31
|
+
transform: translateY(var(--md-toc-marker-top, 0));
|
|
32
|
+
transition:
|
|
33
|
+
transform 0.25s cubic-bezier(0.32, 0.72, 0, 1),
|
|
34
|
+
height 0.25s cubic-bezier(0.32, 0.72, 0, 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* attachToc sets this while the marker jumps, e.g. on a page opened half way down */
|
|
38
|
+
.md-toc[data-md-toc-instant]::after {
|
|
39
|
+
transition: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.md-toc-list {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
list-style: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.md-toc-list .md-toc-list {
|
|
49
|
+
padding-inline-start: var(--md-toc-indent);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.md-toc-link {
|
|
53
|
+
display: block;
|
|
54
|
+
padding-block: 0.3125rem;
|
|
55
|
+
color: inherit;
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
transition: color 0.15s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.md-toc-link:hover {
|
|
61
|
+
color: var(--md-color-heading);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.md-toc-link:focus-visible {
|
|
65
|
+
border-radius: 2px;
|
|
66
|
+
outline: var(--md-focus-ring);
|
|
67
|
+
outline-offset: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.md-toc-link[aria-current="true"] {
|
|
71
|
+
color: var(--md-color-accent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (prefers-reduced-motion: reduce) {
|
|
75
|
+
.md-toc::after {
|
|
76
|
+
transition: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* All minidocs default styles. To leave a part unstyled, import base.css and the files you want from minidocs/styles/ instead. */
|
|
2
|
+
@import "./styles/base.css";
|
|
3
|
+
@import "./styles/layout.css";
|
|
4
|
+
@import "./styles/sidebar.css";
|
|
5
|
+
@import "./styles/toc.css";
|
|
6
|
+
@import "./styles/prose.css";
|
|
7
|
+
@import "./styles/pager.css";
|
|
8
|
+
@import "./styles/callout.css";
|
|
9
|
+
@import "./styles/search.css";
|