-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Is is possible to add padding between the gutter and code? #200
Comments
There is a gap between the line numbers and the content called So |
Thanks for the answer @alexandrudima! But like you said, perhaps |
In case it helps, this has worked for me: .monaco-editor .view-line {
padding-left: 5px;
} |
I think there should be an option for The following code was needed to cover all (until now) known cases: /* padding between the gutter and code */
.monaco-editor .view-line {
padding-left: 5px;
}
/* fix cursor location */
.monaco-editor .cursor {
margin-left: 5px;
}
/* fix highlighted text selection */
.monaco-editor .selectionHighlight {
margin-left: 5px;
}
/* fix highlighted brackets */
.monaco-editor .bracket-match {
margin-left: 5px;
}
/* fix multiline text selection */
.monaco-editor .cslr.selected-text {
margin-left: 5px;
}
/* fix multiline text selection */
.monaco-editor .bottom-left-radius, .monaco-editor .top-left-radius {
margin-left: 5px;
} |
We're also looking for this functionality if anyone's got a solution or there's something being added to the styling options. The solution @svoboda-jan suggested doesn't seem to work in our case (the cursor ends up not being where the actual text is being inserted). N |
@svoboda-jan .monaco-editor .view-line,
.monaco-editor .view-overlays,
.monaco-editor .cursor {
margin-top: 10px;
} |
This was enough in my case: .monaco-editor .lines-content {
padding-left: 5px;
} |
monaco-editor npm version: 0.6.1
I have monaco styled similarly to below:
Is there a way to add a few pixels of padding between the edge of the gutter and the start of the code?
I noticed I could adjust the
left
CSS value of.monaco-scrollable-element
, but it seems that most of the widths throughout the editor are computed, and I'm worried about changing inline styles like that.The text was updated successfully, but these errors were encountered: