Skip to content

Commit

Permalink
fix code mirror layout for line number area and boders
Browse files Browse the repository at this point in the history
  • Loading branch information
haschek committed Sep 26, 2023
1 parent 508148c commit cb1a23f
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions src/extensions/codemirror/_codemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,41 @@
box-shadow: input-transition-shadow($input-shadow-color-focus, true), $input-box-shadow-focus;
}

.CodeMirror-gutters {
// allow "borders" to shine through
background-color: rgb(0 0 0 / 5%);
}

.CodeMirror-scroll {
width: calc(100% - 2px);
height: calc(100% - 2px);

// fix size to prevent wrong calculation of other elements
padding: 0;
margin: 1px;
cursor: text;

// remove scrollbars, codemirrow has own elements to fake them
scrollbar-width: none; // Firefox
-ms-overflow-style: none; // IE, Edge
&::-webkit-scrollbar {
display: none; // Chrome, Safari and Opera
}
}

.CodeMirror-hscrollbar {
bottom: 1px;
height: $eccgui-size-inline-whitespace !important;
}

.CodeMirror-vscrollbar {
top: 1px;
right: 1px;
width: $eccgui-size-inline-whitespace !important;
}

.CodeMirror-scrollbar-filler {
right: 1px;
bottom: 1px;
}

.CodeMirror-sizer {
border-right-width: $eccgui-size-inline-whitespace !important;
}
}
}
Expand Down

0 comments on commit cb1a23f

Please sign in to comment.