Consolidate multiple 'none' values in box-shadow Sass mixin#41469
Merged
Conversation
ac1dd7a to
a48f48a
Compare
mdo
approved these changes
May 19, 2025
Rajshree1126
pushed a commit
to Rajshree1126/bootstrap
that referenced
this pull request
May 20, 2025
Consolidate multiple 'none' values in `box-shadow` Sass mixin (twbs#41469) Test commit to enable PR creation
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.
Description
This PR fixes an issue with the
box-shadowmixin where multiplenonevalues could result in invalid CSS combinations likebox-shadow: none none none. The fix consolidates multiplenonevalues (and other single-value keywords likeinitial,inherit,unset) into a single value.The changes are:
box-shadowmixin to detect and consolidate single-value keywordsThey prevent invalid CSS output while maintaining backward compatibility with existing usage of the mixin.
These changes are covered by new tests that verify:
nonevaluesinitial,inherit,unset)$enable-shadowsvariable behaviorHopefully, these tests cover pretty much every use cases that could happen, reasonably 🤞 Don't hesitate if you're thinking about any other weird combinations; we could add them to the test suite.
I've also tested manually to compile this branch with
$enable-shadows: trueand compare the generatedbootstrap.csswith the one generated from themainbranch with$enable-shadows: true. Same output.Type of changes
Checklist
npm run lint)Related issues
Closes #41381