Skip to content

Commit 6fc4ca1

Browse files
authored
Merge pull request #9 from ScottLogic/add-custom-scrollbar-to-editor
Add custom scrollbar to editor
2 parents 7f0f161 + 2d1d69d commit 6fc4ca1

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

styles/editor.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
$scroll-width: 10px;
3+
24
.editor-panel {
35
position: relative;
46

@@ -9,7 +11,7 @@
911

1012
.button-container {
1113
position: absolute;
12-
right: 0;
14+
right: $scroll-width;
1315
bottom: 0;
1416
}
1517

@@ -50,3 +52,13 @@
5052
}
5153
}
5254
}
55+
56+
57+
.ace_scrollbar.ace_scrollbar-v {
58+
@include withScrollbar($scroll-width);
59+
width: $scroll-width !important;
60+
}
61+
62+
.ace_scroller {
63+
right: $scroll-width !important;
64+
}

styles/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
@import 'scrollbar.scss';
2+
@import "scrollbar.scss";
33
@import "messages.scss";
44
@import "editor.scss";
55
@import "console.scss";

styles/scrollbar.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
@mixin withScrollbar() {
1+
@mixin withScrollbar($width: 6px, $color: #32465a) {
22
&::-webkit-scrollbar
33
{
4-
width: 6px;
4+
width: $width;
55
background-color: #F5F5F5;
66
&-track
77
{
8-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
8+
-webkit-box-shadow: inset 0 0 $width rgba(0,0,0,0.3);
99
background-color: #F5F5F5;
1010
}
1111
&-thumb
1212
{
13-
background-color: #32465a;
13+
background-color: $color;
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)