-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Svelte 5: :where
is inconsequently applied across multiple selectors when using SCSS placeholder
#10710
Comments
:where
on scoped classes
I think this should be reported to https://github.com/sveltejs/svelte. If I manually preprocess the SCSS to CSS and paste that to the Svelte REPL, I can see that Svelte isn't correctly adding the scoped classes. I'll transfer this issue there. |
:where
on scoped classes:where
is inconsequently applied across multiple selectors when using SCSS placeholder
:where
is inconsequently applied across multiple selectors when using SCSS placeholder:where
is inconsequently applied across multiple selectors when using SCSS placeholder
Fixed by #10730 |
It looks like we are ditching <div>
<span class="a">A</span>
<span class="b">B</span>
<span class="c">C</span>
</div>
<style lang="scss">
%is-test {
color: red;
}
div {
.a {
@extend %is-test;
}
}
.b {
@extend %is-test;
}
.c {
@extend %is-test;
}
</style> The outcome here is: .c.svelte-2znujd, .b.svelte-2znujd, div.svelte-2znujd .a:where(.svelte-2znujd) {
color: red;
} Is the redundancy for nesting selectors intended? |
The |
Describe the bug
Creating a SCSS placeholder and applying it to multiple class selectors within scoped style block leads to every selector but the last to inherit the placeholder's property not directly but through the
:where
pseudo, see reproduction below.Reproduction
npm install -D sass
as required./src/routes/+page.svelte
:Expected outcome:
or
Actual outcome:
Logs
No response
System Info
Severity
Blocking an upgrade
The text was updated successfully, but these errors were encountered: