No description
Find a file
Robin Malfait cd4711cc21
Remove automatic var(…) injection (#13537)
* remove automatic `var(…)` injection

There are a few properties that use "dashed-ident" values, this means
that you can use `--my-thing` as-is without the `var(…)` around it.

This causes issues because we are now injecting a `var(…)` where it's not
needed.

One potential solution is to create a list of properties where dashed
idents can be used. However, they can _also_ use CSS custom properties
that point to another dashed ident.

A workaround that some people used is adding a `_` in front of the
variable: `mt-[_--my-thing]` this way we don't automatically inject the
`var(…)` around it. This is a workaround and gross.

While the idea of automatic var injection is neat, this causes more
trouble than it's worth. Adding `var(…)` explicitly is better.

A side effect of this is that we can simplify the `candidate` data
structure because we don't need to track `dashedIdent` separately
anymore.

* update tests by adding `var(…)` explicitly

* update changelog
2024-04-19 00:40:52 +02:00
.github Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
crates 4.0.0-alpha.14 (#13487) 2024-04-09 20:55:54 +02:00
packages Remove automatic var(…) injection (#13537) 2024-04-19 00:40:52 +02:00
playgrounds Ensure deterministic SSR builds in @tailwindcss/vite (#13457) 2024-04-08 18:10:08 -04:00
scripts Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
.gitignore Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04: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 remove Rust benchmarks and fixtures (#13335) 2024-03-23 16:16:40 +01:00
Cargo.toml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
CHANGELOG.md Remove automatic var(…) injection (#13537) 2024-04-19 00:40:52 +02:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
pnpm-lock.yaml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
pnpm-workspace.yaml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
README.md Copy README file to every package (#13096) 2024-03-06 08:49:31 -05:00
turbo.json introduce v4 codebase 2024-03-05 14:29:15 +01: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.