microsoft / microsoft/monaco-editor

[Bug] glyphMargin: true and box-sizing: border-box makes line number gap

Open
#3,902 1 comment 0 reactions 1 assignee View on GitHub

@aiday-mar is already working on this.

Since Apr 17, 2023.

blocked bug editor-sticky-scroll
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.37.1#XQAAAAIIAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0KlRmAlP8UHl2wTDSACH-qdgDy04VOvD7Jmc6fs3N2mfiPPtNst-DOIbdc9WJIeJWwyjb8mOmfUJc24lxnmNoRdr6Q_NvAjnBBoCgg2LG0hviUuu4TT9FTzrtAO_tKBhcgtkvfhveHzoXEBd_coQuqTNhcQSOTlwoDEU_Hdp2JMOGHejj2_ToZ7KYnX74e2I_NzKkg-GucTo22tvt_P7HEz6HsirBgVM3n5ieP7FAB0sY101IZ8umd08LOOY9hd3qpHkaNdNKg48zrCWKt_kGGt2Y6Y7azLaoN65Hfsk85SLfTxZytG616TqKoKaQlKE0iiWTs9M6-KwnjWkh5UWhM-iXv_9EPCkkks14DonFG6NNfsnY1GovtLK1jYmk5w9-xgihJscnLuX__av938

Monaco Editor Playground Code

No response

Reproduction Steps

glyphMargin: true and box-sizing: border-box

Actual (Problematic) Behavior

There is a gap in sticky scroll line number.

Expected Behavior

There is no gap in sticky scroll line number.

Additional Context

box-sizing: border-box is used for many UI framework because it is easier to calculate container size.
monaco-editor does not set box-sizing in style, so parent style is used.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.