@uniweb/theming 1.3.1 → 1.3.2
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 +1 -1
- package/src/css-generator.js +6 -0
package/package.json
CHANGED
package/src/css-generator.js
CHANGED
|
@@ -601,6 +601,12 @@ export function generateThemeCSS(config = {}, options = {}) {
|
|
|
601
601
|
// part of that day the exclusion was a plain `:not([…])`, (0,2,0), which beat those rules.
|
|
602
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}`)
|
|
603
603
|
|
|
604
|
+
// ⭐ The section a header lies over (`underHeader`, marked by the runtime) clears it by
|
|
605
|
+
// `--uw-header-height`: what the browser measured, else the header type's declared height, on a
|
|
606
|
+
// page where a header box lies over it, and nothing on one where the layout drew no header. A
|
|
607
|
+
// rule, since only the rendered page holds that answer, so the first paint pads by what is there.
|
|
608
|
+
sections.push(`/* The section under the header clears it — by nothing where no header lies over it */\n[data-uw-under-header] {\n --uw-header-height: 0px;\n}\n:root:has([data-uw-header="over"]) [data-uw-under-header] {\n --uw-header-height: var(--uw-header-measured, var(--uw-header-declared, 0px));\n}`)
|
|
609
|
+
|
|
604
610
|
// 4. Context classes
|
|
605
611
|
const contextCSS = [
|
|
606
612
|
generateContextCSS('light', contexts.light, colorVars),
|