From e6dd624baeca16efe462e3938969a72c9ef4ed1e Mon Sep 17 00:00:00 2001 From: Fomafix Date: Mon, 2 Nov 2015 06:39:24 +0000 Subject: [PATCH] Gallery: Use intrinsic width for gallery to center caption Currently the caption is always centered between the whole width of the browser. When there are only a few images the caption is not on top of the images. This change shrinks the gallery to its intrinsic width. The caption is now centered on top of the images. This patch does not support Internet Explorer. Bug: T29540 Change-Id: I145b120183ef151cec98aa75f030d63a191bf9ac --- resources/src/mediawiki/page/gallery.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/src/mediawiki/page/gallery.css b/resources/src/mediawiki/page/gallery.css index 3c80bbbc6c..e834e28175 100644 --- a/resources/src/mediawiki/page/gallery.css +++ b/resources/src/mediawiki/page/gallery.css @@ -17,6 +17,9 @@ ul.gallery { margin: 2px; padding: 2px; display: block; + width: -moz-fit-content; + width: -webkit-fit-content; + width: fit-content; } li.gallerycaption { -- 2.20.1