Remove #toc and #toctitle style definitions
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Tue, 20 Feb 2018 16:39:32 +0000 (17:39 +0100)
committerVolkerE <volker.e@wikimedia.org>
Fri, 16 Mar 2018 22:46:46 +0000 (22:46 +0000)
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

resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.legacy/oldshared.css
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.skinning/content.css
resources/src/mediawiki/mediawiki.toc.print.css

index df5aa0f..64870fd 100644 (file)
@@ -166,7 +166,6 @@ ul {
        margin: 0 !important; /* stylelint-disable-line declaration-no-important */
 }
 
-#toc,
 .toc {
        background-color: #f9f9f9;
        border: 1pt solid #aaa;
index 7b2d711..2572b52 100644 (file)
@@ -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 <div>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;
index e46c758..0f84ff1 100644 (file)
@@ -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;
 }
index 5ded184..890856a 100644 (file)
@@ -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;
 }
 
 /* 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 <div>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;
 }