From: Fomafix Date: Mon, 2 Nov 2015 06:39:24 +0000 (+0000) Subject: Gallery: Use intrinsic width for gallery to center caption X-Git-Tag: 1.31.0-rc.0~4979^2~1 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=e6dd624baeca16efe462e3938969a72c9ef4ed1e;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 {