Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve values in functional utilities based on
@theme
options (#15623
) This PR fixes an issue where functional utilities configured via CSS don't resolve the values correctly. We always fully resolved the values as-if a `@theme inline` was used. We used to compile the following code: ```css @theme { --tab-size-github: 8; } @Utility tab-* { tab-size: --value(--tab-size); } ``` Into: ```css :root { --tab-size-github: 8; } .tab-github { tab-size: 8; } ``` But it should be referencing the variable instead: ```css :root { --tab-size-github: 8; } .tab-github { tab-size: var(--tab-size-github); } ``` However, if you used `@theme inline reference`, it should inline the value: ```css @theme inline reference { --tab-size-github: 8; } @Utility tab-* { tab-size: --value(--tab-size); } ``` This will now correctly compile to: ```css .tab-github { tab-size: 8; } ```
- Loading branch information