@uniweb/theming 0.1.13 → 0.1.14

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": "@uniweb/theming",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Theming utilities for the Uniweb platform — shade generation, CSS generation, theme processing",
5
5
  "type": "module",
6
6
  "exports": {
@@ -597,10 +597,21 @@ export function generateThemeCSS(config = {}, options = {}) {
597
597
  sections.push(generateDarkSchemeCSS(appearance, contexts.dark, colorVars))
598
598
  }
599
599
 
600
- // 7. Site background (if specified in theme.yml)
601
- if (config.background) {
602
- sections.push(`/* Site Background */\nbody {\n background: ${config.background};\n}`)
603
- }
600
+ // 7. Site background — the page behind the sections.
601
+ //
602
+ // Sections paint themselves (rule 3), and on a page whose sections run the
603
+ // full width that covers the viewport. It does not cover a layout with
604
+ // columns: a sidebar shell paints its rails and its article and leaves the
605
+ // space between them unpainted, which falls through to the browser's white —
606
+ // in both schemes, so dark mode shows a white page around dark panels.
607
+ //
608
+ // Defaulting to var(--section) means the page matches the sections sitting on
609
+ // it and flips with the visitor's choice, because that token already does. A
610
+ // site wanting a different canvas — a wash behind cards, an image — sets
611
+ // `background:` in theme.yml and replaces this.
612
+ sections.push(
613
+ `/* Site Background */\nbody {\n background: ${config.background || 'var(--section)'};\n}`
614
+ )
604
615
 
605
616
  // 8. Inline text styles (if specified in theme.yml)
606
617
  if (config.inline && typeof config.inline === 'object') {