Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Monaco View Zones hack with proper editor padding #39

Open
bitjson opened this issue May 30, 2020 · 0 comments
Open

Replace Monaco View Zones hack with proper editor padding #39

bitjson opened this issue May 30, 2020 · 0 comments

Comments

@bitjson
Copy link
Member

bitjson commented May 30, 2020

Currently, Monaco editor doesn't support adding any sort of padding to the editor, but there are several strategies which can be used to emulate padding.

With just CSS padding, editor features are also shifted down. Note the scrollbar and scroll-decoration shadow are both 4px below the top of the "Channel" editor title bar:

Screen Shot 2020-05-30 at 1 14 06 PM

We're using the view zone strategy to add a single line of margin to the top of each editor instance. Unfortunately, this requires us to use exactly 18px of padding. If/when Monaco editor supports customizing the padding around the editor, we should replace the current view zones hack (and maybe choose between 6px and 12px for padding).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant