@writedocs/generator 0.9.2 → 0.9.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@writedocs/generator",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Static site generator for docs — a writedocs.json + MDX folder in, a static site out.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -566,6 +566,10 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join('\n');
566
566
  --wd-text-muted: #64748b;
567
567
  --wd-border: #e2e8f0;
568
568
  --wd-surface: #f8fafc;
569
+ /* The browser's own controls - the page's scrollbar, a code block's -
570
+ drawn for the theme on screen. Without it they stayed light in dark
571
+ mode. */
572
+ color-scheme: light;
569
573
  /* Not mode-dependent (a site's chosen font doesn't change between
570
574
  light/dark) - set once here rather than duplicated in the
571
575
  :root[data-theme='dark'] block below. */
@@ -594,6 +598,7 @@ const fontExtraCss = [fontFaceCss, fontWeightCss].filter(Boolean).join('\n');
594
598
  --wd-text-muted: #94a3b8;
595
599
  --wd-border: #1e293b;
596
600
  --wd-surface: #131a2b;
601
+ color-scheme: dark;
597
602
  }
598
603
  </style>
599
604
  {/* styles.fonts: local/externally-hosted font(s) (fontFaceRule() in
@@ -244,3 +244,47 @@ img.wd-icon-img {
244
244
  height: 1em;
245
245
  object-fit: contain;
246
246
  }
247
+
248
+ /* Scrollbars of the columns beside the page - the sidebar, the table of
249
+ contents, the mobile menu and its option lists: a thin pill in the
250
+ site's muted text color on no track, faint while the pointer is
251
+ elsewhere, clearer over the column, strongest on the pill itself.
252
+ Chromium and Safari draw it from the ::-webkit-scrollbar rules (the
253
+ standard scrollbar-color/-width would switch those off in Chromium, and
254
+ can't make it this thin); Firefox, which has only the standard ones,
255
+ gets its thin scrollbar in the same colors. */
256
+ :root {
257
+ --wd-scrollbar-thumb: color-mix(in srgb, var(--wd-text-muted) 22%, transparent);
258
+ --wd-scrollbar-thumb-near: color-mix(in srgb, var(--wd-text-muted) 45%, transparent);
259
+ --wd-scrollbar-thumb-active: color-mix(in srgb, var(--wd-text-muted) 70%, transparent);
260
+ }
261
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel)::-webkit-scrollbar {
262
+ width: 10px;
263
+ height: 10px;
264
+ }
265
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel)::-webkit-scrollbar-track {
266
+ background: transparent;
267
+ }
268
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel)::-webkit-scrollbar-thumb {
269
+ background: var(--wd-scrollbar-thumb);
270
+ /* A 6px pill with 2px of air on each side - off the column's border line. */
271
+ border: 2px solid transparent;
272
+ background-clip: padding-box;
273
+ border-radius: 999px;
274
+ }
275
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel):hover::-webkit-scrollbar-thumb {
276
+ background: var(--wd-scrollbar-thumb-near);
277
+ }
278
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel)::-webkit-scrollbar-thumb:hover,
279
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel)::-webkit-scrollbar-thumb:active {
280
+ background: var(--wd-scrollbar-thumb-active);
281
+ }
282
+ @supports not selector(::-webkit-scrollbar) {
283
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel) {
284
+ scrollbar-width: thin;
285
+ scrollbar-color: var(--wd-scrollbar-thumb) transparent;
286
+ }
287
+ :is(.wd-sidebar, .wd-toc, .wd-mobile-menu-scroll, .wd-mobile-accordion-options-panel):hover {
288
+ scrollbar-color: var(--wd-scrollbar-thumb-near) transparent;
289
+ }
290
+ }