element-web/res/css/structures/_AutoHideScrollbar.scss
Bruno Windels 0436507574 use transparent scrollbars on not hover to emulate scrolbar on hover
allows us to get rid of the margin-right hack as well
2020-03-26 11:17:35 +01:00

47 lines
1.3 KiB
SCSS

/*
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.
*/
.mx_AutoHideScrollbar {
overflow-x: hidden;
overflow-y: auto;
overflow-y: overlay; // where supported
-ms-overflow-style: -ms-autohiding-scrollbar;
&::-webkit-scrollbar {
width: 6px;
height: 6px;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: transparent;
}
scrollbar-color: transparent transparent;
scrollbar-width: thin;
}
.mx_AutoHideScrollbar:hover {
&::-webkit-scrollbar {
background-color: $scrollbar-track-color;
}
&::-webkit-scrollbar-thumb {
background-color: $scrollbar-thumb-color;
}
scrollbar-color: $scrollbar-thumb-color $scrollbar-track-color;
}