Fit images onto screen even in mobile view
The images in mobile view were spilling out a bit; this commit
adjusts the margins to make it more mobile-friendly. In fact,
that part of the CSS is now "mobile first" with an exception
for devices thar are *larger* than a certain size 😉
This commit is contained in:
parent
93d41d23ab
commit
e85374629c
1 changed files with 9 additions and 2 deletions
|
@ -121,9 +121,16 @@ h2 + h3 {
|
|||
}
|
||||
|
||||
.main img {
|
||||
max-width: min(40em, 100vw);
|
||||
max-width: min(40em, calc(100vw - 2em));
|
||||
max-height: 100vh;
|
||||
margin: 1em auto;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media(min-width: 640px) {
|
||||
.main img {
|
||||
max-width: min(40em, calc(100vw - 4em));
|
||||
margin: 1em auto;
|
||||
}
|
||||
}
|
||||
|
||||
.post-list {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue