@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
125 lines (124 loc) • 3 kB
CSS
esl-scrollbar {
display: inline-block;
position: absolute;
cursor: default;
overflow: hidden;
}
esl-scrollbar[inactive] {
visibility: hidden;
}
esl-scrollbar.page-scrollbar {
position: fixed;
}
esl-scrollbar .scrollbar-track {
position: relative;
border-radius: 3px;
background: #e7e7e7;
}
esl-scrollbar .scrollbar-thumb {
position: absolute;
cursor: pointer;
border-radius: 3px;
background: #b5b5b5;
}
esl-scrollbar .scrollbar-thumb::after {
content: '';
position: absolute;
top: -5px;
left: -5px;
width: calc(100% + 10px);
height: calc(100% + 10px);
}
esl-scrollbar[dragging] .scrollbar-thumb {
background: #9a9a9a;
}
esl-scrollbar:not([horizontal]) {
top: 0;
bottom: 0;
right: 0;
padding: 0 5px;
}
esl-scrollbar:not([horizontal]) .scrollbar-track {
top: 0;
width: 6px;
height: 100%;
}
esl-scrollbar:not([horizontal]) .scrollbar-thumb {
width: 100%;
height: 33.33%;
min-height: 10px;
touch-action: pan-x;
}
esl-scrollbar[horizontal] {
left: 0;
right: 0;
bottom: 0;
padding: 5px 0;
}
esl-scrollbar[horizontal] .scrollbar-track {
bottom: 0;
height: 6px;
width: 100%;
}
esl-scrollbar[horizontal] .scrollbar-thumb {
height: 100%;
width: 33.33%;
min-width: 10px;
touch-action: pan-y;
}
esl-scrollbar:not([horizontal]) {
padding-top: 15px;
padding-bottom: 15px;
}
esl-scrollbar:not([horizontal]) .scrollbar-track::before,
esl-scrollbar:not([horizontal]) .scrollbar-track::after {
content: '';
position: absolute;
display: block;
height: 10px;
width: 100%;
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' xml:space='preserve'%3E%3Cpolyline points='0,0 8,8 16,0' fill='none' stroke='%23BBBBBB' stroke-width='5'/%3E%3C/svg%3E");
background-repeat: no-repeat;
}
esl-scrollbar:not([horizontal]) .scrollbar-track::before {
top: -15px;
transform: scaleY(-1);
}
esl-scrollbar:not([horizontal]) .scrollbar-track::after {
bottom: -15px;
}
esl-scrollbar[horizontal] {
padding-left: 15px;
padding-right: 15px;
}
esl-scrollbar[horizontal] .scrollbar-track::before,
esl-scrollbar[horizontal] .scrollbar-track::after {
content: '';
position: absolute;
display: block;
height: 100%;
width: 10px;
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 16' xml:space='preserve'%3E%3Cpolyline points='0,16 8,8 0,0' fill='none' stroke='%23BBBBBB' stroke-width='5'/%3E%3C/svg%3E");
background-repeat: no-repeat;
}
esl-scrollbar[horizontal] .scrollbar-track::before {
left: -15px;
transform: scaleX(-1);
}
esl-scrollbar[horizontal] .scrollbar-track::after {
right: -15px;
}
esl-scrollbar[at-end] .scrollbar-track::after,
esl-scrollbar[at-start] .scrollbar-track::before {
opacity: 0.25;
}
.esl-scrollable-content {
overflow: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.esl-scrollable-content::-webkit-scrollbar {
display: none;
}