Scale lightbox image to fill viewport
This commit is contained in:
@@ -205,14 +205,14 @@ div.navigation {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 24px;
|
padding: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.lightbox-content img {
|
.lightbox-content img {
|
||||||
max-width: 95vw;
|
/* Fill the dark area as much as possible while keeping aspect ratio */
|
||||||
max-height: 95vh;
|
width: 98vw;
|
||||||
width: auto;
|
height: 98vh;
|
||||||
height: auto;
|
object-fit: contain;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
background: #000;
|
background: #000;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user