From f9ef496c1288c35b8735d9500a917076042cad16 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Sun, 25 Dec 2022 09:52:45 +0300 Subject: [PATCH] japanese sentences: change grid columns --- templates/Japanese sentences/template.css | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/templates/Japanese sentences/template.css b/templates/Japanese sentences/template.css index 06953e3..ddc47e8 100644 --- a/templates/Japanese sentences/template.css +++ b/templates/Japanese sentences/template.css @@ -310,28 +310,26 @@ footer>a:not(:last-child)::after { gap: 5px; grid-auto-columns: minmax(100px, 1fr); grid-auto-rows: minmax(100px, auto); + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } .images br, -.images>* { +.images> :not(img) { display: none; + visibility: hidden; } .images img { display: block; border-radius: 4px; filter: sepia(33%); - max-width: 100%; max-height: 95vh; + width: 100%; + object-fit: contain; } -.images img:nth-child(3n+1) { - grid-column: 1; -} -.images img:nth-child(3n+2) { - grid-column: 2; -} -.images img:nth-child(3n+3) { - grid-column: 3; + +.images img:only-of-type { + width: auto; } /* Images on front, toggled by JavaScript if "imageonfront" tag is set. */