Skip to content

Commit

Permalink
Leave a bit of margin in vertical layout (so one can scroll on mobile…
Browse files Browse the repository at this point in the history
… devices)
  • Loading branch information
ceriottm authored and Luthaf committed Dec 18, 2023
1 parent 9847071 commit df83b53
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ header {
}

.navbar {
max-width: 1140px;
max-width: 1100px;
margin-bottom: 1em;
z-index: 999;
background-color: inherit;
Expand All @@ -64,22 +64,23 @@ main.container-fluid {
width: 100%;
}

@media screen and (min-width: 1200px) {
@media screen and (min-width: 900px) {
main.container-fluid {
margin: 2em 2em calc(2em + var(--header-height)) 2em;
width: calc(100% - 4em);
}
}

@media screen and (min-width: 1500px) {
@media screen and (min-width: 1200px) {
main.container-fluid {
margin: 2em auto calc(2em + var(--header-height)) auto;
width: 1500px;
width: 1200px;
}
}

main .ratio {
margin: auto;
width: 90%;
}

main .ratio > * {
Expand All @@ -98,12 +99,13 @@ main .ratio > * {

@media screen and (min-width: 768px) {
.ratio-5x7 {
max-height: calc(100vh - 2em - var(--header-height) - var(--footer-height));
max-height: calc(100vh - 2em - var(--header-height) - var(--footer-height));
}

main .ratio {
/* set the width to fit the vertical space, and the height will be set automatically */
max-width: calc(100vh - 2em - var(--header-height) - var(--footer-height));
width: 100%;
}
}

Expand Down

0 comments on commit df83b53

Please sign in to comment.