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.
What Changed
Updating the dark mode logic to match the previous way design data was referenced, where theme-specific values should be compared back to the
default
theme, not to each other.Meaning
theme.light
should overridedefaultTheme.light
andtheme.dark
should overridedefaultTheme.dark
(nottheme.light
).You can test this by having a theme use the same value for dark and light mode. Previously, if the values were the same, the dark mode value would use the default theme dark value. This PR fixes this where the dark value for the theme will be used as expected.
Why
#48 introduced some new logic that said if the dark scheme value was the same as the light value, don't include it. However, the logic should be if the dark scheme value for the
default
theme is the same as light, don't include it.Updating the logic to be default theme specific, since we want to be able to supply the same value for dark and light schemes in non-default themes.
Todo:
yarn all-contributors add [name] [type]
) see https://github.com/all-contributors/all-contributors/blob/master/docs/cli/usage.mdPublished PR with canary version:
2.8.1-canary.61.736