Do not merge yet : fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239) - #1756
Open
juanmitriatti wants to merge 1 commit into
Open
Do not merge yet : fix(unity-bootstrap-theme): support downstream palette overrides (UDS-2239)#1756juanmitriatti wants to merge 1 commit into
juanmitriatti wants to merge 1 commit into
Conversation
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
Collaborator
|
Storybook deployed at https://unity-uds-staging.s3.us-west-2.amazonaws.com/pr-1756/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
!defaultto all color tokens insrc/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.#ffc627) that survived a variable override:src/scss/extends/_heroes.scsslines 47-48 —like-h3-highlight-goldmixin (box-shadow ×2 + background)src/scss/extends/_ranking-cards.scssline 18 —border-topVerification
$uds-color-base-gold: #007a8aand$uds-color-base-maroon: #1a2b4abefore importing the theme. Result: 0 occurrences of#ffc627and 0 of#8c1d40in the compiled CSS (previously 4 gold literals survived), with derived variables recomputing correctly.yarn buildpasses for the package; stylelint passes on the three changed files.