From 98400453618964beb803aea45cc6409540800b6b Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 2 Apr 2024 21:28:32 +0200
Subject: [PATCH] fix caption for portrait and square

---
 assets/sass/_theme/blocks/gallery.sass | 27 +++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/assets/sass/_theme/blocks/gallery.sass b/assets/sass/_theme/blocks/gallery.sass
index e2a21dc7..49cc26a5 100644
--- a/assets/sass/_theme/blocks/gallery.sass
+++ b/assets/sass/_theme/blocks/gallery.sass
@@ -55,17 +55,22 @@
                         width: columns(8)
                         margin-left: offset(2)
         @include in-page-without-sidebar
-            figcaption
-                display: flex
-                justify-content: space-between
-                align-items: baseline
-                p
-                    max-width: columns(8)
-                *
-                    flex: 1 1
-                .credit
-                    margin-top: 0
-                    text-align: right
+            figure
+                &.image-portrait,
+                &.image-square
+                    figcaption
+                        margin-left: offset(2)
+                figcaption
+                    display: flex
+                    justify-content: space-between
+                    align-items: baseline
+                    p
+                        max-width: columns(8)
+                    *
+                        flex: 1 1
+                    .credit
+                        margin-top: 0
+                        text-align: right
 
     &--carousel
         overflow: hidden
-- 
GitLab