What happened?
:root leaks parser state into sibling classes inside @layer or @supports, so class declarations become variables instead of styles.
@layer utilities {
:root { --root-width: 10px; }
.after-root { width: 42px; }
}
Expected: class width 42. Actual: empty class style; vars.width is 42.
Follow-up to #668, #671 and #686: the media fix shipped, but the :root reset described in #671 is still missing in 1.12.1 and current main.
Steps to Reproduce
Clone the branch below, then run:
bun install --frozen-lockfile
cd packages/uniwind
bun run test:native --runInBand root-state
Four cases fail; the top-level control passes.
Snack or Repository Link
https://github.com/eliotgevers/uniwind/tree/repro/root-state-leak
Uniwind version
1.12.1 / main (5c233bf)
React Native Version
0.86.3 (repository test harness)
Platforms
Native CSS parser; reproduced with iOS configuration.
Expo
Yes
Additional information 〰
What happened?
:rootleaks parser state into sibling classes inside@layeror@supports, so class declarations become variables instead of styles.Expected: class width
42. Actual: empty class style;vars.widthis42.Follow-up to #668, #671 and #686: the media fix shipped, but the
:rootreset described in #671 is still missing in 1.12.1 and current main.Steps to Reproduce
Clone the branch below, then run:
bun install --frozen-lockfile cd packages/uniwind bun run test:native --runInBand root-stateFour cases fail; the top-level control passes.
Snack or Repository Link
https://github.com/eliotgevers/uniwind/tree/repro/root-state-leak
Uniwind version
1.12.1 / main (
5c233bf)React Native Version
0.86.3 (repository test harness)
Platforms
Native CSS parser; reproduced with iOS configuration.
Expo
Yes
Additional information 〰