tailwindcss/packages
Philipp Spiess 4c9df2209f
Don't escape underscores for the first parameter of var() (#14776)
This PR updates our arbitrary value decoder to:

- No longer require an escaping for underscores in the first parameter
of `var()`. Example:

    ```
    ml-[var(--spacing-1_5,_1rem)]
    ```

- Ensures that properties before an eventual `url()` are properly
unescaped. Example:
    ```
    bg-[no-repeat_url(./image.jpg)]
    ```

I will ensure that this properly works for the migrate use case in a
follow-up PR in the stack.

## Test Plan

Added unit tests as well as tests for the variant decoder. Additionally
this PR also adds a higher-level test using the public Tailwind APIs to
ensure this is properly propagated.

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2024-10-24 11:41:58 -04:00
..
@tailwindcss-cli Update picocolors 1.0.1 → 1.1.1 (minor) (#14771) 2024-10-24 11:25:50 +02:00
@tailwindcss-node Resolve third-party plugins with exports in their package.json (#14775) 2024-10-24 11:34:19 -04:00
@tailwindcss-postcss Prepare v4.0.0-alpha.29 release (#14761) 2024-10-23 15:30:26 +02:00
@tailwindcss-standalone Prepare v4.0.0-alpha.29 release (#14761) 2024-10-23 15:30:26 +02:00
@tailwindcss-upgrade Upgrade: Improve heuristics around important codemod (#14774) 2024-10-24 11:31:12 -04:00
@tailwindcss-vite Prepare v4.0.0-alpha.29 release (#14761) 2024-10-23 15:30:26 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Don't escape underscores for the first parameter of var() (#14776) 2024-10-24 11:41:58 -04:00
tsconfig.base.json introduce v4 codebase 2024-03-05 14:29:15 +01:00