diff --git a/static/css/v3/boostlook-v3.css b/static/css/v3/boostlook-v3.css index f6bfa2a83..e6bcb790e 100644 --- a/static/css/v3/boostlook-v3.css +++ b/static/css/v3/boostlook-v3.css @@ -127,7 +127,12 @@ * 6. Responsive Design - Mobile-first breakpoint variables */ -:root:has(.boostlook) { +/* Core design tokens. Scoped to the .boostlook subtree (not the page root) so a + component island on a v3 site page cannot redefine the host page's tokens + (which caused the hero heading to shift). The :root:not(.v3) branch keeps them + page-level for full-page docs, whose html has no .v3. */ +:root:not(.v3):has(.boostlook), +.boostlook { /* General Variables - Core design tokens for all themes */ --bl-primary-color: rgb(255, 159, 0); /* Boost's signature orange color */ @@ -426,7 +431,8 @@ /*----------------- New Look Responsive Desktop Start -----------------*/ @media (min-width: 768px) { - :root:has(.boostlook) { + :root:not(.v3):has(.boostlook), + .boostlook { /* Spacing — Metalab 2.0 (desktop) */ --spacing-xs: 0.125rem; --spacing-s: 0.25rem; @@ -497,7 +503,9 @@ } @media (min-width: 990px) { - :root:has(.boostlook) { + /* Doc-layout widths, read by ancestors outside .boostlook, so they stay on + :root. Gated :not(.v3) so they don't land on a v3 site page. */ + :root:not(.v3):has(.boostlook) { --main-max-width-leftbar: 21.25rem; --main-margin: 8.625rem; } @@ -517,8 +525,12 @@ * 2. Dark Theme (activated by html.dark class) */ -/* Light Theme (Default) Configuration */ -html:has(.boostlook) { +/* Light Theme (Default) Configuration. + Defined on the .boostlook scope (not the page root) so a component island on + a v3 site page does not push these theme vars onto the host :root. The + :root:not(.v3) branch keeps them page-level for full-page docs. */ +:root:not(.v3):has(.boostlook), +.boostlook { color-scheme: light; /*----------------- New Look Variables Start -----------------*/ --icon-anchor: var(--icon-anchor-light); @@ -654,8 +666,10 @@ html:has(.boostlook) { /*----------------- New Look Variables End -----------------*/ } -/* Dark Theme Configuration */ -html.dark:has(.boostlook) { +/* Dark Theme Configuration. Scoped like the light theme above so dark theme + vars land on the .boostlook subtree, not the host :root, on v3 site pages. */ +html.dark:not(.v3):has(.boostlook), +html.dark .boostlook { color-scheme: dark; /*----------------- New Look Variables Dark Mode Start -----------------*/ --icon-anchor: var(--icon-anchor-dark); @@ -792,8 +806,11 @@ html.dark:has(.boostlook) { /*----------------- HTML Variables - End -----------------*/ -/* Override for Antora default styles */ -html:has(.boostlook) { +/* Override for Antora default styles. + Gated :not(.v3): page-level html props (root font-size, height, scroll) must + not apply when .boostlook is only a component island on a v3 site page. Docs + render in an iframe whose html has no .v3, so they keep this. */ +html:not(.v3):has(.boostlook) { -webkit-box-sizing: border-box; box-sizing: border-box; font-size: 1rem; @@ -1331,6 +1348,40 @@ html:has(.boostlook) { margin-top: var(--padding-padding-md, 1rem); } +/* Markdown paragraphs — plain

siblings rendered by markdown (site + components, READMEs) that lack Antora's .paragraph wrapper, so the rule + above never matches them. Scoped :not(:has(.doc)) so Antora doc content + keeps its own structure-based spacing below. */ +/* The :not(...) guards are wrapped in :where() so they add no specificity: + this bare-markdown layer is a low baseline (.boostlook + element level) that + component rules (e.g. .boostlook.markdown-content ul) can override cleanly. */ +.boostlook:where(:not(:has(.doc))) p + p { + margin-top: var(--padding-padding-md, 1rem); +} + +/* Markdown lists — bare