Some Tailwind CSS v4 utility prefixes are polymorphic — the CSS property emitted depends on the value type inside brackets:
text-[#f00] → color: #f00 (colour)
text-[14px] → font-size: 14px (length)
bg-[#f00] → background-color: #f00 (colour)
bg-[url(...)] → background-image: url(...) (url)
The engine needs to:
- Detect value type from raw bracket content (colour, length, percentage, url, etc.)
- Dispatch to the correct CSS property based on inferred type
- Support explicit type hints as override:
bg-[color:var(--my-bg)], text-[length:var(--size)]
Depends on #20.
Some Tailwind CSS v4 utility prefixes are polymorphic — the CSS property emitted depends on the value type inside brackets:
text-[#f00]→color: #f00(colour)text-[14px]→font-size: 14px(length)bg-[#f00]→background-color: #f00(colour)bg-[url(...)]→background-image: url(...)(url)The engine needs to:
bg-[color:var(--my-bg)],text-[length:var(--size)]Depends on #20.