TailwindCSS: Fixing Broken Custom Variants with @scope
A single fix addresses custom variants built with the `@scope` at-rule, which were generating CSS that browsers silently ignored. The change corrects how the at-rule wraps generated utilities so scoped variants actually work.
Duration: PT2M4S
Episode overview
This episode is a short developer briefing from TailwindCSS.
It explains recent repository work in plain language.
- Show: TailwindCSS
- Published: 2026-07-17T13:05:26Z
- Audio duration: PT2M4S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good evening, and welcome to TailwindCSS, your daily developer briefing for July 17th, 2026.
Tonight's focus is a single but important correctness fix in the framework's variant engine.
PR 20344, from contributor Udit Dewan, resolves an issue where custom variants defined with the "at scope" at-rule generated CSS that browsers simply don't apply. The bug: when you wrote a custom variant like "in-checkout" using "at scope," Tailwind was nesting the scope block inside the utility class instead of…
This is the kind of bug that's especially costly because it's invisible until you're staring at a page wondering why your scoped styling isn't showing up. The fix, tied to issue 18961, corrects the structure so the at-rule properly wraps the generated selector, restoring expected behavior for anyone using scoped…
The changes touch the abstract syntax tree handling and index logic — the core machinery responsible for how Tailwind assembles and orders generated CSS. That's a reminder that scoping and nesting logic in the engine is subtle, and edge cases like this can slip through until someone hits them in real usage.
On the housekeeping side, Robin Malfait pushed a small commit updating the…