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

fix(css): scoped css order with non-scoped css #19678

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

sapphi-red
Copy link
Member

Description

This PR changes the implementation of cssScopeTo support to the one proposed in #16058 from #19418.
The implementation in #19418 has a upside of a better chunking behavior, but had a downside of not preserving the style order when a single module has both scoped and non-scoped styles.

refs https://discord.com/channels/804011606160703521/804439875226173480/1349606289252028418
refs withastro/astro#13420

@sapphi-red sapphi-red added feat: css p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) labels Mar 19, 2025
@sapphi-red sapphi-red added this to the 6.3 milestone Mar 19, 2025
@sapphi-red
Copy link
Member Author

/ecosystem-ci run

Copy link

pkg-pr-new bot commented Mar 19, 2025

Open in Stackblitz

npm i https://pkg.pr.new/vite@19678

commit: 803860f

@vite-ecosystem-ci

This comment was marked as outdated.

bluwy
bluwy previously approved these changes Mar 19, 2025
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me if we want to go with a different implementation, and we could see how well it works and polish again 👍

@patak-dev patak-dev merged commit a3a94ab into vitejs:main Mar 20, 2025
16 checks passed
@sapphi-red sapphi-red deleted the fix/css-scoped-to-order branch March 24, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) trigger: preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants