Add smooth theme-switch transitions and restore hero .overlay wrapper

- Add prefers-reduced-motion-scoped CSS transitions (bg, color, border) on
  :root, body, and key layout containers so light/dark theme switches animate
  smoothly instead of snapping
- Restore <div class="overlay"> child in hero.php; slim .custom-hero rule to a
  customisation hook only — visual overlay styles are handled by .overlay child
- Regenerate template.min.css

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 20:55:50 -05:00
parent 57b4c3240e
commit c011742e4a
2 changed files with 24 additions and 1 deletions

View File

@@ -28,6 +28,23 @@
}
}
/* Smooth colour transition when the data-bs-theme attribute changes between light and dark.
Scoped to no-preference so users who opt out of motion also skip colour flashes. */
@media (prefers-reduced-motion: no-preference) {
:root,
body,
.container-wrapper,
.container-main,
nav,
header,
footer {
transition:
background-color 0.3s ease,
color 0.3s ease,
border-color 0.3s ease;
}
}
@media print {
nav,
@@ -14094,6 +14111,7 @@ meter {
border-bottom: var(--hero-border-bottom, solid var(--accent-color-secondary));
}
/* Legacy: standard Cassiopeia banner with an explicit .overlay child */
.container-banner .banner-overlay .overlay {
display: -webkit-box;
display: -ms-flexbox;
@@ -14115,6 +14133,11 @@ meter {
background-color: var(--hero-overlay-bg, hsla(0, 0%, 0%, 0.5));
}
/* Hero layout (hero.php): outer wrapper — visual overlay is handled by the .overlay child */
.container-banner .banner-overlay.custom-hero {
/* Selector kept as a customisation hook; see .banner-overlay .overlay for overlay styles */
}
.container-banner .banner-overlay .overlay .text-thin {
font-weight: lighter;
}

File diff suppressed because one or more lines are too long