fix: make the rename symbol popup readable in dark mode#10091
Merged
Conversation
The F2 rename popup is rendered by @marimo-team/codemirror-languageserver, which hardcodes `background: white` on the popup and sets no color on its input as inline styles. In dark mode this produced light text on a white background (unreadable). Add a CSS override in codemirror.css using the existing theme tokens so the popup follows light/dark themes. `!important` is required to beat the upstream inline styles; the popup is appended to document.body so it is not scoped under #root. Fixes #9197
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the CodeMirror F2 “rename symbol” popup styling so it remains readable in dark mode by overriding upstream inline styles with marimo theme tokens.
Changes:
- Add global CSS overrides for
.cm-rename-popupand itsinputto use--popover/--popover-foregroundand--background/--foregroundtokens. - Use
!importantto reliably override upstream inline styling for a popup appended todocument.body(outside#root).
Contributor
There was a problem hiding this comment.
No issues found across 1 file
Architecture diagram
sequenceDiagram
participant User as Developer (F2 key)
participant Editor as CodeMirror Editor
participant LS as codemirror-languageserver
participant Body as document.body
participant CSS as codemirror.css
participant Renderer as Browser Renderer
User->>Editor: Press F2
Editor->>LS: Trigger rename
LS->>LS: Create popup element with inline styles (background: white, no color on input)
LS->>Body: Append .cm-rename-popup to document.body
Note over LS,Body: Popup not scoped under #root
CSS->>CSS: Apply .cm-rename-popup overrides with !important
Note over CSS: Uses var(--popover), var(--border), var(--foreground) etc.
CSS->>Renderer: Declare overridden styles
Renderer->>Renderer: Repaint popup with theme tokens
Renderer-->>User: Popup readable in dark/light mode
Light2Dark
previously approved these changes
Jul 8, 2026
Light2Dark
approved these changes
Jul 8, 2026
Contributor
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.14-dev24 |
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.
The F2 rename popup is rendered by @marimo-team/codemirror-languageserver,
which hardcodes
background: whiteon the popup and sets no color on itsinput as inline styles. In dark mode this produced light text on a white
background (unreadable). Add a CSS override in codemirror.css using the
existing theme tokens so the popup follows light/dark themes.
!importantis required to beat the upstream inline styles; the popup is appended to
document.body so it is not scoped under #root.
Fixes #9197