@uniweb/theming 1.2.1 → 1.3.1

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": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "description": "Theming utilities for the Uniweb platform — shade generation, CSS generation, theme processing",
5
5
  "type": "module",
6
6
  "exports": {
@@ -590,7 +590,16 @@ export function generateThemeCSS(config = {}, options = {}) {
590
590
  const lightColorVars = colorVars.light || {}
591
591
  const defaultTokens = { ...DEFAULT_CONTEXT_TOKENS.light, ...(contexts.light || {}), ...lightColorVars }
592
592
  const defaultVars = generateVarDeclarations(defaultTokens)
593
- sections.push(`/* Default Semantic Tokens */\n:root {\n${defaultVars}\n}\n\n/* Section backgrounds — applied once, resolves via context tokens */\n[id^="section-"] {\n background-color: var(--section);\n}`)
593
+ // ⭐ A section type that declares `background: 'self'` paints everything behind its content, its
594
+ // context's surface included: the runtime marks its wrapper `data-uw-background="self"`, and this
595
+ // rule leaves it unpainted, so a panel narrower than its section sits on the page's own surface.
596
+ // ⭐ The exclusion weighs nothing (`:where`), so the rule stays (0,1,0), as it was before it had
597
+ // one: a foundation's own rule for its sections (`.canvas-plain section`, a class beside the id)
598
+ // still wins. Sites get this file from the runtime at their next publish, foundation unchanged.
599
+ // ⛔ Until 2026-11-06 the rule painted every wrapper, so `'self'` covered the author's background
600
+ // layer and not the surface, and a panel foundation cleared the band with a rule of its own. For
601
+ // part of that day the exclusion was a plain `:not([…])`, (0,2,0), which beat those rules.
602
+ sections.push(`/* Default Semantic Tokens */\n:root {\n${defaultVars}\n}\n\n/* Section backgrounds — applied once, resolves via context tokens */\n[id^="section-"]:not(:where([data-uw-background="self"])) {\n background-color: var(--section);\n}`)
594
603
 
595
604
  // 4. Context classes
596
605
  const contextCSS = [