@fe6/water-pro
Version:
An enterprise-class UI design language and Vue-based implementation
78 lines (64 loc) • 1.41 kB
text/less
@import '../../style/themes/index';
@import '../../style/mixins/index';
@scrollbar-prefix-cls: ~'@{ant-prefix}-scrollbar';
.@{scrollbar-prefix-cls} {
position: relative;
height: 100%;
overflow: hidden;
&-wrap {
height: 100%;
overflow: auto;
&-hidden-default {
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
opacity: 0;
}
}
}
&-thumb {
position: relative;
display: block;
width: 0;
height: 0;
background-color: rgba(144, 147, 153, 0.3);
border-radius: inherit;
cursor: pointer;
transition: 0.3s background-color;
&:hover {
background-color: rgba(144, 147, 153, 0.5);
}
}
&-bar {
position: absolute;
right: 2px;
bottom: 2px;
z-index: 1;
border-radius: 4px;
opacity: 0;
-webkit-transition: opacity 80ms ease;
transition: opacity 80ms ease;
&.is-vertical {
top: 2px;
width: 6px;
& > div {
width: 100%;
}
}
&.is-horizontal {
left: 2px;
height: 6px;
& > div {
height: 100%;
}
}
}
}
.@{scrollbar-prefix-cls}:active > .@{scrollbar-prefix-cls}-bar,
.@{scrollbar-prefix-cls}:focus > .@{scrollbar-prefix-cls}-bar,
.@{scrollbar-prefix-cls}:hover > .@{scrollbar-prefix-cls}-bar {
opacity: 1;
transition: opacity 340ms ease-out;
}