microsoft / microsoft/monaco-editor
[Feature Request] Reducing style recalculations
Open
@hediet is already working on this.
Since May 2, 2023.
editor-core
feature-request
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Context
- This issue is not a bug report. (please use a different template for reporting a bug)
- This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
I'm profiling selectors for my app, and I'm seeing some of Monaco's selectors listed in there.
It's not a big deal, but it looks to me like some selectors should be made more specific. For example:
.monaco-button-dropdown .monaco-button-dropdown-separator > div.monaco-editor .view-zones .view-lines .view-line span.quick-input-list .quick-input-list-rows .monaco-highlighted-label span
span and div are very broad selectors, which will be matched against a million unrelated elements over the course of the lifetime of the app, I'd suggest exploring adding a dedicated class to the matched elements and using that class in the selector instead.
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.