You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix infinite recursion in theme variable lookups (#1473)
Fixes#1463
We'll have to bail in some cases that we didn't before to fix this. This
seems fine though. The core problem was that given this theme:
```css
@theme {
--radius: calc(var(--radius));
}
```
We'd see this CSS:
```css
.rounded {
border-radius: calc(var(--radius));
}
```
And we'd try to replace variables in `calc(var(--radius))`. This doesn't
_start_ with a var(…) so our recursion guards didn't catch this.
This entire system is a bit fragile and I'll be working to clean this up
along with how we handle pixel equivalents, light-dark replacements,
color-mix replacements, etc… in some future PRs (#1330 is one of those
but I want to reorganize + tweak some code first in an earlier PR which
will make that one "nicer")
0 commit comments