Overlay body scrollbar in all browsers (#246)

* Apply viewport width to mixin `main-container`
This commit is contained in:
2021-04-13 15:31:35 +08:00 committed by GitHub
parent 4f9e3cfaba
commit b02a186765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

View File

@ -14,6 +14,10 @@ body {
font-size: $font-size-base;
line-height: $line-height-base;
min-height: 100%;
overflow-x: hidden;
@supports (overflow-x: clip) {
overflow-x: clip;
}
position: relative;
transition: padding $transition-ease;
}

View File

@ -108,15 +108,16 @@ font-family-icons($icon = '') {
}
main-container() {
margin: 0 auto;
width: $content-desktop;
--width: $content-desktop;
margin: 0 calc((100vw - var(--width)) / 2);
width: var(--width);
+desktop-large() {
width: $content-desktop-large;
--width: $content-desktop-large;
}
+desktop-largest() {
width: $content-desktop-largest;
--width: $content-desktop-largest;
}
}

View File

@ -2,6 +2,7 @@
background: var(--content-bg-color);
border-radius: $border-radius-inner;
box-shadow: $box-shadow-inner;
margin: 0 auto;
width: $sidebar-desktop;
+tablet-mobile() {