Skip to content

Replace Monaco View Zones hack with proper editor padding #39

@bitjson

Description

@bitjson

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions