No description
Find a file
Philipp Spiess 9fd6766308
Ensure first argument to var(…) still unescapes \_ (#16206)
Resolves #16170

This PR fixes an issue where the previously opted-out escaping of the
first argument for the `var(…)` function was not unescaped at all. This
was introduced in https://github.com/tailwindlabs/tailwindcss/pull/14776
where the intention was to not require escaping of underscores in the
var function (e.g. `ml-[var(--spacing-1_5)]`). However, I do think it
still makes sense to unescape an eventually escaped underline for
consistency.

## Test plan

The example from #1670 now parses as expected:

<img width="904" alt="Screenshot 2025-02-03 at 13 51 35"
src="https://github.com/user-attachments/assets/cac0f06e-37da-4dcb-a554-9606d144a8d5"
/>

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2025-02-04 15:13:18 +01:00
.github Rename next to main (#15980) 2025-01-28 11:31:54 -05:00
crates Prepare v4.0.3 (#16146) 2025-02-01 12:38:55 +01:00
integrations Vite: Skip parsing stylesheets with the ?commonjs-proxy flag (#16238) 2025-02-04 12:45:23 +01:00
packages Ensure first argument to var(…) still unescapes \_ (#16206) 2025-02-04 15:13:18 +01:00
patches Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
playgrounds Ensure first argument to var(…) still unescapes \_ (#16206) 2025-02-04 15:13:18 +01:00
scripts Prepare v4.0.1 release (#16018) 2025-01-29 14:14:35 -05: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 Ensure first argument to var(…) still unescapes \_ (#16206) 2025-02-04 15:13:18 +01:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Update tsup 8.2.4 → 8.3.6 (minor) (#16155) 2025-02-03 11:20:51 +01:00
pnpm-lock.yaml Update tsup 8.2.4 → 8.3.6 (minor) (#16155) 2025-02-03 11:20:51 +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.