forked from AkkomaGang/akkoma-fe
deal with browsers that don't support hiding scrollbars (somewhat)
This commit is contained in:
parent
2e10c1b0a3
commit
f4447eb3a0
1 changed files with 18 additions and 16 deletions
34
src/App.scss
34
src/App.scss
|
@ -27,14 +27,10 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply Custom scrollbars
|
// ## Custom scrollbars
|
||||||
|
// Only show custom scrollbars on devices which
|
||||||
|
// have a cursor/pointer to operate them
|
||||||
@media (any-pointer: fine) {
|
@media (any-pointer: fine) {
|
||||||
// Body should have background to scrollbar otherwise it will use white (body color?)
|
|
||||||
body {
|
|
||||||
background: var(--bg);
|
|
||||||
scrollbar-color: var(--btn) var(--bg);
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
* {
|
||||||
scrollbar-color: var(--btn) transparent;
|
scrollbar-color: var(--btn) transparent;
|
||||||
|
|
||||||
|
@ -96,6 +92,10 @@ body {
|
||||||
}
|
}
|
||||||
// stylelint-enable selector-pseudo-class-no-unknown
|
// stylelint-enable selector-pseudo-class-no-unknown
|
||||||
}
|
}
|
||||||
|
// Body should have background to scrollbar otherwise it will use white (body color?)
|
||||||
|
html {
|
||||||
|
scrollbar-color: var(--selectedMenu) var(--wallpaper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -225,16 +225,18 @@ nav {
|
||||||
margin-left: calc(var(--___paddingIncrease) * -1);
|
margin-left: calc(var(--___paddingIncrease) * -1);
|
||||||
padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
|
padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
|
||||||
|
|
||||||
// Only show custom scrollbars on devices which
|
// On browsers that don't support hiding scrollbars we enforce "show scrolbars" mode
|
||||||
// have a cursor/pointer to operate them
|
// might implement old style of hiding scrollbars later if there's demand
|
||||||
&:not(.-show-scrollbar) {
|
@supports (scrollbar-width: none) or (-webkit-text-fill-color: initial) {
|
||||||
scrollbar-width: none;
|
&:not(.-show-scrollbar) {
|
||||||
margin-right: calc(var(--___paddingIncrease) * -1);
|
scrollbar-width: none;
|
||||||
padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
|
margin-right: calc(var(--___paddingIncrease) * -1);
|
||||||
|
padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2);
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: block;
|
display: block;
|
||||||
width: 0;
|
width: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue