From 43e3ff8dcd1eb161ef896602ffcbb8134b44c662 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Fri, 21 Jul 2017 14:26:19 -0700 Subject: [PATCH] Fix font size and backgrounds in gallery In print medium we should be explicit about font size - don't rely on % and colors should be made more printer friendly Additional changes: * Remove some duplicated rule between gallery.print.css and gallery.css * Scope background definitions to screen medium Bug: T169823 Change-Id: Iffcff305a4e0b973bdd52a57f52d8a0766cef512 --- resources/src/mediawiki/page/gallery.css | 10 ++++++++-- resources/src/mediawiki/page/gallery.print.css | 5 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/src/mediawiki/page/gallery.css b/resources/src/mediawiki/page/gallery.css index 31def27b2a..6a331b6cd7 100644 --- a/resources/src/mediawiki/page/gallery.css +++ b/resources/src/mediawiki/page/gallery.css @@ -28,8 +28,6 @@ li.gallerycaption { li.gallerybox div.thumb { text-align: center; - border: 1px solid #c8ccd1; - background-color: #f8f9fa; margin: 2px; } @@ -180,3 +178,11 @@ ul.mw-gallery-slideshow li.gallerycarousel { .mw-gallery-slideshow-img-container a { display: block; } + +@media screen { + /* Background and border colors are defined separately for print mode */ + li.gallerybox div.thumb { + border: 1px solid #c8ccd1; + background-color: #f8f9fa; + } +} diff --git a/resources/src/mediawiki/page/gallery.print.css b/resources/src/mediawiki/page/gallery.print.css index 80fc96491f..2ae670b800 100644 --- a/resources/src/mediawiki/page/gallery.print.css +++ b/resources/src/mediawiki/page/gallery.print.css @@ -23,14 +23,13 @@ li.gallerycaption { } li.gallerybox div.thumb { - text-align: center; + background-color: #fff; border: 1px solid #ccc; - margin: 2px; } div.gallerytext { overflow: hidden; - font-size: 94%; + font-size: 10pt; padding: 2px 4px; word-wrap: break-word; } -- 2.20.1