@writedocs/generator 0.13.4 → 0.14.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.
Files changed (89) hide show
  1. package/README.md +28 -28
  2. package/astro.config.mjs +645 -645
  3. package/bin/writedocs.js +359 -356
  4. package/package.json +99 -99
  5. package/src/cli/base-path-layout.js +44 -44
  6. package/src/cli/build-auth.js +135 -135
  7. package/src/cli/build.js +223 -203
  8. package/src/cli/check-built-styles.js +41 -41
  9. package/src/cli/convert.js +124 -124
  10. package/src/cli/dev.js +269 -268
  11. package/src/cli/exit-when-flushed.js +42 -42
  12. package/src/cli/generate-api-pages.js +509 -507
  13. package/src/cli/og-image-worker.js +20 -20
  14. package/src/cli/og-images.js +70 -70
  15. package/src/cli/page-list-watch.js +71 -69
  16. package/src/cli/run-astro.js +97 -97
  17. package/src/cli/run-pagefind.js +154 -154
  18. package/src/cli/write-mcp-files.js +103 -103
  19. package/src/cli/write-redirects-file.js +158 -158
  20. package/src/components/ApiReferencePanel.astro +1792 -1792
  21. package/src/components/AppIcon.astro +51 -51
  22. package/src/components/Card.astro +193 -193
  23. package/src/components/CodeGroup.astro +63 -39
  24. package/src/components/CopyPageMenu.astro +374 -374
  25. package/src/components/Hint.astro +188 -188
  26. package/src/components/Icon.astro +72 -72
  27. package/src/components/Image.astro +165 -165
  28. package/src/components/Tile.astro +67 -67
  29. package/src/components/Video.astro +137 -137
  30. package/src/content.config.ts +219 -203
  31. package/src/layout/BaseLayout.astro +908 -908
  32. package/src/layout/components/AnalyticsScripts.astro +49 -49
  33. package/src/layout/components/Breadcrumbs.astro +98 -98
  34. package/src/layout/components/ConsentBanner.astro +119 -119
  35. package/src/layout/components/MobileMenu.astro +225 -225
  36. package/src/layout/components/NavTree.astro +422 -408
  37. package/src/layout/components/Sidebar.astro +232 -232
  38. package/src/layout/components/SiteFooter.astro +87 -87
  39. package/src/layout/components/TopBar.astro +386 -386
  40. package/src/layout/styles/base.css +332 -326
  41. package/src/layout/styles/mobile-menu.css +285 -285
  42. package/src/lib/agent-markdown.js +164 -164
  43. package/src/lib/asset-dimensions.js +89 -89
  44. package/src/lib/base-path.js +90 -90
  45. package/src/lib/cli-report.js +22 -22
  46. package/src/lib/code-line-numbers.js +13 -0
  47. package/src/lib/config-schema.js +12 -1
  48. package/src/lib/config-schema.ts +2523 -2509
  49. package/src/lib/config.ts +1331 -1316
  50. package/src/lib/consent.js +108 -108
  51. package/src/lib/content-check.js +4 -1
  52. package/src/lib/content-store-reload-integration.js +101 -101
  53. package/src/lib/drafts.js +186 -0
  54. package/src/lib/icon-data-dev.js +53 -53
  55. package/src/lib/image-size.js +152 -152
  56. package/src/lib/json-schema-descriptions.js +228 -228
  57. package/src/lib/link-check.js +553 -544
  58. package/src/lib/llms-index.ts +90 -90
  59. package/src/lib/mcp-dev-integration.js +65 -65
  60. package/src/lib/mcp-index.ts +102 -102
  61. package/src/lib/mintlify-convert.js +605 -605
  62. package/src/lib/moved-api-pages.js +49 -49
  63. package/src/lib/og-cards.js +33 -33
  64. package/src/lib/og-image.js +235 -235
  65. package/src/lib/openapi-dev-status.js +80 -80
  66. package/src/lib/openapi-reload-integration.js +193 -193
  67. package/src/lib/pages.js +346 -312
  68. package/src/lib/project-files-integration.js +116 -116
  69. package/src/lib/project-files.js +137 -137
  70. package/src/lib/rehype-base-path.js +62 -62
  71. package/src/lib/rehype-image-loading.js +71 -71
  72. package/src/lib/robots-txt.js +21 -21
  73. package/src/lib/search-scope.js +44 -44
  74. package/src/lib/selector-placement.js +50 -50
  75. package/src/lib/seo-tags.js +157 -155
  76. package/src/lib/shiki-code-block.js +7 -1
  77. package/src/lib/site-base.ts +27 -27
  78. package/src/lib/styles-asset-integration.js +291 -291
  79. package/src/lib/wdignore-cases.json +195 -195
  80. package/src/lib/wdignore.js +177 -177
  81. package/src/pages/404.astro +63 -63
  82. package/src/pages/[...slug].astro +1773 -1608
  83. package/src/pages/[...slug].md.ts +93 -93
  84. package/src/pages/llms-full.txt.ts +88 -88
  85. package/src/pages/og/[...slug].png.ts +63 -63
  86. package/src/scripts/mobile-menu.ts +80 -80
  87. package/src/scripts/search.ts +245 -245
  88. package/src/scripts/sidebar-scroll.ts +61 -61
  89. package/src/styles/global.css +40 -40
@@ -1,285 +1,285 @@
1
- /* MobileMenu.astro's own styling - the <= 860px drawer panel itself (not
2
- the hamburger toggle button that opens it, which lives in topbar.css
3
- alongside the rest of TopBar.astro's own markup). */
4
-
5
- .wd-mobile-menu { display: none; }
6
- @media (max-width: 860px) {
7
- .wd-mobile-menu {
8
- display: block;
9
- /* Always laid out (positioned off-screen via the panel's own
10
- transform below), not display:none, so .open can transition
11
- smoothly instead of snapping - a transition can't animate *out of*
12
- display:none. visibility is what keeps it non-visible/out of the
13
- tab order while closed (visibility: hidden also removes descendants
14
- from hit-testing and the accessibility tree); initMobileMenu()
15
- (src/scripts/mobile-menu.ts) toggles the `inert` attribute
16
- alongside .open as a second, JS-driven layer of the same
17
- guarantee, since not every browser/AT combination is guaranteed to
18
- treat visibility:hidden identically. pointer-events is deliberately
19
- NOT toggled here on the container itself - see the comment below
20
- for why: this element's own box spans the *entire* viewport
21
- (position: fixed; inset: 0), so giving *it* pointer-events: auto
22
- would make its empty top strip (behind the topbar) swallow clicks
23
- meant for the topbar underneath, even though nothing of this
24
- element's own visible content is painted there. */
25
- visibility: hidden;
26
- }
27
- .wd-mobile-menu.open {
28
- visibility: visible;
29
- }
30
- }
31
- .wd-mobile-menu {
32
- position: fixed;
33
- inset: 0;
34
- z-index: 40;
35
- /* Never toggled: this box covers the full viewport (inset: 0). If this
36
- were pointer-events: auto while open, its own box would be a valid
37
- hit target everywhere within it (an element with no background is
38
- not "invisible" to hit-testing - only pointer-events: none makes it
39
- click-through), and being a higher z-index than the topbar, would
40
- swallow clicks meant for whatever's underneath. Interactivity is
41
- granted instead to the backdrop and panel individually below. */
42
- pointer-events: none;
43
- }
44
- .wd-mobile-menu-backdrop,
45
- .wd-mobile-menu-panel {
46
- pointer-events: none;
47
- }
48
- .wd-mobile-menu.open .wd-mobile-menu-backdrop,
49
- .wd-mobile-menu.open .wd-mobile-menu-panel {
50
- pointer-events: auto;
51
- }
52
- .wd-mobile-menu-backdrop {
53
- position: absolute;
54
- /* Full viewport (top: 0, not 5rem) - the panel itself also reaches
55
- top: 0 with its own header (brand/close/theme, see
56
- .wd-mobile-menu-header below) replicating the real topbar's row, so
57
- there's nothing under the backdrop still worth keeping
58
- un-dimmed/interactive: the real topbar is either fully covered by the
59
- panel's own opaque background (its width) or genuinely just dimmed
60
- decoration past it. */
61
- inset: 0;
62
- background: rgba(0, 0, 0, 0.4);
63
- opacity: 0;
64
- transition: opacity 0.25s ease;
65
- }
66
- .wd-mobile-menu.open .wd-mobile-menu-backdrop {
67
- opacity: 1;
68
- }
69
- /* A left-anchored drawer (Mintlify's own mobile nav - the reference this
70
- was built against - works the same way), not a centered/inset floating
71
- card: flush to the screen's left edge, full viewport height top to
72
- bottom (top: 0, not just below the topbar - see .wd-mobile-menu-header
73
- below for why), sliding in from off-screen rather than just appearing. */
74
- .wd-mobile-menu-panel {
75
- position: absolute;
76
- inset: 0 auto 0 0;
77
- width: min(88vw, 340px);
78
- display: flex;
79
- flex-direction: column;
80
- /* Same --wd-navbar-background as .wd-topbar (topbar.css) - this panel's
81
- own header row replicates the real topbar's brand row (see the
82
- comment on .wd-mobile-menu-header below), so it should share its
83
- background too rather than looking like a separate, differently-
84
- colored surface once a site configures theme.colors.navbar. */
85
- background: var(--wd-navbar-background);
86
- border-right: 1px solid var(--wd-border);
87
- box-shadow: 8px 0 24px rgba(0, 0, 0, 0.15);
88
- transform: translateX(-100%);
89
- transition: transform 0.25s ease;
90
- }
91
- .wd-mobile-menu.open .wd-mobile-menu-panel {
92
- transform: translateX(0);
93
- }
94
- /* Replicates the real topbar's brand row - same left-to-right order
95
- (close-toggle, brand, theme) - as a fixed header pinned to the top of
96
- the panel, so it reads as one continuous navbar with the real one
97
- underneath rather than a separate piece with a seam. `flex-shrink: 0`
98
- keeps it pinned above .wd-mobile-menu-scroll's own independent
99
- scrolling below. .wd-topbar-brand and .wd-theme-toggle themselves are
100
- defined in topbar.css, imported by this component too - see this
101
- file's own top comment. */
102
- .wd-mobile-menu-header {
103
- display: flex;
104
- align-items: center;
105
- gap: 0.5rem;
106
- flex-shrink: 0;
107
- padding: 0.75rem 1rem;
108
- border-bottom: 1px solid var(--wd-border);
109
- }
110
- .wd-mobile-menu-header .wd-topbar-brand {
111
- flex: 1;
112
- min-width: 0;
113
- }
114
- .wd-mobile-menu-close {
115
- display: flex;
116
- align-items: center;
117
- justify-content: center;
118
- width: 2rem;
119
- height: 2rem;
120
- padding: 0;
121
- border: none;
122
- border-radius: 0.4rem;
123
- background: none;
124
- cursor: pointer;
125
- /* --wd-navbar-foreground-muted, not --wd-text-muted - this button sits
126
- on the panel's own --wd-navbar-background (see .wd-mobile-menu-panel
127
- above), same reasoning as topbar.css's identical swap for its
128
- desktop-row counterparts. Falls back to var(--wd-text-muted) when
129
- theme.navbar has no `foreground` set, so this is a no-op unless a
130
- site actually configures one. */
131
- color: var(--wd-navbar-foreground-muted);
132
- flex-shrink: 0;
133
- }
134
- .wd-mobile-menu-close:hover { color: var(--wd-navbar-foreground); background: var(--wd-surface); }
135
- .wd-mobile-menu-scroll {
136
- flex: 1;
137
- min-height: 0;
138
- overflow-y: auto;
139
- padding: 1rem 0.75rem;
140
- }
141
- .wd-mobile-menu-selectors {
142
- display: flex;
143
- flex-direction: column;
144
- gap: 0.5rem;
145
- margin-bottom: 0.75rem;
146
- padding-bottom: 0.75rem;
147
- border-bottom: 1px solid var(--wd-border);
148
- }
149
- /* A page without a sidebar (`mode: custom`): nothing below to divide off. */
150
- .wd-mobile-menu-selectors:last-child {
151
- margin-bottom: 0;
152
- padding-bottom: 0;
153
- border-bottom: none;
154
- }
155
- /* position: relative makes this the containing block for its own
156
- .wd-mobile-accordion-options panel below, which floats over whatever
157
- comes after it instead of pushing it down the page - a `<details>`'s
158
- open content is normal, in-flow block content by default, which *would*
159
- push later siblings down; taking the options panel out of flow via
160
- position: absolute is what avoids that. The [open] z-index bump is what
161
- then guarantees *this* accordion's floating panel paints above the
162
- *later*, still-closed accordion rows below it: any position: relative
163
- element - open or not - already paints above its plain in-flow siblings
164
- regardless of z-index (per CSS's stacking rules), but two position:
165
- relative siblings with no z-index of their own paint in DOM order, i.e.
166
- a later closed row would otherwise sit on top of an earlier open one's
167
- panel despite being visually "behind" it. */
168
- .wd-mobile-accordion {
169
- position: relative;
170
- border: 1px solid var(--wd-border);
171
- border-radius: 0.5rem;
172
- }
173
- .wd-mobile-accordion[open] {
174
- z-index: 5;
175
- }
176
- /* --wd-navbar-foreground, not --wd-text: this row (and every other
177
- selector row/link directly inside .wd-mobile-menu-scroll, down through
178
- .wd-mobile-menu-link below) sits directly on .wd-mobile-menu-panel's own
179
- --wd-navbar-background, same as the header above - only the *floating*
180
- .wd-mobile-accordion-options-panel a click reveals (further down this
181
- file) sits on the ordinary --wd-background instead, which is why that
182
- one's own rules are deliberately left on --wd-text/--wd-primary,
183
- unchanged. */
184
- .wd-mobile-accordion-trigger {
185
- display: flex;
186
- align-items: center;
187
- gap: 0.5rem;
188
- padding: 0.65rem 0.75rem;
189
- cursor: pointer;
190
- font-size: 0.9rem;
191
- color: var(--wd-navbar-foreground);
192
- list-style: none;
193
- }
194
- .wd-mobile-accordion-trigger::-webkit-details-marker { display: none; }
195
- .wd-mobile-accordion-trigger::marker { content: ''; }
196
- .wd-mobile-accordion-label { flex: 1; min-width: 0; }
197
- .wd-mobile-accordion-caret {
198
- flex-shrink: 0;
199
- color: var(--wd-navbar-foreground-muted);
200
- transition: transform 0.15s ease;
201
- }
202
- .wd-mobile-accordion[open] > .wd-mobile-accordion-trigger .wd-mobile-accordion-caret {
203
- transform: rotate(180deg);
204
- }
205
- /* Floats directly below the trigger (top: 100%, same "padding-top for the
206
- gap, not a top offset, so there's no dead unhoverable/untappable strip
207
- between them" reasoning as .wd-dropdown-menu in dropdown.css) rather
208
- than sitting in normal flow beneath it, so opening one of these
209
- overlays the accordion rows/sidebar content below it instead of shoving
210
- them further down the page. */
211
- .wd-mobile-accordion-options {
212
- position: absolute;
213
- top: 100%;
214
- left: 0;
215
- right: 0;
216
- padding-top: 0.35rem;
217
- }
218
- .wd-mobile-accordion-options-panel {
219
- display: flex;
220
- flex-direction: column;
221
- gap: 0.3rem;
222
- max-height: 45vh;
223
- overflow-y: auto;
224
- background: var(--wd-background);
225
- border: 1px solid var(--wd-border);
226
- border-radius: 0.5rem;
227
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
228
- padding: 0.4rem;
229
- }
230
- .wd-mobile-accordion-options a {
231
- display: flex;
232
- align-items: center;
233
- gap: 0.5rem;
234
- padding: 0.55rem 0.65rem;
235
- border: 1.5px solid transparent;
236
- border-radius: 0.4rem;
237
- text-decoration: none;
238
- color: var(--wd-text);
239
- font-size: 0.9rem;
240
- }
241
- .wd-mobile-accordion-options a:hover { background: var(--wd-surface); }
242
- .wd-mobile-accordion-options a.active {
243
- border-color: var(--wd-primary);
244
- color: var(--wd-primary);
245
- font-weight: 500;
246
- }
247
- .wd-mobile-accordion-option-label { flex: 1; min-width: 0; }
248
- .wd-mobile-accordion-check { flex-shrink: 0; color: var(--wd-primary); }
249
- .wd-mobile-menu-link {
250
- display: flex;
251
- align-items: center;
252
- gap: 0.5rem;
253
- padding: 0.65rem 0.75rem;
254
- border: 1px solid var(--wd-border);
255
- border-radius: 0.5rem;
256
- text-decoration: none;
257
- color: var(--wd-navbar-foreground);
258
- font-size: 0.9rem;
259
- }
260
- .wd-mobile-menu-link:hover { background: var(--wd-surface); }
261
- /* An item's options with none chosen (MobileMenu.astro) - an open list, in
262
- one box like a closed level's row. */
263
- .wd-mobile-menu-choices {
264
- display: flex;
265
- flex-direction: column;
266
- gap: 0.15rem;
267
- padding: 0.3rem;
268
- border: 1px solid var(--wd-border);
269
- border-radius: 0.5rem;
270
- }
271
- .wd-mobile-menu-choices a {
272
- display: flex;
273
- align-items: center;
274
- gap: 0.5rem;
275
- padding: 0.5rem 0.45rem;
276
- border-radius: 0.4rem;
277
- text-decoration: none;
278
- color: var(--wd-navbar-foreground);
279
- font-size: 0.9rem;
280
- }
281
- .wd-mobile-menu-choices a:hover { background: var(--wd-surface); }
282
- /* The sidebar, once the menu's script has moved it in here, needs none of
283
- .wd-sidebar-col's own column sizing (width/border/min-height) - it's just
284
- flowing content inside an already-padded, already-scrollable panel. */
285
- .wd-mobile-menu-sidebar .wd-sidebar { padding: 0; }
1
+ /* MobileMenu.astro's own styling - the <= 860px drawer panel itself (not
2
+ the hamburger toggle button that opens it, which lives in topbar.css
3
+ alongside the rest of TopBar.astro's own markup). */
4
+
5
+ .wd-mobile-menu { display: none; }
6
+ @media (max-width: 860px) {
7
+ .wd-mobile-menu {
8
+ display: block;
9
+ /* Always laid out (positioned off-screen via the panel's own
10
+ transform below), not display:none, so .open can transition
11
+ smoothly instead of snapping - a transition can't animate *out of*
12
+ display:none. visibility is what keeps it non-visible/out of the
13
+ tab order while closed (visibility: hidden also removes descendants
14
+ from hit-testing and the accessibility tree); initMobileMenu()
15
+ (src/scripts/mobile-menu.ts) toggles the `inert` attribute
16
+ alongside .open as a second, JS-driven layer of the same
17
+ guarantee, since not every browser/AT combination is guaranteed to
18
+ treat visibility:hidden identically. pointer-events is deliberately
19
+ NOT toggled here on the container itself - see the comment below
20
+ for why: this element's own box spans the *entire* viewport
21
+ (position: fixed; inset: 0), so giving *it* pointer-events: auto
22
+ would make its empty top strip (behind the topbar) swallow clicks
23
+ meant for the topbar underneath, even though nothing of this
24
+ element's own visible content is painted there. */
25
+ visibility: hidden;
26
+ }
27
+ .wd-mobile-menu.open {
28
+ visibility: visible;
29
+ }
30
+ }
31
+ .wd-mobile-menu {
32
+ position: fixed;
33
+ inset: 0;
34
+ z-index: 40;
35
+ /* Never toggled: this box covers the full viewport (inset: 0). If this
36
+ were pointer-events: auto while open, its own box would be a valid
37
+ hit target everywhere within it (an element with no background is
38
+ not "invisible" to hit-testing - only pointer-events: none makes it
39
+ click-through), and being a higher z-index than the topbar, would
40
+ swallow clicks meant for whatever's underneath. Interactivity is
41
+ granted instead to the backdrop and panel individually below. */
42
+ pointer-events: none;
43
+ }
44
+ .wd-mobile-menu-backdrop,
45
+ .wd-mobile-menu-panel {
46
+ pointer-events: none;
47
+ }
48
+ .wd-mobile-menu.open .wd-mobile-menu-backdrop,
49
+ .wd-mobile-menu.open .wd-mobile-menu-panel {
50
+ pointer-events: auto;
51
+ }
52
+ .wd-mobile-menu-backdrop {
53
+ position: absolute;
54
+ /* Full viewport (top: 0, not 5rem) - the panel itself also reaches
55
+ top: 0 with its own header (brand/close/theme, see
56
+ .wd-mobile-menu-header below) replicating the real topbar's row, so
57
+ there's nothing under the backdrop still worth keeping
58
+ un-dimmed/interactive: the real topbar is either fully covered by the
59
+ panel's own opaque background (its width) or genuinely just dimmed
60
+ decoration past it. */
61
+ inset: 0;
62
+ background: rgba(0, 0, 0, 0.4);
63
+ opacity: 0;
64
+ transition: opacity 0.25s ease;
65
+ }
66
+ .wd-mobile-menu.open .wd-mobile-menu-backdrop {
67
+ opacity: 1;
68
+ }
69
+ /* A left-anchored drawer (Mintlify's own mobile nav - the reference this
70
+ was built against - works the same way), not a centered/inset floating
71
+ card: flush to the screen's left edge, full viewport height top to
72
+ bottom (top: 0, not just below the topbar - see .wd-mobile-menu-header
73
+ below for why), sliding in from off-screen rather than just appearing. */
74
+ .wd-mobile-menu-panel {
75
+ position: absolute;
76
+ inset: 0 auto 0 0;
77
+ width: min(88vw, 340px);
78
+ display: flex;
79
+ flex-direction: column;
80
+ /* Same --wd-navbar-background as .wd-topbar (topbar.css) - this panel's
81
+ own header row replicates the real topbar's brand row (see the
82
+ comment on .wd-mobile-menu-header below), so it should share its
83
+ background too rather than looking like a separate, differently-
84
+ colored surface once a site configures theme.colors.navbar. */
85
+ background: var(--wd-navbar-background);
86
+ border-right: 1px solid var(--wd-border);
87
+ box-shadow: 8px 0 24px rgba(0, 0, 0, 0.15);
88
+ transform: translateX(-100%);
89
+ transition: transform 0.25s ease;
90
+ }
91
+ .wd-mobile-menu.open .wd-mobile-menu-panel {
92
+ transform: translateX(0);
93
+ }
94
+ /* Replicates the real topbar's brand row - same left-to-right order
95
+ (close-toggle, brand, theme) - as a fixed header pinned to the top of
96
+ the panel, so it reads as one continuous navbar with the real one
97
+ underneath rather than a separate piece with a seam. `flex-shrink: 0`
98
+ keeps it pinned above .wd-mobile-menu-scroll's own independent
99
+ scrolling below. .wd-topbar-brand and .wd-theme-toggle themselves are
100
+ defined in topbar.css, imported by this component too - see this
101
+ file's own top comment. */
102
+ .wd-mobile-menu-header {
103
+ display: flex;
104
+ align-items: center;
105
+ gap: 0.5rem;
106
+ flex-shrink: 0;
107
+ padding: 0.75rem 1rem;
108
+ border-bottom: 1px solid var(--wd-border);
109
+ }
110
+ .wd-mobile-menu-header .wd-topbar-brand {
111
+ flex: 1;
112
+ min-width: 0;
113
+ }
114
+ .wd-mobile-menu-close {
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ width: 2rem;
119
+ height: 2rem;
120
+ padding: 0;
121
+ border: none;
122
+ border-radius: 0.4rem;
123
+ background: none;
124
+ cursor: pointer;
125
+ /* --wd-navbar-foreground-muted, not --wd-text-muted - this button sits
126
+ on the panel's own --wd-navbar-background (see .wd-mobile-menu-panel
127
+ above), same reasoning as topbar.css's identical swap for its
128
+ desktop-row counterparts. Falls back to var(--wd-text-muted) when
129
+ theme.navbar has no `foreground` set, so this is a no-op unless a
130
+ site actually configures one. */
131
+ color: var(--wd-navbar-foreground-muted);
132
+ flex-shrink: 0;
133
+ }
134
+ .wd-mobile-menu-close:hover { color: var(--wd-navbar-foreground); background: var(--wd-surface); }
135
+ .wd-mobile-menu-scroll {
136
+ flex: 1;
137
+ min-height: 0;
138
+ overflow-y: auto;
139
+ padding: 1rem 0.75rem;
140
+ }
141
+ .wd-mobile-menu-selectors {
142
+ display: flex;
143
+ flex-direction: column;
144
+ gap: 0.5rem;
145
+ margin-bottom: 0.75rem;
146
+ padding-bottom: 0.75rem;
147
+ border-bottom: 1px solid var(--wd-border);
148
+ }
149
+ /* A page without a sidebar (`mode: custom`): nothing below to divide off. */
150
+ .wd-mobile-menu-selectors:last-child {
151
+ margin-bottom: 0;
152
+ padding-bottom: 0;
153
+ border-bottom: none;
154
+ }
155
+ /* position: relative makes this the containing block for its own
156
+ .wd-mobile-accordion-options panel below, which floats over whatever
157
+ comes after it instead of pushing it down the page - a `<details>`'s
158
+ open content is normal, in-flow block content by default, which *would*
159
+ push later siblings down; taking the options panel out of flow via
160
+ position: absolute is what avoids that. The [open] z-index bump is what
161
+ then guarantees *this* accordion's floating panel paints above the
162
+ *later*, still-closed accordion rows below it: any position: relative
163
+ element - open or not - already paints above its plain in-flow siblings
164
+ regardless of z-index (per CSS's stacking rules), but two position:
165
+ relative siblings with no z-index of their own paint in DOM order, i.e.
166
+ a later closed row would otherwise sit on top of an earlier open one's
167
+ panel despite being visually "behind" it. */
168
+ .wd-mobile-accordion {
169
+ position: relative;
170
+ border: 1px solid var(--wd-border);
171
+ border-radius: 0.5rem;
172
+ }
173
+ .wd-mobile-accordion[open] {
174
+ z-index: 5;
175
+ }
176
+ /* --wd-navbar-foreground, not --wd-text: this row (and every other
177
+ selector row/link directly inside .wd-mobile-menu-scroll, down through
178
+ .wd-mobile-menu-link below) sits directly on .wd-mobile-menu-panel's own
179
+ --wd-navbar-background, same as the header above - only the *floating*
180
+ .wd-mobile-accordion-options-panel a click reveals (further down this
181
+ file) sits on the ordinary --wd-background instead, which is why that
182
+ one's own rules are deliberately left on --wd-text/--wd-primary,
183
+ unchanged. */
184
+ .wd-mobile-accordion-trigger {
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 0.5rem;
188
+ padding: 0.65rem 0.75rem;
189
+ cursor: pointer;
190
+ font-size: 0.9rem;
191
+ color: var(--wd-navbar-foreground);
192
+ list-style: none;
193
+ }
194
+ .wd-mobile-accordion-trigger::-webkit-details-marker { display: none; }
195
+ .wd-mobile-accordion-trigger::marker { content: ''; }
196
+ .wd-mobile-accordion-label { flex: 1; min-width: 0; }
197
+ .wd-mobile-accordion-caret {
198
+ flex-shrink: 0;
199
+ color: var(--wd-navbar-foreground-muted);
200
+ transition: transform 0.15s ease;
201
+ }
202
+ .wd-mobile-accordion[open] > .wd-mobile-accordion-trigger .wd-mobile-accordion-caret {
203
+ transform: rotate(180deg);
204
+ }
205
+ /* Floats directly below the trigger (top: 100%, same "padding-top for the
206
+ gap, not a top offset, so there's no dead unhoverable/untappable strip
207
+ between them" reasoning as .wd-dropdown-menu in dropdown.css) rather
208
+ than sitting in normal flow beneath it, so opening one of these
209
+ overlays the accordion rows/sidebar content below it instead of shoving
210
+ them further down the page. */
211
+ .wd-mobile-accordion-options {
212
+ position: absolute;
213
+ top: 100%;
214
+ left: 0;
215
+ right: 0;
216
+ padding-top: 0.35rem;
217
+ }
218
+ .wd-mobile-accordion-options-panel {
219
+ display: flex;
220
+ flex-direction: column;
221
+ gap: 0.3rem;
222
+ max-height: 45vh;
223
+ overflow-y: auto;
224
+ background: var(--wd-background);
225
+ border: 1px solid var(--wd-border);
226
+ border-radius: 0.5rem;
227
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
228
+ padding: 0.4rem;
229
+ }
230
+ .wd-mobile-accordion-options a {
231
+ display: flex;
232
+ align-items: center;
233
+ gap: 0.5rem;
234
+ padding: 0.55rem 0.65rem;
235
+ border: 1.5px solid transparent;
236
+ border-radius: 0.4rem;
237
+ text-decoration: none;
238
+ color: var(--wd-text);
239
+ font-size: 0.9rem;
240
+ }
241
+ .wd-mobile-accordion-options a:hover { background: var(--wd-surface); }
242
+ .wd-mobile-accordion-options a.active {
243
+ border-color: var(--wd-primary);
244
+ color: var(--wd-primary);
245
+ font-weight: 500;
246
+ }
247
+ .wd-mobile-accordion-option-label { flex: 1; min-width: 0; }
248
+ .wd-mobile-accordion-check { flex-shrink: 0; color: var(--wd-primary); }
249
+ .wd-mobile-menu-link {
250
+ display: flex;
251
+ align-items: center;
252
+ gap: 0.5rem;
253
+ padding: 0.65rem 0.75rem;
254
+ border: 1px solid var(--wd-border);
255
+ border-radius: 0.5rem;
256
+ text-decoration: none;
257
+ color: var(--wd-navbar-foreground);
258
+ font-size: 0.9rem;
259
+ }
260
+ .wd-mobile-menu-link:hover { background: var(--wd-surface); }
261
+ /* An item's options with none chosen (MobileMenu.astro) - an open list, in
262
+ one box like a closed level's row. */
263
+ .wd-mobile-menu-choices {
264
+ display: flex;
265
+ flex-direction: column;
266
+ gap: 0.15rem;
267
+ padding: 0.3rem;
268
+ border: 1px solid var(--wd-border);
269
+ border-radius: 0.5rem;
270
+ }
271
+ .wd-mobile-menu-choices a {
272
+ display: flex;
273
+ align-items: center;
274
+ gap: 0.5rem;
275
+ padding: 0.5rem 0.45rem;
276
+ border-radius: 0.4rem;
277
+ text-decoration: none;
278
+ color: var(--wd-navbar-foreground);
279
+ font-size: 0.9rem;
280
+ }
281
+ .wd-mobile-menu-choices a:hover { background: var(--wd-surface); }
282
+ /* The sidebar, once the menu's script has moved it in here, needs none of
283
+ .wd-sidebar-col's own column sizing (width/border/min-height) - it's just
284
+ flowing content inside an already-padded, already-scrollable panel. */
285
+ .wd-mobile-menu-sidebar .wd-sidebar { padding: 0; }