Skip to content

backgrounds: write a bracket no reader took into the longhand it named - #765

Merged
samoht merged 4 commits into
colour-last-resort-sweepfrom
bg-last-resort
Sep 14, 2026
Merged

samoht merged 4 commits into
colour-last-resort-sweepfrom
bg-last-resort

Conversation

@samoht

@samoht samoht commented Sep 13, 2026

Copy link
Copy Markdown
Owner

bg- was the last colour family refusing a bracket every other one now writes through, and refusing drops the selector. Its bracket runs through a size, a position, an image and a url, so each reader forwards its own value and only the unhinted fall-through reaches the colour. An unreadable size used to become background-size: auto, painting something the class never asked for. Follows #764.

These pinned tw's refusals where the CLI writes the value through, and
bg-[size:notasize] pinned nothing at all: tw substituted background-size:
auto, painting a value the class never asked for. Two brackets glued
together stay refused, which the CLI agrees with.
bg- was the last colour family refusing a bracket every other one now
writes through, and refusing drops the selector. Its bracket runs through
a size, a position, an image and a url, so each reader forwards its own
value and only the unhinted fall-through reaches the colour.

An unreadable size used to become background-size: auto, which paints
something the class never asked for; it is now forwarded like the rest.
The fall-through is gated on the text being one bracket value, so
bg-[10px][20px] stays refused, as it is upstream.
A theme() or --theme() call is resolved before a family's reader sees the
bracket, so one still standing in the text is a lookup that declined.
Tailwind emits nothing for such a class, so it is not a token stream for
the last resort to forward: bg-[--theme(--color-red-500/25%)] carries an
alpha the resolver does not take.
@samoht
samoht merged commit 3632d69 into main Sep 14, 2026
3 checks passed
@samoht
samoht deleted the bg-last-resort branch September 14, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant