2018-11-01 23:32:17 +08:00
|
|
|
/*
|
|
|
|
Copyright 2018 New Vector Ltd
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2020-03-30 18:41:05 +08:00
|
|
|
// make any scrollbar grey and thin
|
|
|
|
html {
|
|
|
|
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
|
|
|
|
}
|
|
|
|
// scrollbar-width is not inherited (but -color is, why?!),
|
|
|
|
// so declare it on every element
|
|
|
|
* {
|
|
|
|
scrollbar-width: thin;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 6px;
|
|
|
|
height: 6px;
|
|
|
|
background-color: $scrollbar-track-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
border-radius: 3px;
|
|
|
|
background-color: $scrollbar-thumb-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// make auto-hide scrollbars not transparent again on hover
|
|
|
|
.mx_AutoHideScrollbar:hover {
|
|
|
|
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
|
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
background-color: $scrollbar-track-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background-color: $scrollbar-thumb-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// make scrollbars transparent for autohide scrollbars
|
2018-11-01 23:32:17 +08:00
|
|
|
.mx_AutoHideScrollbar {
|
2018-11-06 17:20:04 +08:00
|
|
|
overflow-x: hidden;
|
2018-11-01 23:32:17 +08:00
|
|
|
overflow-y: auto;
|
2020-03-26 02:24:32 +08:00
|
|
|
overflow-y: overlay; // where supported
|
2018-11-01 23:32:17 +08:00
|
|
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
|
|
|
2020-03-26 02:24:32 +08:00
|
|
|
&::-webkit-scrollbar {
|
|
|
|
background-color: transparent;
|
2018-11-12 19:57:21 +08:00
|
|
|
}
|
2018-11-01 23:32:17 +08:00
|
|
|
|
2020-03-26 02:24:32 +08:00
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background-color: transparent;
|
2018-11-12 19:57:21 +08:00
|
|
|
}
|
|
|
|
|
2020-03-26 02:24:32 +08:00
|
|
|
scrollbar-color: transparent transparent;
|
2019-01-22 02:01:18 +08:00
|
|
|
}
|