From 9136622ffc7be0a15679f4280d65d40fb9c20d2e Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Sun, 24 Apr 2022 16:28:56 +0300 Subject: [PATCH] Img: Put captions to the right for normal galleries * It is places as usual on narrow screens. * The gray background is removed too. --- static/default.css | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/static/default.css b/static/default.css index 23009be..3279a83 100644 --- a/static/default.css +++ b/static/default.css @@ -148,8 +148,7 @@ article pre.codeblock { padding:.5rem; white-space: pre-wrap; border-radius: .25 .upload-amnt__unattach { display: block; } aside { clear: both; } -.img-gallery { text-align: center; margin-top: .25rem; margin-bottom: .25rem; } -.img-gallery_many-images { border-radius: .25rem; padding: .5rem; } +.img-gallery { margin-top: .25rem; margin-bottom: .25rem; } @media screen and (min-width: 700px) { .img-gallery_layout-grid { display: grid; @@ -161,6 +160,22 @@ aside { clear: both; } max-width: 50%; margin-left: 1em; } + + .img-gallery_layout-normal .img-gallery__entry { + } + .img-gallery_layout-normal .img-gallery__entry > a { + display: inline-block; + width: calc(100% - 320px); + } + .img-gallery_layout-normal .img-gallery__entry > a > img { + max-width: 100%; + } + .img-gallery_layout-normal figcaption { + display: inline-block; + width: 300px; + position: absolute; + padding-left: 1rem; + } } .img-gallery img { max-width: 100%; max-height: 50vh; } figure { margin: 0; } @@ -204,7 +219,6 @@ caption { caption-side: top; font-size: small; } p code, article .codeblock, -.img-gallery_many-images, .recent-changes__entry, table, .transclusion_stand-out { @@ -265,7 +279,6 @@ input[type="text"], input[type="password"], .btn, article code, article .codeblock, -.img-gallery_many-images, .recent-changes__entry, .history__entry, .upload-amnt,