Skip to content

Commit

Permalink
Merge pull request #2104 from xodio/fix-2103-scroll-in-cpp-editor
Browse files Browse the repository at this point in the history
Fix scroll in cpp editor
  • Loading branch information
brusherru committed Feb 19, 2021
2 parents c4b395d + d0a5418 commit dc02f6e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
@mixin scrollable-attachment($top, $scroll: scroll) {
position: absolute;
top: $top;
bottom: 0;
left: 0;
right: 0;
overflow: $scroll;
}

.AttachmentEditors {
display: flex;
width: 100%;
Expand All @@ -16,15 +25,16 @@
&.isActive {
display: flex;
flex-flow: column;
position: relative;
}

.cpp-editor {
display: flex;
flex-grow: 1;
position: relative;

.ReactCodeMirror {
width: 100%;
height: auto;
@include scrollable-attachment(0, hidden);
}
.CodeMirror-line, .CodeMirror-line * {
cursor: text;
Expand All @@ -35,13 +45,7 @@
}

.tabtest-editor {
position: absolute;
top: 40px;
bottom: 0;
left: 0;
right: 0;
overflow: scroll;

@include scrollable-attachment(40px);
@include styled-scrollbar();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
}

.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
/* The little square between H and V scrollbars */
opacity: 0;
}

/* GUTTER */
Expand Down

0 comments on commit dc02f6e

Please sign in to comment.