[Bug] Incorrect CSS causes repaint with every caret blink
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Reproduction Steps
Enable "Paint Flashing" in Chrome dev tools (tested with Chrome 126.0.6478.127 on macOS 14.2.1 (23C71)).
In some cases, the dev tools paint reflash doesn't work for the embedded iframe in playground. However, the broken repaint on caret blink should still be observable in the editor on the left
Actual (Problematic) Behavior
- Try any monaco version after the referenced CSS change, including the latest one (
0.50.0) and observe the entire editor repaint with each caret blink
https://github.com/user-attachments/assets/e53de4d1-e800-474c-9e52-ed600700e10c
Expected Behavior
- Try again with a version before the referenced CSS change (eg:
0.43.0) and notice only the caret re-paints.
https://github.com/user-attachments/assets/d77c1383-5881-4a81-bd4e-d6e397237360
Additional Context
The CSS block here seems to be incorrect: https://github.com/microsoft/vscode/blob/1.91.1/src/vs/editor/standalone/browser/standalone-tokens.css#L40-L55
Presumably all the .monaco-editor, .monaco-diff-editor <foo> rules should instead be .monaco-editor <foo>, .monaco-diff-editor <foo>
As a side-effect, this change appears to cause the repaint on every caret blink as described above.
this behaviour is insane, destroys frame rate
can we get a fix for this?