Skip to content

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

Merged
tassoevan merged 4 commits intomainfrom
fix/cssInJsDocument
Apr 23, 2026
Merged

feat(css-in-js): Allow passing a target document to rule attacher#1933
tassoevan merged 4 commits intomainfrom
fix/cssInJsDocument

Conversation

@gabriellsh
Copy link
Copy Markdown
Member

@gabriellsh gabriellsh commented Apr 13, 2026

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)

PRD-323

Further comments

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 13, 2026

🦋 Changeset detected

Latest commit: 277c884

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@rocket.chat/css-in-js Minor
@rocket.chat/fuselage Patch
@rocket.chat/styled Patch
@rocket.chat/logo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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

@gabriellsh gabriellsh force-pushed the fix/cssInJsDocument branch from 01e9866 to ce7cd2f Compare April 23, 2026 18:54
@gabriellsh gabriellsh marked this pull request as ready for review April 23, 2026 18:54
@tassoevan tassoevan merged commit 00052dc into main Apr 23, 2026
7 checks passed
@tassoevan tassoevan deleted the fix/cssInJsDocument branch April 23, 2026 20:20
@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
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.

2 participants