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
..
2024-03-05 14:29:15 +01:00