From 5e3c21a7003a4fc8d4b8c327530421330c3331b0 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Tue, 20 Feb 2018 17:39:32 +0100 Subject: [PATCH] Remove #toc and #toctitle style definitions Styling by class is preferred over styling by id as a rule, and this #toc .toc doubling up was in place since 2005. (28c9a747797dae738cd6fe1a97c29e1591564112) 13 years of cache protection seems adequate :) Bug: T187808 Change-Id: I7f3a9df7f9fd1178986112b5265b1ae7c991d5b7 --- .../src/mediawiki.legacy/commonPrint.css | 1 - resources/src/mediawiki.legacy/oldshared.css | 8 +------- resources/src/mediawiki.legacy/shared.css | 20 ++++--------------- resources/src/mediawiki.skinning/content.css | 10 ---------- .../src/mediawiki/mediawiki.toc.print.css | 1 - 5 files changed, 5 insertions(+), 35 deletions(-) diff --git a/resources/src/mediawiki.legacy/commonPrint.css b/resources/src/mediawiki.legacy/commonPrint.css index df5aa0fe90..64870fd8ca 100644 --- a/resources/src/mediawiki.legacy/commonPrint.css +++ b/resources/src/mediawiki.legacy/commonPrint.css @@ -166,7 +166,6 @@ ul { margin: 0 !important; /* stylelint-disable-line declaration-no-important */ } -#toc, .toc { background-color: #f9f9f9; border: 1pt solid #aaa; diff --git a/resources/src/mediawiki.legacy/oldshared.css b/resources/src/mediawiki.legacy/oldshared.css index 7b2d71106e..2572b5200d 100644 --- a/resources/src/mediawiki.legacy/oldshared.css +++ b/resources/src/mediawiki.legacy/oldshared.css @@ -166,7 +166,6 @@ img { border: 0; } -#toc, .toc { border: 1px solid #bba; background-color: #f7f8ff; @@ -182,18 +181,15 @@ img { } /* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ -table#toc, table.toc { border-collapse: collapse; } /* Remove additional paddings inside table-cells that are not present in
s */ -table#toc td, table.toc td { padding: 0; } -#toc h2, .toc h2 { display: inline; border: 0; @@ -202,7 +198,6 @@ table.toc td { font-weight: bold; } -#toc ul, .toc ul { list-style-type: none; list-style-image: none; @@ -210,7 +205,6 @@ table.toc td { text-align: left; } -#toc ul ul, .toc ul ul { margin: 0 0 0 2em; } @@ -274,7 +268,7 @@ table.small { font-size: 100%; } -/* use this instead of #toc for page content */ +/* use this instead of .toc for page content */ .toccolours { border: 1px solid #aaa; background-color: #f9f9f9; diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index e46c7583ef..0f84ff1d83 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -625,43 +625,31 @@ ol:lang( or ) li { list-style-type: oriya; } -#toc ul, .toc ul { margin: 0.3em 0; } /* Correct directionality when page dir is different from site/user dir */ /* @noflip */ .mw-content-ltr .toc ul, -.mw-content-ltr #toc ul, -.mw-content-rtl .mw-content-ltr .toc ul, -.mw-content-rtl .mw-content-ltr #toc ul { +.mw-content-rtl .mw-content-ltr .toc ul { text-align: left; } /* @noflip */ .mw-content-rtl .toc ul, -.mw-content-rtl #toc ul, -.mw-content-ltr .mw-content-rtl .toc ul, -.mw-content-ltr .mw-content-rtl #toc ul { +.mw-content-ltr .mw-content-rtl .toc ul { text-align: right; } /* @noflip */ .mw-content-ltr .toc ul ul, -.mw-content-ltr #toc ul ul, -.mw-content-rtl .mw-content-ltr .toc ul ul, -.mw-content-rtl .mw-content-ltr #toc ul ul { +.mw-content-rtl .mw-content-ltr .toc ul ul { margin: 0 0 0 2em; } /* @noflip */ .mw-content-rtl .toc ul ul, -.mw-content-rtl #toc ul ul, -.mw-content-ltr .mw-content-rtl .toc ul ul, -.mw-content-ltr .mw-content-rtl #toc ul ul { +.mw-content-ltr .mw-content-rtl .toc ul ul { margin: 0 2em 0 0; } -#toc #toctitle, -.toc #toctitle, -#toc .toctitle, .toc .toctitle { direction: ltr; } diff --git a/resources/src/mediawiki.skinning/content.css b/resources/src/mediawiki.skinning/content.css index 5ded184f1f..890856a66a 100644 --- a/resources/src/mediawiki.skinning/content.css +++ b/resources/src/mediawiki.skinning/content.css @@ -6,7 +6,6 @@ */ /* Table of Contents */ -#toc, .toc, .mw-warning, .toccolours { @@ -28,7 +27,6 @@ * inline elements. In practice inline elements surrounding the TOC are uncommon enough that * this is an acceptable sacrifice. */ -#toc, .toc { display: inline-block; display: table; @@ -41,18 +39,15 @@ } /* CSS for backwards-compatibility with cached page renders and creative uses in wikitext */ -table#toc, table.toc { border-collapse: collapse; } /* Remove additional paddings inside table-cells that are not present in
s */ -table#toc td, table.toc td { padding: 0; } -#toc h2, .toc h2 { display: inline; border: 0; @@ -61,14 +56,10 @@ table.toc td { font-weight: bold; } -#toc #toctitle, -.toc #toctitle, -#toc .toctitle, .toc .toctitle { text-align: center; } -#toc ul, .toc ul { list-style-type: none; list-style-image: none; @@ -77,7 +68,6 @@ table.toc td { text-align: left; } -#toc ul ul, .toc ul ul { margin: 0 0 0 2em; } diff --git a/resources/src/mediawiki/mediawiki.toc.print.css b/resources/src/mediawiki/mediawiki.toc.print.css index 5f6eb2586d..69e944021f 100644 --- a/resources/src/mediawiki/mediawiki.toc.print.css +++ b/resources/src/mediawiki/mediawiki.toc.print.css @@ -1,4 +1,3 @@ -#toc.tochidden, .toc.tochidden, .toctoggle { display: none; -- 2.20.1