No description
Find a file
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
.github Add musl binaries to the Standalone CLI (#15567) 2025-01-09 09:24:33 -05:00
crates Prepare v4.0.0-beta.9 release (#15583) 2025-01-09 17:04:34 +00:00
integrations Update fast-glob 3.3.2 → 3.3.3 (patch) (#15607) 2025-01-13 11:11:35 +01:00
packages Resolve values in functional utilities based on @theme options (#15623) 2025-01-14 12:35:04 +01:00
patches Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
playgrounds Update fast-glob 3.3.2 → 3.3.3 (patch) (#15607) 2025-01-13 11:11:35 +01:00
scripts Fix integration tests on Windows (#14824) 2024-10-30 11:26:29 +00:00
.gitignore Add test.debug to integration tests (#14133) 2024-08-08 12:02:19 +02:00
.npmrc introduce v4 codebase 2024-03-05 14:29:15 +01:00
.prettierignore Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
Cargo.lock Auto source detection improvements (#14820) 2024-10-29 20:33:34 +00:00
Cargo.toml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
CHANGELOG.md Resolve values in functional utilities based on @theme options (#15623) 2025-01-14 12:35:04 +01:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
pnpm-lock.yaml Update @types/bun 1.1.14 → 1.1.16 (patch) (#15618) 2025-01-14 11:25:18 +01:00
pnpm-workspace.yaml Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
README.md Copy README file to every package (#13096) 2024-03-06 08:49:31 -05:00
rust-toolchain.toml Bring back rust-toolchain.toml (#14585) 2024-10-03 14:37:24 +00:00
turbo.json Auto source detection improvements (#14820) 2024-10-29 20:33:34 +00:00
vitest.workspace.ts introduce v4 codebase 2024-03-05 14:29:15 +01:00

Tailwind CSS

A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tailwind CSS on GitHub

For chatting with others using the framework:

Join the Tailwind CSS Discord Server

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.