Skip to content

Commit

Permalink
fix: monaco editor overflowing at certain zoom levels
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmmcken committed Jan 22, 2025
1 parent 5f6c8d6 commit b58b9a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/console/src/notebook/Editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
// override default scroll container shadow to match our global shadows
--vscode-scrollbar-shadow: var(--dh-color-dropshadow);

// monaco editor sets an inline width in pixels which are rounded up to the nearest pixel.
// when zoomed, actual width can be a fractional width, and that rounding up can cause overflow
width: 100% !important; // override inline width
.overflow-guard {
width: 100% !important; // override inline width
}

// set font for menus
font-family: var(--font-family-sans-serif);
.shadow-root-host {
Expand All @@ -20,7 +27,7 @@
// The classes come from Monaco itself, not core or web-client-ui
.rendered-markdown.markdown-docs {
min-width: 12rem;

hr {
background-color: $text-muted;
height: 1px;
Expand Down

0 comments on commit b58b9a3

Please sign in to comment.