Skip to content

Do not merge yet : fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239) - #1756

Open
juanmitriatti wants to merge 1 commit into
devfrom
UDS-2239
Open

Do not merge yet : fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239)#1756
juanmitriatti wants to merge 1 commit into
devfrom
UDS-2239

Conversation

@juanmitriatti

@juanmitriatti juanmitriatti commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables downstream consumers (Webspark WS2-2964 / WS2-3099, KE Unbranded Profile) to override UDS brand colors at build time via standard Sass variable pre-definition.

  • Add !default to all color tokens in src/scss/_custom-asu-variables.scss (base colors, grays, brand, alerts, backgrounds, font colors, dividers). Consumers can now pre-define palette values before importing the theme entry files, and derived variables ($uds-color-brand-*, $uds-color-font-light-link, etc.) recompute automatically.
  • Variable-ize 3 hardcoded gold literals (4 occurrences of #ffc627) that survived a variable override:
    • src/scss/extends/_heroes.scss lines 47-48 — like-h3-highlight-gold mixin (box-shadow ×2 + background)
    • src/scss/extends/_ranking-cards.scss line 18 — border-top

Verification

  • No-op without overrides: compiled the full theme before and after the change — output CSS is byte-identical.
  • End-to-end override test: pre-defined $uds-color-base-gold: #007a8a and $uds-color-base-maroon: #1a2b4a before importing the theme. Result: 0 occurrences of #ffc627 and 0 of #8c1d40 in the compiled CSS (previously 4 gold literals survived), with derived variables recomputing correctly.
  • yarn build passes for the package; stylelint passes on the three changed files.

Add !default to all color tokens in _custom-asu-variables.scss so
downstream consumers can pre-define palette values before importing
the theme, with derived variables recomputing automatically.

Replace the three hardcoded #ffc627 gold literals (like-h3-highlight-gold
mixin in _heroes.scss and border-top in _ranking-cards.scss) with
$uds-color-base-gold so they follow palette overrides.

Compiled CSS is byte-identical without overrides.

Ref: Webspark WS2-2964 / WS2-3099
@juanmitriatti
juanmitriatti requested a review from a team as a code owner July 24, 2026 11:25
@juanmitriatti juanmitriatti self-assigned this Jul 24, 2026
@juanmitriatti juanmitriatti changed the title fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239) Do not merge yet : fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239) Jul 24, 2026
@asu-jenkins-devops

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants