tailwindcss/crates/oxide
Robin Malfait 3cf5c2df79
Disallow empty arbitrary values (#15055)
This PR makes the candidate parser more strict by not allowing empty
arbitrary values.

Examples that are not allowed anymore:

- `bg-[]` — arbitrary value
- `bg-()` — arbitrary value, var shorthand
- `bg-[length:]` — arbitrary value, with typehint
- `bg-(length:)` — arbitrary value, with typehint, var shorthand
- `bg-red-500/[]` — arbitrary modifier
- `bg-red-500/()` — arbitrary modifier, var shorthand
- `data-[]:flex` — arbitrary value for variant
- `data-():flex` — arbitrary value for variant, var shorthand
- `group-visible/[]:flex` — arbitrary modifier for variant
- `group-visible/():flex` — arbitrary modifier for variant, var
shorthand

If you are trying to trick the parser by injecting some spaces like
this:

- `bg-[_]`

Then that is also not allowed.
2024-11-21 13:47:13 +01:00
..
fuzz Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
src Disallow empty arbitrary values (#15055) 2024-11-21 13:47:13 +01:00
tests Fix crash when using @source containing .. (#14831) 2024-10-30 16:24:48 -04:00
Cargo.toml Auto source detection improvements (#14820) 2024-10-29 20:33:34 +00:00