Uh oh!
There was an error while loading. Please reload this page.
fix(mobile): pressed and disabled styles no longer apply unconditionally - #9355
Conversation
Tailwind 4.3.3 stopped nesting variants under the utility class
(`.active\:x { &:active {} }`) and emits compound selectors instead
(`.active\:x:active {}`). Uniwind 1.11.0 only reads variant tokens from
nested rules, so after #9331 pinned the monorepo to 4.3.3 every `active:`,
`disabled:`, theme, data-* and rtl variant on mobile compiled as if it had
no condition. The visible symptom was the appearance screen: each theme
card's `active:bg-subtle` press overlay rendered permanently.
Extend the existing uniwind patch so the processor also reads variant
tokens that follow the leading class token, and drop compound selectors it
cannot express (`[aria-disabled="true"]`) instead of treating them as
unconditional, which matches what the nested form compiled to before.
Co-Authored-By: Claude Code <noreply@anthropic.com>Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused mobile CSS-processor compatibility fix that restores active, disabled, theme, RTL, and data-attribute conditions while dropping selectors the native runtime cannot represent. The accompanying lockfile change only updates the patch integrity reference, with no product-default or static-analysis configuration changes. You can add or adjust custom eligibility rules. Learn more. |
Problem
After #9331 pinned the monorepo to
tailwindcss@4.3.3, everyactive:,disabled:, theme,data-*andrtl:variant on mobile compiled as if it had no condition. The visible symptom (reported in #mobile-ios) was the Appearance screen: each theme card'sactive:bg-subtlepress overlay rendered permanently, so every card was tinted pink on T3 Chat. The same applies to every otheractive:press state in the app.Tailwind 4.3.3 stopped nesting variants under the utility class and emits compound selectors instead:
Uniwind 1.11.0 only reads variant tokens from nested rules, so on the flattened form it never sets the
active/disabled/themeflag.Fix
Extend the existing
patches/uniwind@1.11.0.patchso the processor also reads variant tokens that follow the leading class token. Compound selectors the runtime cannot express ([aria-disabled="true"]) are dropped instead of treated as unconditional, which matches what the nested form compiled to before. Both the four dist bundles and the TypeScript source in the patch are updated.Verified by running Uniwind's
ProcessorBuilderon both selector shapes and on the realapps/mobile/global.css:active:*entries now carryactive: true,disabled:*carrydisabled: true, plain utilities are unchanged.No screenshots: this was fixed on a Linux box without an iOS simulator. The before is in the Discord thread; a TestFlight build off this branch should show the theme cards back to
bg-card.Written by Claude Fable 5 in Claude Code.
🤖 Generated with Claude Code
Note
Medium Risk
Changes vendored Uniwind CSS compilation and native style reinit behavior; incorrect variant parsing could still mis-apply press/theme/disabled styles app-wide on mobile.
Overview
Extends the
uniwind@1.11.0patch so mobile styling works again after Tailwind 4.3.3 started emitting flat compound selectors (e.g..active\:bg-subtle:active) instead of nested&:activerules. Uniwind’sProcessorBuildernow pullsactive,disabled,focus, theme, RTL, anddata-*variant flags from tokens after the utility class viareadSelectorVariants/withSelectorVariants, and ignores trailing selector parts the native runtime cannot represent so they are not applied unconditionally.The Metro transformer also computes a SHA-256 fingerprint of compiled styles plus themes and passes it into
Uniwind.__reinit; in__DEV__, native config skips full reinit when the fingerprint is unchanged (avoids redundant work on hot reload).pnpm-lock.yamlupdates the patch hash for the enlarged patch.Reviewed by Cursor Bugbot for commit ff068fe. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix pressed and disabled styles applying unconditionally in mobile CSS processor
Patches
uniwind@1.11.0to fix selector-variant parsing sopressedanddisabledstyles only apply when their conditions match. Updates bundled outputs, Metro transformer sections, and native configuration to stay consistent with the patched parser.Macroscope summarized ff068fe.