tailwindcss/packages
Robin Malfait da2da51284
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;
}
```
2025-01-14 12:35:04 +01:00
..
@tailwindcss-browser Add missing main field for @tailwindcss/browser (#15594) 2025-01-10 07:39:00 -05:00
@tailwindcss-cli Prepare v4.0.0-beta.9 release (#15583) 2025-01-09 17:04:34 +00:00
@tailwindcss-node Prepare v4.0.0-beta.9 release (#15583) 2025-01-09 17:04:34 +00:00
@tailwindcss-postcss Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
@tailwindcss-standalone Update @types/bun 1.1.14 → 1.1.16 (patch) (#15618) 2025-01-14 11:25:18 +01:00
@tailwindcss-upgrade Update @types/braces 3.0.4 → 3.0.5 (patch) (#15612) 2025-01-13 10:53:47 +01:00
@tailwindcss-vite Prepare v4.0.0-beta.9 release (#15583) 2025-01-09 17:04:34 +00:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Resolve values in functional utilities based on @theme options (#15623) 2025-01-14 12:35:04 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00