backgrounds: write a bracket no reader took into the longhand it named - #765
Merged
Merged
Conversation
samoht
added this pull request to stack #728
September 13, 2026 17:34
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
force-pushed
the
bg-last-resort
branch
from
September 13, 2026 19:26
36df3c7 to
5793905
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 becomebackground-size: auto, painting something the class never asked for. Follows #764.