@writedocs/generator 0.10.8 → 0.10.9
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/package.json
CHANGED
|
@@ -222,6 +222,11 @@ const darkNavbarConfigured = config.styles.navbar?.dark !== undefined;
|
|
|
222
222
|
// regardless of what hue the navbar itself happens to be.
|
|
223
223
|
const lightNavbarFg = lightNavbarConfigured ? contrastTextColor(lightNavbarBg) : "var(--wd-text)";
|
|
224
224
|
const darkNavbarFg = darkNavbarConfigured ? contrastTextColor(darkNavbarBg) : "var(--wd-text)";
|
|
225
|
+
// The current tab (and a hovered one) stands out: the heading color on the
|
|
226
|
+
// page's own background, or the same computed black/white on a configured
|
|
227
|
+
// navbar - which is already the strongest color there.
|
|
228
|
+
const lightNavbarFgStrong = lightNavbarConfigured ? lightNavbarFg : "var(--wd-heading)";
|
|
229
|
+
const darkNavbarFgStrong = darkNavbarConfigured ? darkNavbarFg : "var(--wd-heading)";
|
|
225
230
|
const lightNavbarFgMuted = lightNavbarConfigured
|
|
226
231
|
? `color-mix(in srgb, ${lightNavbarFg} 70%, transparent)`
|
|
227
232
|
: "var(--wd-text-muted)";
|
|
@@ -548,6 +553,7 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join("\n");
|
|
|
548
553
|
wdTextLight: lightText,
|
|
549
554
|
wdNavbarLight: lightNavbarBg,
|
|
550
555
|
wdNavbarFgLight: lightNavbarFg,
|
|
556
|
+
wdNavbarFgStrongLight: lightNavbarFgStrong,
|
|
551
557
|
wdNavbarFgMutedLight: lightNavbarFgMuted,
|
|
552
558
|
wdNavbarAccentLight: lightNavbarAccent,
|
|
553
559
|
wdNavbarBorderLight: lightNavbarBorder,
|
|
@@ -563,6 +569,7 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join("\n");
|
|
|
563
569
|
wdTextDark: darkText,
|
|
564
570
|
wdNavbarDark: darkNavbarBg,
|
|
565
571
|
wdNavbarFgDark: darkNavbarFg,
|
|
572
|
+
wdNavbarFgStrongDark: darkNavbarFgStrong,
|
|
566
573
|
wdNavbarFgMutedDark: darkNavbarFgMuted,
|
|
567
574
|
wdNavbarAccentDark: darkNavbarAccent,
|
|
568
575
|
wdNavbarBorderDark: darkNavbarBorder,
|
|
@@ -578,6 +585,7 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join("\n");
|
|
|
578
585
|
--wd-text: var(--wdTextLight);
|
|
579
586
|
--wd-navbar-background: var(--wdNavbarLight);
|
|
580
587
|
--wd-navbar-foreground: var(--wdNavbarFgLight);
|
|
588
|
+
--wd-navbar-foreground-strong: var(--wdNavbarFgStrongLight);
|
|
581
589
|
--wd-navbar-foreground-muted: var(--wdNavbarFgMutedLight);
|
|
582
590
|
--wd-navbar-accent: var(--wdNavbarAccentLight);
|
|
583
591
|
--wd-navbar-border: var(--wdNavbarBorderLight);
|
|
@@ -616,6 +624,7 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join("\n");
|
|
|
616
624
|
--wd-text: var(--wdTextDark);
|
|
617
625
|
--wd-navbar-background: var(--wdNavbarDark);
|
|
618
626
|
--wd-navbar-foreground: var(--wdNavbarFgDark);
|
|
627
|
+
--wd-navbar-foreground-strong: var(--wdNavbarFgStrongDark);
|
|
619
628
|
--wd-navbar-foreground-muted: var(--wdNavbarFgMutedDark);
|
|
620
629
|
--wd-navbar-accent: var(--wdNavbarAccentDark);
|
|
621
630
|
--wd-navbar-border: var(--wdNavbarBorderDark);
|
|
@@ -259,10 +259,12 @@
|
|
|
259
259
|
}
|
|
260
260
|
/* The selected tab: just its border-bottom, in --wd-navbar-accent (falls
|
|
261
261
|
back to --wd-primary - see BaseLayout.astro), landing on the row's
|
|
262
|
-
bottom edge as an underline. No fill - the text
|
|
263
|
-
color
|
|
262
|
+
bottom edge as an underline. No fill - the text takes the navbar's
|
|
263
|
+
strongest color (the heading color, or the computed black/white on a
|
|
264
|
+
navbar of its own - --wd-navbar-foreground-strong in BaseLayout.astro). */
|
|
264
265
|
.wd-tab-link.active {
|
|
265
266
|
border-bottom-color: var(--wd-navbar-accent);
|
|
267
|
+
color: var(--wd-navbar-foreground-strong);
|
|
266
268
|
font-weight: 600;
|
|
267
269
|
}
|
|
268
270
|
/* Any tab on hover: a light background tint, the same as a sidebar item's
|
|
@@ -270,6 +272,7 @@
|
|
|
270
272
|
corners above shape it. */
|
|
271
273
|
.wd-tab-link:hover {
|
|
272
274
|
background: var(--wd-navbar-hover);
|
|
275
|
+
color: var(--wd-navbar-foreground-strong);
|
|
273
276
|
}
|
|
274
277
|
.wd-topbar-links {
|
|
275
278
|
display: flex;
|