Skip to content

feat(css-in-js): Allow passing a target document to rule attacher#1933

Draft
gabriellsh wants to merge 3 commits intomainfrom
fix/cssInJsDocument
Draft

feat(css-in-js): Allow passing a target document to rule attacher#1933
gabriellsh wants to merge 3 commits intomainfrom
fix/cssInJsDocument

Conversation

@gabriellsh
Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Today css-in-js directly references the window.document property in the style attachers. This is fine for our current use, but in some situations (such as portals inside popup windows) this can cause a mismatch between the document that the element is being rendered, and the document where the styles are being inserted.

This PR introduces an option to pass document as parameter, allowing for different target documents to be used.

Issue(s)

Further comments

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

⚠️ No Changeset found

Latest commit: f054245

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gabriellsh gabriellsh force-pushed the fix/cssInJsDocument branch from bd190bc to 5571d3a Compare April 13, 2026 21:39
@gabriellsh
Copy link
Copy Markdown
Member Author

@coderabbitai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant