bruits / bruits/zoecss

Arbitrary value type inference for polymorphic utilities

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
crt:presets-tailwindcss4
Dominant language
Rust
Stars
10
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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:

1. Detect value type from raw bracket content (colour, length, percentage, url, etc.)
2. Dispatch to the correct CSS property based on inferred type
3. Support explicit type hints as override: `bg-[color:var(--my-bg)]`, `text-[length:var(--size)]`

Depends on #20.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading dependency issue #20 and then trace the engine's handling of bracketed utility values. Check how the examples map raw values to CSS properties, including explicit type hints, and consider the work done when colour, length, percentage, URL, and override cases dispatch correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, tailwindcss
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.