Don't unset keys like --font-weight-*
when unsetting --font-*
#14906
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.
This PR fixes an issue where unsetting
--font-*
would unset--font-weight-*
and--font-size-*
.Up until now this was sort of intended/desired behavior but with recent changes there are now more overlapping theme keys (
--inset-*
and--inset-shadow-*
as well for example), and we don't want to make it impossible to unset just the defaultfont-family
values.This PR also simplifies how we were handling making sure that the
inset-*
utility ignored--inset-shadow-*
variables since it's all really the same problem.This does mean we need to maintain a list of known theme keys so we know when there is a conflict between two keys, which is kind of unfortunate because up until now this was a totally dynamic thing. End users can still add whatever custom stuff they want under
@theme
but we don't really know about those namespaces since we're maintaining a static list so we can't resolve conflicts there. I'm confident there are ways we could solve this if it actually becomes a problem, so content to push forward without solving it right now and just deal with it if/when it actually arises, because it just might not.