v6: Make the font-size setting reach body text#4427
Merged
Conversation
The DEPRECATED `.graphiql-container` block in `root.css` redeclared `--font-size-body`, colliding with the v6 preset token of the same name in `tokens.css`. Both selectors have specificity (0,1,0) and the frozen block comes later (after `@import 'tokens.css'`), so `calc(15rem / 16)` always won and Settings > Font size never reached body text. Point the legacy CodeMirror-based code-exporter plugin at the renamed variable so it keeps its frozen 15px.
|
trevor-scheer
marked this pull request as ready for review
July 15, 2026 01:09
trevor-scheer
enabled auto-merge (squash)
July 15, 2026 01:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--font-size-bodyis declared twice: as a scaling preset token intokens.css(:root, [data-font-size='default'|'compact'|'large'|'xl']), and as a frozen v5 value inroot.css's DEPRECATED.graphiql-containerblock. Both selectors have specificity (0,1,0) and the frozen block comes later (after@import 'tokens.css'), socalc(15rem / 16)always won.var(--font-size-body)— the.graphiql-containerbase font-size,button,dialog,dropdown-menu,top-bar, and the collections / doc-explorer / query-builder plugins — has silently been pinned to 15px, so Settings > Font size never touched body text even though the code looked correct. The sibling preset tokens (--font-size-small,--font-size-mono,--font-size-eyebrow) were unaffected because they aren't redeclared in that block.Changes
root.css: renamed--font-size-body: calc(15rem / 16)to--font-size-body-legacyin the DEPRECATED.graphiql-containerblock.graphiql-plugin-code-exporter/src/index.css: pointed the CodeMirror-based plugin atvar(--font-size-body-legacy)so it keeps rendering at the frozen 15px.Validation Steps