From 1f373698e6c677ff1e4b8023bd2c8c39ab78a6b3 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sat, 11 Jul 2026 18:32:28 +0200 Subject: [PATCH] fix(scss): declare theme-mode-transition default at point of use Child themes commonly shadow common/_variables.scss with a fork, which silently drops variables added upstream and breaks the Sass compile with an undefined variable. Declaring the !default at the consuming files keeps the build self-sufficient while a fork that does define the variable still wins. Co-Authored-By: Claude Fable 5 --- assets/scss/common/_styles.scss | 6 ++++++ assets/scss/components/_navbar.scss | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/assets/scss/common/_styles.scss b/assets/scss/common/_styles.scss index d73fecac..2ca411ea 100644 --- a/assets/scss/common/_styles.scss +++ b/assets/scss/common/_styles.scss @@ -1,3 +1,9 @@ +// Self-sufficient default: child themes commonly shadow common/_variables.scss +// with their own fork, which silently drops variables added upstream. Declaring +// the default at the point of use keeps the build working either way; a fork +// that does define the variable still wins through !default. +$theme-mode-transition: background-color .5s ease-in-out, color .5s ease-in-out, border-color .5s ease-in-out !default; + @if $enable-dark-mode { [data-bs-theme-animate="true"] body { transition: $theme-mode-transition; diff --git a/assets/scss/components/_navbar.scss b/assets/scss/components/_navbar.scss index d592ea65..6efa5f49 100644 --- a/assets/scss/components/_navbar.scss +++ b/assets/scss/components/_navbar.scss @@ -1,5 +1,9 @@ // stylelint-disable annotation-no-unknown +// Self-sufficient default — see common/_styles.scss for the rationale +// (child themes shadowing common/_variables.scss). +$theme-mode-transition: background-color .5s ease-in-out, color .5s ease-in-out, border-color .5s ease-in-out !default; + // adapted from https://www.codeply.com/p/UsTEwDkzNp# .checkbox { opacity: 0;