mirror of
https://github.com/cinnyapp/cinny.git
synced 2024-11-20 06:49:52 +01:00
Fix scrollbar padding for safari breaks other component styling
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
0a0b45fb8e
commit
80110d1a48
2 changed files with 9 additions and 10 deletions
|
@ -1,9 +1,17 @@
|
|||
@use '../../partials/dir';
|
||||
@use '_scrollbar';
|
||||
|
||||
@mixin paddingForSafari($padding) {
|
||||
@media not all and (min-resolution:.001dpcm) {
|
||||
@include dir.side(padding, 0, $padding);
|
||||
}
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@include scrollbar.scroll;
|
||||
@include paddingForSafari(var(--sp-extra-tight));
|
||||
|
||||
&__h {
|
||||
@include scrollbar.scroll__h;
|
||||
|
@ -18,5 +26,6 @@
|
|||
}
|
||||
&--invisible {
|
||||
@include scrollbar.scroll--invisible;
|
||||
@include paddingForSafari(0);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
@use '../../partials/dir';
|
||||
|
||||
.firefox-scrollbar {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--bg-surface-hover) transparent;
|
||||
|
@ -32,12 +30,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
@mixin paddingForSafari($padding) {
|
||||
@media not all and (min-resolution:.001dpcm) {
|
||||
@include dir.side(padding, 0, $padding);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin scroll {
|
||||
overflow: hidden;
|
||||
// Below code stop scroll when x-scrollable content come in timeline
|
||||
|
@ -46,7 +38,6 @@
|
|||
@extend .webkit-scrollbar;
|
||||
@extend .webkit-scrollbar-track;
|
||||
@extend .webkit-scrollbar-thumb;
|
||||
@include paddingForSafari(var(--sp-extra-tight));
|
||||
}
|
||||
|
||||
@mixin scroll__h {
|
||||
|
@ -67,7 +58,6 @@
|
|||
@mixin scroll--invisible {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
@include paddingForSafari(0);
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
|
|
Loading…
Reference in a new issue