Repository navigation
Keep a --radius-pill value passed through $root-tokens - #43074
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
--radius-pillis set to50remafter the user's$root-tokensmap is merged, so$root-tokens: (--radius-pill: 0)is silently replaced and Sass can't change the token (there's no$radiistep for it). The default is now only set when the map doesn't already have the key.To see it, compile with
@use "bootstrap" with ($radius: 0, $root-tokens: (--radius-pill: 0));:--radius-pillis now0instead of50rem. Without the override it's still50rem.What was done
scss/_root.scss: themap.setis wrapped in@if not map.has-key($root-tokens, --radius-pill). The now unneededstylelint-disable-next-linecomment is gone.scss/tests/modules/_root-tokens.test.scss:--radius-pill: 0is passed in the configuration and a spec checks it's kept.pillto$radii. That map also builds the.rounded-*utilities, which already have a.rounded-pill, so it would change the utilities map.npx jasmine --config=scss/tests/jasmine.cjspasses (48 specs) and fails on the new spec without the change;npx stylelintpasses on both files; asassbuild ofscss/bootstrap.scsswith and without the override gives0and50rem. Not run:npm run lint, a browser check beyond the screenshots below.dist/css/bootstrap.css, built before and after the change: identical with the default settings. With$radius: 0and$root-tokens: (--radius-pill: 0), one line changes:How to review
See it: the same test page at 640px in light mode, built with
$radius: 0and$root-tokens: (--radius-pill: 0). It holds pill badges, a pill button and an element with.rounded-pill. They stay round before the change and turn square after it, which is enough for a change that only moves one token value.Try it:
git fetch origin main-jd-root-tokens-radius-pill && git switch main-jd-root-tokens-radius-pill && npm ci && npx jasmine --config=scss/tests/jasmine.cjs, then compile a file with the@use … withline above and look for--radius-pillin the output.🤖 Generated with Claude Code