From 81322f554f3c73bf063c1a65a4c9746acd4e0946 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Fri, 10 Jul 2026 13:46:09 -0300 Subject: [PATCH] fix(dark mode): reclaim border-colour and shadow utilities for tokens Extend the Bootstrap utilities map-remove beyond text colour: - border-color danger/info/success/warning -> token .border-* (values are identical to Bootstrap, so a no-op; ownership only). - shadow sm/lg/none -> token .shadow-* so the DS shadow scale is consistent. .shadow-md/.shadow-xl were already token-only; .shadow-sm/.shadow-lg were silently using Bootstrap's heavier shadows. Suffixless .shadow stays Bootstrap. Contributes to #6606 Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/web/styles/3rdParty/_bootstrap.scss | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/web/styles/3rdParty/_bootstrap.scss b/frontend/web/styles/3rdParty/_bootstrap.scss index be1dfef20f65..b04f1cf84a4b 100644 --- a/frontend/web/styles/3rdParty/_bootstrap.scss +++ b/frontend/web/styles/3rdParty/_bootstrap.scss @@ -29,6 +29,26 @@ $_color-util: map-merge( ); $utilities: map-merge($utilities, ("color": $_color-util)); +// Border colour: token border utilities take over. Values are identical to +// Bootstrap's, so a no-op; it just moves ownership to the token layer. +$_border-util: map-get($utilities, "border-color"); +$_border-util: map-merge( + $_border-util, + (values: map-remove(map-get($_border-util, "values"), "danger", "info", "success", "warning")) +); +$utilities: map-merge($utilities, ("border-color": $_border-util)); + +// Shadow scale is owned by the token utilities (--shadow-*). Drop sm/lg/none so +// `.shadow-sm` / `.shadow-lg` / `.shadow-none` use the DS tokens, consistent with +// the token-only `.shadow-md` / `.shadow-xl`. Bootstrap's suffixless `.shadow` +// (the `null` key) is left in place. +$_shadow-util: map-get($utilities, "shadow"); +$_shadow-util: map-merge( + $_shadow-util, + (values: map-remove(map-get($_shadow-util, "values"), "sm", "lg", "none")) +); +$utilities: map-merge($utilities, ("shadow": $_shadow-util)); + @import "~bootstrap/scss/utilities/api"; // 5. Include any optional Bootstrap CSS as needed