Commit 6462600
fix(selector): bail on compound :has() selectors like &:has(${Icon}):hover
The loose HAS_COMPONENT_SELECTOR_RE regex matched any selector containing
&:has(__SC_EXPR_N__), letting compound forms like &:has(${Icon}):hover bypass
the interpolated-pseudo bailout. This caused them to fall through into the
descendant-component handler, producing invalid output with unresolved
placeholders. Now uses the strict anchored regex so only exact &:has(${Component})
selectors are handled; compound forms correctly bail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 16f46bf commit 6462600
File tree
2 files changed
+37
-3
lines changed- src
- __tests__
- internal/lower-rules
2 files changed
+37
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5633 | 5633 | | |
5634 | 5634 | | |
5635 | 5635 | | |
| 5636 | + | |
| 5637 | + | |
| 5638 | + | |
| 5639 | + | |
| 5640 | + | |
| 5641 | + | |
| 5642 | + | |
| 5643 | + | |
| 5644 | + | |
| 5645 | + | |
| 5646 | + | |
| 5647 | + | |
| 5648 | + | |
| 5649 | + | |
| 5650 | + | |
| 5651 | + | |
| 5652 | + | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
| 5666 | + | |
| 5667 | + | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
2283 | 2283 | | |
2284 | 2284 | | |
2285 | 2285 | | |
2286 | | - | |
2287 | | - | |
2288 | 2286 | | |
2289 | 2287 | | |
2290 | 2288 | | |
| |||
0 commit comments