From 4e13bf596c828a04162f5391adf96e12315e0fbf Mon Sep 17 00:00:00 2001 From: Jonathon Wright Date: Fri, 3 Jul 2026 19:50:18 +1000 Subject: [PATCH] facelift: fix light-theme scrims/thumbs - :global() the data-theme overrides Astro scopes compound selectors, so [data-theme=light] .hero__scrim inside a component style block could never match html[data-theme] - the light theme rendered dark scrims (embossed low-contrast copy). Wrap the theme prefix in :global() in Hero, ProjectCard and the blog index. Light 'blueprint' hero now reads clean. --- src/components/Hero.astro | 4 ++-- src/components/ProjectCard.astro | 2 +- src/pages/blog/index.astro | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 46146cb..463715a 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -106,7 +106,7 @@ import Constellation from "./Constellation.astro"; rgba(9, 12, 20, 0.9) 100% ); } - [data-theme="light"] .hero__scrim--x { + :global([data-theme="light"]) .hero__scrim--x { background: linear-gradient( 90deg, rgba(246, 248, 251, 0.96) 0%, @@ -115,7 +115,7 @@ import Constellation from "./Constellation.astro"; rgba(246, 248, 251, 0.5) 100% ); } - [data-theme="light"] .hero__scrim--y { + :global([data-theme="light"]) .hero__scrim--y { background: linear-gradient( 180deg, rgba(246, 248, 251, 0.55) 0%, diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro index 4e9170f..39357ae 100644 --- a/src/components/ProjectCard.astro +++ b/src/components/ProjectCard.astro @@ -65,7 +65,7 @@ const dossierNo = String(index).padStart(3, "0"); position: relative; border-bottom: 1px solid rgba(63, 186, 245, 0.12); } - [data-theme="light"] .dossier__thumb { + :global([data-theme="light"]) .dossier__thumb { background: var(--surface-2); border-bottom-color: var(--border-accent); } diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 2dee0ab..743a781 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -193,7 +193,7 @@ const featuredSeries = series[featured.id]; z-index: 1; background: linear-gradient(90deg, var(--panel-solid) 0%, transparent 45%); } - [data-theme="light"] .featured__art::before { + :global([data-theme="light"]) .featured__art::before { background: linear-gradient(90deg, var(--panel-solid) 0%, transparent 45%); opacity: 0.85; }