fix: preserve mode-dependent overrides in dark mode rules#164
Open
SpyZzey wants to merge 1 commit into
Open
Conversation
5839895 to
c144f81
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #164 +/- ##
==========================================
+ Coverage 97.57% 97.59% +0.01%
==========================================
Files 48 48
Lines 2641 2657 +16
Branches 549 558 +9
==========================================
+ Hits 2577 2593 +16
Misses 64 64 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gethinwebster
previously approved these changes
Apr 20, 2026
pan-kot
reviewed
Apr 29, 2026
| expect(result.findRule('.child')).toBeUndefined(); | ||
| }); | ||
|
|
||
| test('preserves overridden properties in mode rules even when values match root', () => { |
Member
There was a problem hiding this comment.
Why is it necessary to preserve mode rules in this case?
E.g.:
body {
color-badge-status-critical: red;
}
.dark-mode {
color-badge-status-critical: red; // Is this needed?
}
c144f81 to
8d85739
Compare
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.
Fixes AWSUI-61881: The dark mode gets overridden when light and dark mode uses the same value in themes due to some optimizations.
Issue #, if available: AWSUI-61881
How to test it locally:
node_modules/@cloudscape-design/theming-runtimepackage or usenpm link.npm run devand check how it looks like (and compare it with the current live theming-runtime from@cloudscape-design/theming-runtime)Appendix:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.