commit 88a7fe7f703358048b01c341ef3a19a740969140
parent a63c3d490c566c9f235e6777c432e1144007e992
Author: Adriel Dumas--Jondeau <leirda@disroot.org>
Date: Sun, 23 Jun 2024 16:53:34 +0200
Set image size based on article width and horizontal available space
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/css/duper.css b/css/duper.css
@@ -116,11 +116,16 @@ header li > a {
article, footer {
max-width: var(--article-width);
- width: calc(100% - var(--page-padding));
+ width: calc(100vw - var(--page-padding));
margin: auto;
flex: 1 1 auto;
}
+img {
+ max-width: var(--article-width);
+ width: calc(100vw - var(--page-padding));
+}
+
pre {
display: inline-block;
width: inherit;
@@ -167,6 +172,4 @@ figcaption {
border-bottom-right-radius: var(--rounded);
}
-img {
- max-width: 100%;
}