fix(nuxt): apply scoped styles to server component slots by oritwoen · Pull Request #36047 · nuxt/nuxt · GitHub
Skip to content

fix(nuxt): apply scoped styles to server component slots - #36047

Merged
danielroe merged 13 commits into
nuxt:mainfrom
oritwoen:fix/server-component-slotted-styles
Aug 13, 2026
Merged

danielroe merged 13 commits into
nuxt:mainfrom
oritwoen:fix/server-component-slotted-styles

Conversation

@oritwoen

@oritwoen oritwoen commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🔗 Linked issue

resolves #31510

📚 Description

Server component slots lose Vue's slotted scope marker when their content is teleported into an island. This carries the server component's scope ID with the slot payload and restores the -s marker. The original Vite reproduction is fixed; with webpack and Rspack, scoped :slotted() styles can still fail when server and client builds generate different scope IDs.

@oritwoen
oritwoen requested a review from danielroe as a code owner August 11, 2026 20:08
@github-actions github-actions Bot added 5.x 🐛 bug Something isn't working as expected labels Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@36047

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@36047

nuxt

npm i https://pkg.pr.new/nuxt@36047

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@36047

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@36047

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@36047

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@36047

commit: aecb7e5

@codspeed

codspeed Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing oritwoen:fix/server-component-slotted-styles (aecb7e5) with main (2409d92)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@oritwoen
oritwoen marked this pull request as draft August 11, 2026 21:09
@oritwoen
oritwoen force-pushed the fix/server-component-slotted-styles branch from f0f6ac1 to 8a95bf4 Compare August 12, 2026 10:29
@oritwoen
oritwoen marked this pull request as ready for review August 12, 2026 11:54
Comment thread docs/3.guide/1.concepts/6.server-components.md Outdated
@danielroe

Copy link
Copy Markdown
Member

oops

@danielroe
danielroe added this pull request to the merge queue Aug 13, 2026

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you ❤️

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 13, 2026
@danielroe
danielroe added this pull request to the merge queue Aug 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 13, 2026
@danielroe
danielroe enabled auto-merge August 13, 2026 08:50
@danielroe
danielroe added this pull request to the merge queue Aug 13, 2026
Merged via the queue into nuxt:main with commit e673c55 Aug 13, 2026
56 of 58 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
2 of 5 tasks
danielroe added a commit that referenced this pull request Aug 14, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
@github-actions github-actions Bot mentioned this pull request Aug 12, 2026
This was referenced Aug 25, 2026
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🐛 bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

:slotted() style is ignored in server component slots

2 participants