Skip to content

Commit eff9db4

Browse files
committed
bring back global style rules for thin scrollbars (also FF now!)
1 parent cf4f595 commit eff9db4

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

res/css/structures/_AutoHideScrollbar.scss

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,54 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
// make any scrollbar grey and thin
18+
html {
19+
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
20+
}
21+
// scrollbar-width is not inherited (but -color is, why?!),
22+
// so declare it on every element
23+
* {
24+
scrollbar-width: thin;
25+
}
26+
27+
::-webkit-scrollbar {
28+
width: 6px;
29+
height: 6px;
30+
background-color: $scrollbar-track-color;
31+
}
32+
33+
::-webkit-scrollbar-thumb {
34+
border-radius: 3px;
35+
background-color: $scrollbar-thumb-color;
36+
}
37+
38+
// make auto-hide scrollbars not transparent again on hover
39+
.mx_AutoHideScrollbar:hover {
40+
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
41+
42+
&::-webkit-scrollbar {
43+
background-color: $scrollbar-track-color;
44+
}
45+
46+
&::-webkit-scrollbar-thumb {
47+
background-color: $scrollbar-thumb-color;
48+
}
49+
}
50+
51+
// make scrollbars transparent for autohide scrollbars
1752
.mx_AutoHideScrollbar {
1853
overflow-x: hidden;
1954
overflow-y: auto;
2055
overflow-y: overlay; // where supported
2156
-ms-overflow-style: -ms-autohiding-scrollbar;
2257

2358
&::-webkit-scrollbar {
24-
width: 6px;
25-
height: 6px;
2659
background-color: transparent;
2760
}
2861

2962
&::-webkit-scrollbar-thumb {
30-
border-radius: 3px;
3163
background-color: transparent;
3264
}
3365

3466
scrollbar-color: transparent transparent;
35-
scrollbar-width: thin;
36-
}
37-
38-
.mx_AutoHideScrollbar:hover {
39-
&::-webkit-scrollbar {
40-
background-color: $scrollbar-track-color;
41-
}
42-
43-
&::-webkit-scrollbar-thumb {
44-
background-color: $scrollbar-thumb-color;
45-
}
46-
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
4767
}

0 commit comments

Comments
 (0)