Skip to content

Commit

Permalink
Overlay body scrollbar in all browsers (#246)
Browse files Browse the repository at this point in the history
* Apply viewport width to mixin `main-container`
  • Loading branch information
PaperStrike committed Apr 13, 2021
1 parent 4f9e3cf commit b02a186
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions source/css/_common/scaffolding/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
9 changes: 5 additions & 4 deletions source/css/_mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
1 change: 1 addition & 0 deletions source/css/_schemes/Pisces/_layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit b02a186

Please sign in to comment.