@writedocs/generator 0.10.19 → 0.11.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/astro.config.mjs +32 -8
- package/package.json +96 -93
- package/src/cli/base-path-layout.js +44 -0
- package/src/cli/build.js +177 -168
- package/src/cli/check-built-styles.js +41 -33
- package/src/cli/dev.js +261 -244
- package/src/cli/generate-api-pages.js +9 -5
- package/src/cli/page-list-watch.js +69 -66
- package/src/cli/run-pagefind.js +154 -148
- package/src/cli/write-mcp-files.js +103 -96
- package/src/cli/write-redirects-file.js +25 -8
- package/src/components/AppIcon.astro +51 -50
- package/src/components/Card.astro +193 -192
- package/src/components/CopyPageMenu.astro +374 -370
- package/src/components/Hint.astro +188 -187
- package/src/components/Icon.astro +72 -71
- package/src/components/Image.astro +165 -164
- package/src/components/Tile.astro +67 -66
- package/src/components/Video.astro +137 -136
- package/src/layout/BaseLayout.astro +21 -12
- package/src/layout/components/AnalyticsScripts.astro +6 -2
- package/src/layout/components/Breadcrumbs.astro +98 -97
- package/src/layout/components/ConsentBanner.astro +119 -118
- package/src/layout/components/MobileMenu.astro +229 -228
- package/src/layout/components/NavTree.astro +393 -392
- package/src/layout/components/Sidebar.astro +232 -231
- package/src/layout/components/SiteFooter.astro +87 -86
- package/src/layout/components/TopBar.astro +386 -385
- package/src/lib/agent-markdown.js +164 -162
- package/src/lib/asset-dimensions.js +89 -0
- package/src/lib/base-path.js +90 -0
- package/src/lib/config-schema.js +10 -0
- package/src/lib/config-schema.ts +17 -0
- package/src/lib/config.ts +1314 -1289
- package/src/lib/consent.js +108 -102
- package/src/lib/image-size.js +152 -140
- package/src/lib/json-schema-descriptions.js +1 -0
- package/src/lib/link-check.js +42 -4
- package/src/lib/llms-index.ts +90 -88
- package/src/lib/mcp-dev-integration.js +65 -60
- package/src/lib/mcp-index.ts +102 -101
- package/src/lib/pages.js +312 -304
- package/src/lib/project-files-integration.js +116 -61
- package/src/lib/project-files.js +137 -126
- package/src/lib/project-ignore.js +46 -0
- package/src/lib/rehype-base-path.js +62 -0
- package/src/lib/rehype-image-loading.js +71 -71
- package/src/lib/robots-txt.js +21 -16
- package/src/lib/seo-tags.js +155 -140
- package/src/lib/site-base.ts +27 -0
- package/src/lib/styles-asset-integration.js +58 -12
- package/src/lib/wdignore-cases.json +195 -0
- package/src/lib/wdignore.js +177 -0
- package/src/pages/404.astro +63 -62
- package/src/pages/[...slug].astro +1604 -1597
- package/src/pages/[...slug].md.ts +93 -93
- package/src/pages/llms-full.txt.ts +88 -86
- package/src/scripts/search.ts +241 -237
- package/writedocs.schema.json +6 -0
|
@@ -1,231 +1,232 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { isExternalHref, type NavTreeNode, type Selector } from "../../lib/config";
|
|
3
|
-
import NavTree from "./NavTree.astro";
|
|
4
|
-
import { currentOption } from "../../lib/selector-placement.js";
|
|
5
|
-
import AppIcon from "../../components/AppIcon.astro";
|
|
6
|
-
// Two colorways of the same "Powered by writedocs" mark, not a
|
|
7
|
-
// theme-matched pair in the wd-logo-light/wd-logo-dark sense (that
|
|
8
|
-
// convention names each file by which theme it's *shown in*) - these
|
|
9
|
-
// are named by the mark's own ink color instead, and the darker one
|
|
10
|
-
// (wd_watermark_dark.png) is actually the better-contrast choice
|
|
11
|
-
// against the light theme's near-white background, while the lighter,
|
|
12
|
-
// unsuffixed one reads better against the dark theme's near-black one.
|
|
13
|
-
// Imported (not referenced by string path) since this is a
|
|
14
|
-
// framework-bundled asset living in src/assets, not something any
|
|
15
|
-
// individual site's own public/ folder provides - astro.config.mjs
|
|
16
|
-
// points publicDir at the site's public/ instead, so a plain <img
|
|
17
|
-
// src="/..."> here would 404 on every real site build.
|
|
18
|
-
import watermarkForLightTheme from "../../assets/wd_watermark_dark.png";
|
|
19
|
-
import watermarkForDarkTheme from "../../assets/wd_watermark.png";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<img src={
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
border
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
flex:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
font-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
font-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
display:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
1
|
+
---
|
|
2
|
+
import { isExternalHref, type NavTreeNode, type Selector } from "../../lib/config";
|
|
3
|
+
import NavTree from "./NavTree.astro";
|
|
4
|
+
import { currentOption } from "../../lib/selector-placement.js";
|
|
5
|
+
import AppIcon from "../../components/AppIcon.astro";
|
|
6
|
+
// Two colorways of the same "Powered by writedocs" mark, not a
|
|
7
|
+
// theme-matched pair in the wd-logo-light/wd-logo-dark sense (that
|
|
8
|
+
// convention names each file by which theme it's *shown in*) - these
|
|
9
|
+
// are named by the mark's own ink color instead, and the darker one
|
|
10
|
+
// (wd_watermark_dark.png) is actually the better-contrast choice
|
|
11
|
+
// against the light theme's near-white background, while the lighter,
|
|
12
|
+
// unsuffixed one reads better against the dark theme's near-black one.
|
|
13
|
+
// Imported (not referenced by string path) since this is a
|
|
14
|
+
// framework-bundled asset living in src/assets, not something any
|
|
15
|
+
// individual site's own public/ folder provides - astro.config.mjs
|
|
16
|
+
// points publicDir at the site's public/ instead, so a plain <img
|
|
17
|
+
// src="/..."> here would 404 on every real site build.
|
|
18
|
+
import watermarkForLightTheme from "../../assets/wd_watermark_dark.png";
|
|
19
|
+
import watermarkForDarkTheme from "../../assets/wd_watermark.png";
|
|
20
|
+
import { siteHref } from '../../lib/site-base';
|
|
21
|
+
|
|
22
|
+
// Deploy-time-only opt-out, not a writedocs.json field: a site's own writedocs.json
|
|
23
|
+
// is part of its checked-in content (something the author controls), while
|
|
24
|
+
// this is meant to be set by whatever's actually running the build (CI,
|
|
25
|
+
// hosting platform env config, etc.) without touching that content - the
|
|
26
|
+
// same reasoning as WRITEDOCS_CONTENT_DIR/WRITEDOCS_PACKAGE_ROOT already
|
|
27
|
+
// being plain process.env reads rather than config fields (see
|
|
28
|
+
// astro.config.mjs and this component's sibling files). Any value other
|
|
29
|
+
// than the literal string "true" leaves the watermark showing, so an
|
|
30
|
+
// unset/misspelled var fails toward the visible, "unmodified" default
|
|
31
|
+
// rather than silently hiding it.
|
|
32
|
+
const watermarkDisabled = process.env.WRITEDOCS_DISABLE_WATERMARK === "true";
|
|
33
|
+
|
|
34
|
+
interface Props {
|
|
35
|
+
navTree: NavTreeNode[];
|
|
36
|
+
hrefForSlug: (slug: string) => string;
|
|
37
|
+
currentSlug: string;
|
|
38
|
+
// Switchers that sit at the top of the sidebar instead of the top bar -
|
|
39
|
+
// products inside a tab or dropdown (lib/selector-placement.js).
|
|
40
|
+
switchers?: Selector[];
|
|
41
|
+
}
|
|
42
|
+
const { navTree, hrefForSlug, currentSlug, switchers = [] } = Astro.props as Props;
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
<nav class="wd-sidebar">
|
|
46
|
+
{switchers.map((sel) => {
|
|
47
|
+
const current = currentOption(sel);
|
|
48
|
+
return (
|
|
49
|
+
<div class="wd-dropdown wd-sidebar-switcher" data-selector-kind={sel.kind}>
|
|
50
|
+
<button type="button" class="wd-dropdown-trigger wd-sidebar-switcher-trigger" aria-expanded="false">
|
|
51
|
+
<AppIcon icon={current.icon} class="wd-tab-icon wd-sidebar-switcher-icon" />
|
|
52
|
+
<span class="wd-sidebar-switcher-text">
|
|
53
|
+
<span class="wd-sidebar-switcher-label">{current.label}</span>
|
|
54
|
+
{current.description && <span class="wd-sidebar-switcher-desc">{current.description}</span>}
|
|
55
|
+
</span>
|
|
56
|
+
<svg class="wd-sidebar-switcher-chevrons" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true">
|
|
57
|
+
<path d="M3.5 4.5L6 2L8.5 4.5M3.5 7.5L6 10L8.5 7.5" stroke="currentColor" stroke-width="1.3" fill="none" stroke-linecap="round" stroke-linejoin="round" />
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
<div class="wd-dropdown-menu wd-sidebar-switcher-menu">
|
|
61
|
+
<div class="wd-dropdown-menu-panel">
|
|
62
|
+
{sel.options.map((opt) => (
|
|
63
|
+
<a
|
|
64
|
+
href={siteHref(opt.href)}
|
|
65
|
+
class={opt.active ? "active" : ""}
|
|
66
|
+
aria-current={opt.active ? "true" : undefined}
|
|
67
|
+
target={isExternalHref(opt.href) ? "_blank" : undefined}
|
|
68
|
+
rel={isExternalHref(opt.href) ? "noopener noreferrer" : undefined}
|
|
69
|
+
>
|
|
70
|
+
<AppIcon icon={opt.icon} class="wd-tab-icon wd-sidebar-switcher-icon" />
|
|
71
|
+
<span class="wd-sidebar-switcher-text">
|
|
72
|
+
<span class="wd-sidebar-switcher-label">{opt.label}</span>
|
|
73
|
+
{opt.description && <span class="wd-sidebar-switcher-desc">{opt.description}</span>}
|
|
74
|
+
</span>
|
|
75
|
+
</a>
|
|
76
|
+
))}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
})}
|
|
82
|
+
<NavTree nodes={navTree} hrefForSlug={hrefForSlug} currentSlug={currentSlug} />
|
|
83
|
+
{!watermarkDisabled && (
|
|
84
|
+
<div class="wd-sidebar-watermark">
|
|
85
|
+
<img src={watermarkForLightTheme.src} alt="Powered by writedocs" class="wd-watermark-light" width={watermarkForLightTheme.width} height={watermarkForLightTheme.height} loading="lazy" decoding="async" />
|
|
86
|
+
<img src={watermarkForDarkTheme.src} alt="Powered by writedocs" class="wd-watermark-dark" width={watermarkForDarkTheme.width} height={watermarkForDarkTheme.height} loading="lazy" decoding="async" />
|
|
87
|
+
</div>
|
|
88
|
+
)}
|
|
89
|
+
</nav>
|
|
90
|
+
<style>
|
|
91
|
+
/* The product switcher at the top of the sidebar - Mintlify's place for
|
|
92
|
+
it. Full width, the current product (and its description) on the
|
|
93
|
+
button, every product in the menu. It opens on click only: the shared
|
|
94
|
+
hover-to-open (dropdown.css) would pop it open every time the pointer
|
|
95
|
+
crosses the sidebar. */
|
|
96
|
+
.wd-sidebar-switcher {
|
|
97
|
+
margin-bottom: 1rem;
|
|
98
|
+
}
|
|
99
|
+
.wd-sidebar-switcher-trigger {
|
|
100
|
+
width: 100%;
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
gap: 0.6rem;
|
|
103
|
+
padding: 0.5rem 0.65rem;
|
|
104
|
+
border: 1px solid var(--wd-border);
|
|
105
|
+
border-radius: 0.5rem;
|
|
106
|
+
color: var(--wd-text);
|
|
107
|
+
text-align: left;
|
|
108
|
+
}
|
|
109
|
+
.wd-sidebar-switcher-trigger:hover {
|
|
110
|
+
background: var(--wd-surface);
|
|
111
|
+
}
|
|
112
|
+
.wd-sidebar-switcher-text {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
flex: 1;
|
|
116
|
+
min-width: 0;
|
|
117
|
+
}
|
|
118
|
+
.wd-sidebar-switcher-label {
|
|
119
|
+
font-size: 0.88rem;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
}
|
|
125
|
+
.wd-sidebar-switcher-desc {
|
|
126
|
+
font-size: 0.75rem;
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
color: var(--wd-text-muted);
|
|
129
|
+
}
|
|
130
|
+
.wd-sidebar-switcher-trigger .wd-sidebar-switcher-desc {
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
}
|
|
135
|
+
.wd-sidebar-switcher-chevrons {
|
|
136
|
+
flex-shrink: 0;
|
|
137
|
+
color: var(--wd-text-muted);
|
|
138
|
+
}
|
|
139
|
+
.wd-sidebar-switcher:not(.open) .wd-sidebar-switcher-menu {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
.wd-sidebar-switcher-menu {
|
|
143
|
+
right: 0;
|
|
144
|
+
}
|
|
145
|
+
.wd-sidebar-switcher-menu .wd-dropdown-menu-panel {
|
|
146
|
+
min-width: 0;
|
|
147
|
+
}
|
|
148
|
+
.wd-sidebar-switcher-menu a {
|
|
149
|
+
align-items: flex-start;
|
|
150
|
+
}
|
|
151
|
+
.wd-sidebar-switcher-menu .wd-sidebar-switcher-icon {
|
|
152
|
+
margin-top: 0.2rem;
|
|
153
|
+
}
|
|
154
|
+
/* The mobile menu already lists every level as its own row above the
|
|
155
|
+
sidebar - no second copy there. */
|
|
156
|
+
:global(#wd-mobile-menu) .wd-sidebar-switcher {
|
|
157
|
+
display: none;
|
|
158
|
+
}
|
|
159
|
+
/* Sticky + its own scrollbar, not just "moves along until it runs out
|
|
160
|
+
of column to stick within" (position: sticky's default behavior,
|
|
161
|
+
which is what this had before - a tall nav tree would eventually
|
|
162
|
+
unstick and get carried away by the page's own scroll once
|
|
163
|
+
.wd-sidebar-col's bottom edge passed the viewport). max-height caps
|
|
164
|
+
it to the visible area below the topbar and overflow-y gives it an
|
|
165
|
+
independent scrollbar, so the page scrolls its content while the
|
|
166
|
+
sidebar scrolls itself - same treatment TableOfContents.astro's
|
|
167
|
+
.wd-toc already has (deliberately matching its `top`/`max-height`
|
|
168
|
+
values exactly, so both columns start scrolling at the same height
|
|
169
|
+
when a page has both). Reset back to normal (non-sticky, no cap) on
|
|
170
|
+
narrow screens in BaseLayout.astro's `@media (max-width: 860px)`
|
|
171
|
+
block, where the sidebar stacks full-width above the content instead
|
|
172
|
+
of sitting beside it. */
|
|
173
|
+
.wd-sidebar {
|
|
174
|
+
padding: 1.5rem 1rem 1.5rem 0;
|
|
175
|
+
position: sticky;
|
|
176
|
+
/* --wd-topbar-offset (src/scripts/topbar-offset.ts) is the topbar's
|
|
177
|
+
real measured height - a fixed 5rem (this var()'s own fallback)
|
|
178
|
+
only matched the topbar's simplest, single-row case; matched
|
|
179
|
+
exactly by TableOfContents.astro's own .wd-toc, see this file's
|
|
180
|
+
own comment above on why that pairing matters. */
|
|
181
|
+
top: var(--wd-topbar-offset, 5rem);
|
|
182
|
+
max-height: calc(100vh - var(--wd-topbar-offset, 5rem));
|
|
183
|
+
overflow-y: auto;
|
|
184
|
+
}
|
|
185
|
+
/* Desktop only (see the :global(.wd-sidebar-col) guard) - turns the
|
|
186
|
+
sidebar into a fixed-height flex column so .wd-sidebar-watermark's
|
|
187
|
+
margin-top: auto below can push it all the way to the bottom of the
|
|
188
|
+
visible area when the nav tree doesn't fill it, instead of sitting
|
|
189
|
+
right after the last nav item with a gap of empty space beneath it.
|
|
190
|
+
height (not just the max-height above) is what makes this work -
|
|
191
|
+
max-height alone only caps how tall the box *can* get, it doesn't
|
|
192
|
+
force it to actually be that tall when content is shorter, which is
|
|
193
|
+
exactly the "empty space below the watermark" case this replaces.
|
|
194
|
+
Scoped to .wd-sidebar-col specifically (not the plain .wd-sidebar
|
|
195
|
+
this component always renders) so the *reused* copy inside
|
|
196
|
+
MobileMenu.astro's own scrollable panel is untouched - forcing a
|
|
197
|
+
tall fixed height there would leave an awkward blank stretch inside
|
|
198
|
+
the mobile drawer under a short nav list, where "pinned to the
|
|
199
|
+
bottom of the screen" isn't really representative of a panel the
|
|
200
|
+
reader can already see the bottom of by scrolling. */
|
|
201
|
+
:global(.wd-sidebar-col) .wd-sidebar {
|
|
202
|
+
height: calc(100vh - var(--wd-topbar-offset, 5rem));
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
}
|
|
206
|
+
/* Last thing in the nav column. margin-top: auto only has real estate
|
|
207
|
+
to push into on desktop (where the rule above gives .wd-sidebar a
|
|
208
|
+
real fixed height) - inside the mobile menu's reused copy, .wd-
|
|
209
|
+
sidebar is never a flex container, so this margin resolves to 0 and
|
|
210
|
+
the watermark just falls in after the last nav item instead, same
|
|
211
|
+
as before that rule existed. Either way, padding-top + border-top
|
|
212
|
+
stay unconditional, so there's always at least that much separation
|
|
213
|
+
from the nav items above it. */
|
|
214
|
+
.wd-sidebar-watermark {
|
|
215
|
+
margin-top: auto;
|
|
216
|
+
padding-top: 1rem;
|
|
217
|
+
border-top: 1px solid var(--wd-border);
|
|
218
|
+
}
|
|
219
|
+
/* No `display` here - that's the base.css wd-watermark-light/-dark
|
|
220
|
+
toggle's job alone (default display:none on the inactive one,
|
|
221
|
+
display:block on the active one). This rule's own selector
|
|
222
|
+
specificity (a class + an attribute-scoping selector + a type
|
|
223
|
+
selector) is higher than that toggle's plain single/double-class
|
|
224
|
+
rules, so a `display: block` here would win the cascade
|
|
225
|
+
unconditionally on BOTH images regardless of [data-theme] -
|
|
226
|
+
exactly the "both always visible" bug this replaces. */
|
|
227
|
+
.wd-sidebar-watermark img {
|
|
228
|
+
height: 14px;
|
|
229
|
+
width: auto;
|
|
230
|
+
opacity: 0.7;
|
|
231
|
+
}
|
|
232
|
+
</style>
|