Skip to content

Commit

Permalink
Fix min-width when open sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jul 11, 2018
1 parent f4d5b32 commit ebff1ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/scss/layouts/_bottom-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
z-index: map-get($z-indexes, c-post-bottom-bar);
transition: transform .25s ease-in-out;
-webkit-transition: -webkit-transform .25s ease-in-out;

min-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)});
@media only screen and (max-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)})) {
min-width: 100%;
}
}

@media #{$small-and-down} {
Expand Down
5 changes: 5 additions & 0 deletions src/scss/layouts/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
-webkit-backface-visibility: hidden;
-webkit-perspective: 1000;

min-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)});
@media only screen and (max-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)})) {
min-width: 100%;
}

#btn-open-sidebar {
position: absolute;
// vertical center
Expand Down
5 changes: 5 additions & 0 deletions src/scss/layouts/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
transition: transform .25s ease-in-out;
-webkit-transition: -webkit-transform .25s ease-in-out;

min-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)});
@media only screen and (max-width: calc(#{map-get($main-content, max-width)} + 2 * #{map-get($main-content, padding-right-left)})) {
min-width: 100%;
}

&.hasCover {
// Set `padding-top` to `50px` when there is a cover image on page and
// if there is a cover caption or
Expand Down

Large diffs are not rendered by default.

0 comments on commit ebff1ac

Please sign in to comment.