naive-ui/styles/Scrollbar.scss

63 lines
1.2 KiB
SCSS
Raw Normal View History

2019-08-01 16:01:35 +08:00
/* stylelint-disable */
2019-07-31 17:31:35 +08:00
@import './mixins/mixins.scss';
@import './theme/default.scss';
@include b(scrollbar) {
position: relative;
height: 100%;
.n-scrollbar-vertical-rail, .n-scrollbar-horizontal-rail {
position: absolute;
user-select: none;
-moz-user-select: none;
.n-scrollbar-rail__scrollbar {
@include fade-in-transition(scrollbar);
position: absolute;
cursor: pointer;
background-color: $scrollbar-color;
&:hover {
background-color: $scrollbar-color--hover;
}
}
}
}
.n-scrollbar-horizontal-rail {
left: 0;
right: 0;
bottom: 2.5px;
.n-scrollbar-rail__scrollbar {
right: 0;
}
}
.n-scrollbar-vertical-rail {
position: absolute;
right: 2.5px;
top: 0;
bottom: 0;
.n-scrollbar-rail__scrollbar {
bottom: 0;
}
}
.n-scrollbar-container {
width: 100%;
overflow: scroll;
height: 100%;
max-height: inherit;
2019-07-31 17:31:35 +08:00
scrollbar-width: none;
&::-webkit-scrollbar {
width: 0;
height: 0;
}
}
.n-scrollbar-content {
width: fit-content;
2019-07-31 17:31:35 +08:00
overflow: visible;
2019-08-01 14:52:27 +08:00
min-width: 100%;
2019-08-07 16:56:07 +08:00
/** stylelint-disable */
width: -moz-fit-content; /* Firefox/Gecko */
width: -webkit-fit-content; /* Chrome */
/* stylelint-enable */
2019-07-31 17:31:35 +08:00
}