Skip to content

Scope Monaco editor styles to the GraphiQL container - #4777

Draft
trevor-scheer wants to merge 2 commits into
mainfrom
trevor/scope-monaco-highlights
Draft

trevor-scheer wants to merge 2 commits into
mainfrom
trevor/scope-monaco-highlights

Conversation

@trevor-scheer

Copy link
Copy Markdown
Contributor

Loading @graphiql/react/style.css changes other Monaco editors on the page. With two editor roots, the compiled highlight and overflow-guard selectors match both, even when only one is inside GraphiQL. The outside editor's overflow guard switches from hidden to visible.

This scopes the editor overrides, including the hover and suggestion widgets, to :where(.graphiql-container). The selectors keep their existing specificity inside GraphiQL.

Fixes #4766

@changeset-bot

changeset-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4a198df

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

This PR includes changesets to release 1 package
Name Type
@graphiql/react 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

@ItaiYosephi

Copy link
Copy Markdown

Thanks, this covers #4766 for us. The .overflow-guard rule still breaks scrolling inside GraphiQL (#4088), so we'll keep patching that part.

This branch has not been deployed

No deployments
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.

[graphiql] Global .monaco-editor .highlight rule recolors every Monaco editor on the page

2 participants