From: Tim Starling Date: Wed, 13 Jul 2016 02:08:35 +0000 (+1000) Subject: Hide marked empty elements by default (stage 2) X-Git-Tag: 1.31.0-rc.0~6036^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=3f44188f33ce527639d8f7344db0e6f0322ea662 Hide marked empty elements by default (stage 2) Follows-up d3d682fb45. * Remove the obsolete mediawiki.raggett.css file and RL module. This requires the Varnish caches which reference it to have expired. * Remove the mw-empty-li class from the CSS. This requires the parser cache entries which referenced it to have expired. * Make the effect of mw-empty-elt be modifiable by user scripts, by switching it on only if the body class mw-hide-empty-elt is present. This requires the Varnish cache containing body elements without the relevant class to have expired. Change-Id: Icdcff518be94b65c0dbbf6143a7ae4fb817b2182 --- diff --git a/resources/Resources.php b/resources/Resources.php index e838a53a3b..c4096ba961 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1398,10 +1398,6 @@ return [ 'scripts' => 'resources/src/mediawiki/mediawiki.experiments.js', 'targets' => [ 'desktop', 'mobile' ], ], - 'mediawiki.raggett' => [ - 'styles' => 'resources/src/mediawiki/mediawiki.raggett.css', - 'targets' => [ 'desktop', 'mobile' ], - ], /* MediaWiki Action */ diff --git a/resources/src/mediawiki.skinning/content.css b/resources/src/mediawiki.skinning/content.css index 563db0098d..d9cdf5a67f 100644 --- a/resources/src/mediawiki.skinning/content.css +++ b/resources/src/mediawiki.skinning/content.css @@ -254,8 +254,9 @@ div.tleft { margin: .5em 1.4em 1.3em 0; } -/* Hide elements that are marked as "empty" according to legacy Tidy rules +/* Hide elements that are marked as "empty" according to legacy Tidy rules, + * except if a client script removes the mw-hide-empty-elt class from the body */ -.mw-empty-elt, .mw-empty-li { +body.mw-hide-empty-elt .mw-empty-elt { display: none; } diff --git a/resources/src/mediawiki/mediawiki.raggett.css b/resources/src/mediawiki/mediawiki.raggett.css deleted file mode 100644 index e69de29bb2..0000000000