@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
46 lines (37 loc) • 882 B
text/less
[esl-scroll-lock] {
overflow: hidden ;
&:not(html[esl-scroll-lock='native'])::-webkit-scrollbar {
display: none ;
}
}
html[esl-scroll-lock] body {
overflow: hidden ;
}
html[esl-scroll-lock='native'] {
overflow-y: scroll ;
&[esl-scroll-lock-passive] {
overflow-y: hidden ;
}
body {
max-width: 100vw ;
max-height: 100vh ;
}
}
html[esl-scroll-lock='pseudo'],
html[esl-scroll-lock='background'] {
--s-lock-offset: 0;
padding-right: var(--s-lock-offset);
&:not([esl-scroll-lock-passive])::after {
content: '';
position: fixed;
top: 0;
right: 0;
bottom: 0;
overflow-y: scroll;
z-index: 1;
}
}
html[esl-scroll-lock='pseudo']:not([esl-scroll-lock-passive])::after {
// Pseudo scroll should be visible above the content
z-index: 999999;
}