From cd9f67721bf48e0b268eb12edf1094883ca0c2b3 Mon Sep 17 00:00:00 2001 From: Cormac Parle Date: Mon, 25 Sep 2017 14:44:26 +0100 Subject: [PATCH] Add print styles for gallery mode packed-hover Bug: T140346 Change-Id: Ifd94706c427c6bb7577040bbfecfdc6a303e0d8b --- resources/Resources.php | 2 +- .../src/mediawiki/page/gallery.print.css | 32 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/resources/Resources.php b/resources/Resources.php index f0aa9ecbca..a27bb98ba5 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1649,8 +1649,8 @@ return [ ], 'mediawiki.page.gallery.styles' => [ 'styles' => [ - 'resources/src/mediawiki/page/gallery.print.css' => [ 'media' => 'print' ], 'resources/src/mediawiki/page/gallery.css', + 'resources/src/mediawiki/page/gallery.print.css' => [ 'media' => 'print' ], ], 'targets' => [ 'desktop', 'mobile' ], ], diff --git a/resources/src/mediawiki/page/gallery.print.css b/resources/src/mediawiki/page/gallery.print.css index 2ae670b800..047c93364e 100644 --- a/resources/src/mediawiki/page/gallery.print.css +++ b/resources/src/mediawiki/page/gallery.print.css @@ -28,8 +28,32 @@ li.gallerybox div.thumb { } div.gallerytext { - overflow: hidden; - font-size: 10pt; - padding: 2px 4px; - word-wrap: break-word; + overflow: visible; +} + +ul.mw-gallery-packed-hover div.gallerytextwrapper { + overflow: visible; + height: auto; +} + +ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper { + position: static; + background: transparent; + padding: 0; + bottom: 0; + max-height: none; + overflow: visible; + font-weight: normal; + margin: 0; /* correspond to style on div.thumb */ +} + +ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper p, +ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper p, +ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper p { + text-overflow: clip; + white-space: normal; + overflow: visible; } + -- 2.20.1