* add test that verifies that parsing `bg-red-[#0088cc]` should not work * improve parsing of arbitrary values, root is known When using arbitrary values such as `bg-[#0088cc]` then we know that everything before the `-[` part is the `root` of the utility. This also means that this should exist in the design system as-is. If we use `findRoot` instead, it means that `bg-red-[#0088cc]` would also just parse fine and we don't want. * small refactor: define `important` and `negative` directly It's not necessary to track state in a state object. Let's use the variables directly. * small refactor: use return on same line for consistency * add test that verifies that parsing `bg-` should not work * move `value === ''` check up The value doesn't change anymore, which means we can discard early and don't need to start creating candidate objects. * adjust comment with example * update changelog |
||
|---|---|---|
| .. | ||
| @tailwindcss-cli | ||
| @tailwindcss-postcss | ||
| @tailwindcss-vite | ||
| tailwindcss | ||
| tsconfig.base.json | ||