-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…4906) This PR fixes an issue where unsetting `--font-*` would unset `--font-weight-*` and `--font-size-*`. ```css @theme { --font-weight-bold: bold; --font-size-sm: 14px; --font-sans: sans-serif; --font-serif: serif; } @theme { --font-*: initial; --font-body: Inter; } ``` 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 default `font-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. --------- Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
- Loading branch information
1 parent
15fc7f4
commit a4f8a36
Showing
6 changed files
with
255 additions
and
115 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.