Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong "Unused CSS selector" in slotted content #15027

Closed
oub opened this issue Jan 15, 2025 · 1 comment · Fixed by #15106
Closed

Wrong "Unused CSS selector" in slotted content #15027

oub opened this issue Jan 15, 2025 · 1 comment · Fixed by #15106
Labels
css Stuff related to Svelte's built-in CSS handling

Comments

@oub
Copy link

oub commented Jan 15, 2025

Describe the bug

CSS :has selector is incorrectly reported as unused in slotted content.

Reproduction

https://svelte.dev/playground/f4f152811664414b927a42289c904a52?version=5.18.0

Logs

System Info

System:                                              
    OS: Windows 11 10.0.22631                          
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i5-1350P  
    Memory: 15.85 GB / 31.69 GB                        
  Binaries:                                            
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE   
    npm: 10.2.5 - C:\Program Files\nodejs\npm.CMD      
    pnpm: 9.15.2 - ~\AppData\Local\pnpm\pnpm.CMD       
  Browsers:                                            
    Internet Explorer: 11.0.22621.3527                 
  npmPackages:                                         
    svelte: ^5.18.0 => 5.18.0

Severity

blocking an upgrade

@oub oub changed the title Wrong "Unused CSS selector" in sloted content Wrong "Unused CSS selector" in slotted content Jan 15, 2025
@dummdidumm dummdidumm added the css Stuff related to Svelte's built-in CSS handling label Jan 15, 2025
@dummdidumm
Copy link
Member

Feels related to #14995, in that the :has logic seems to work only at the top level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css Stuff related to Svelte's built-in CSS handling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants