Adjustments to print table styles
authorjdlrobson <jdlrobson@gmail.com>
Fri, 21 Jul 2017 21:33:52 +0000 (14:33 -0700)
committerVolker E <volker.e@wikimedia.org>
Fri, 28 Jul 2017 13:03:34 +0000 (15:03 +0200)
* Remove bolding
* Reset backgrounds
* Explicitly choose font sizes
* Adjust paddings

Bug: T169823
Change-Id: I9c82f10fa92a24c7bcfff4458c6e5b8d2ddaffbf

resources/src/mediawiki.legacy/commonPrint.css

index dec0fe8..67fc77d 100644 (file)
@@ -266,19 +266,21 @@ img.thumbborder {
 
 /**
  * Table rendering
- * As on shared.css but with white background.
  */
+/* Compare `table.wikitable` in shared.css */
 table.wikitable,
-table.mw_metadata {
+.mw_metadata {
        background: #fff;
        margin: 1em 0;
        border: 1pt solid #aaa;
        border-collapse: collapse;
+       font-size: 10pt;
 }
 
 table.wikitable > caption,
 .mw_metadata caption {
-       font-weight: bold;
+       padding: 5px;
+       font-size: 10pt;
 }
 
 table.wikitable > tr > th,
@@ -287,15 +289,17 @@ table.wikitable > * > tr > th,
 table.wikitable > * > tr > td,
 .mw_metadata th,
 .mw_metadata td {
+       /* Important is required to override any inline styles provided by editors */
+       background: #fff !important; /* stylelint-disable-line declaration-no-important */
+       /* We need to also set color in case editors applied a light text color */
+       color: #000 !important; /* stylelint-disable-line declaration-no-important */
        border: 1pt solid #aaa;
-       padding: 0.2em;
+       padding: 0.4em 0.6em;
 }
 
 table.wikitable > tr > th,
 table.wikitable > * > tr > th,
 .mw_metadata th {
-       background: #fff;
-       font-weight: bold;
        text-align: center;
 }