You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When applying scoped CSS to pseudo-elements in CSS selectors that only contain pseudo-classes, Astro incorrectly appends the :where clause to the ::before or ::after pseudo-element, stopping it from working altogether:
<style>
/* Works as expected */
ul > li::after,
ul > .fox::after,
ul > *::after,
ul > li:not(:first-child)::after,
{
content: "🦊";
}
/* Does NOT work as expected */
ul > ::after,
ul > :not(:first-child)::after {
content: "🦊";
}
</style>
Expected:
The latter CSS block should compile to the following:
What version of
astro
are you using?2.4.4
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Arch Linux, 6.3.1
What browser are you using?
Firefox
Describe the Bug
When applying scoped CSS to pseudo-elements in CSS selectors that only contain pseudo-classes, Astro incorrectly appends the
:where
clause to the::before
or::after
pseudo-element, stopping it from working altogether:Expected:
The latter CSS block should compile to the following:
Actual:
Instead, it gets compiled to this:
I'd be willing to submit a pull request for this issue, but I would need guidance as to which parts of the codebase would need to be changed.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-lyys7u?file=src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: