Difference between revisions of "MediaWiki:Common.css"

From Archiveteam
Jump to navigation Jump to search
(Add TOC limit rules from https://en.wikipedia.org/wiki/Template_talk:TOC_limit?useskin=vector#Steps_to_limit_the_TOC_in_your_mediawiki)
 
(One intermediate revision by one other user not shown)
Line 35: Line 35:
}
}


 
/* Allow limiting of which header levels are shown in a TOC;
/* Content in columns with CSS instead of tables ([[Template:Columns]]) */
  <div class="toclimit-3">, for instance, will limit to
div.columns-2 div.column {
  showing ==headings== and ===headings=== but no further
    /* @noflip */
  (as long as there are no =headings= on the page, which
    float: left;
  there shouldn't be according to the MoS).
    width: 50%;
*/
    min-width: 300px;
.toclimit-2 .toclevel-1 ul,
}
.toclimit-3 .toclevel-2 ul,
div.columns-3 div.column {
.toclimit-4 .toclevel-3 ul,
    /* @noflip */
.toclimit-5 .toclevel-4 ul,
    float: left;
.toclimit-6 .toclevel-5 ul,
    width: 33.3%;
.toclimit-7 .toclevel-6 ul {
    min-width: 200px;
     display: none;
}
div.columns-4 div.column {
    /* @noflip */
    float: left;
    width: 25%;
    min-width: 150px;
}
div.columns-5 div.column {
     /* @noflip */
    float: left;
    width: 20%;
    min-width: 120px;
}
}

Latest revision as of 22:35, 27 June 2023

/* Wikitable (Prettytable) class for skinning normal tables */
table.wikitable,
table.prettytable {
	margin: 1em 1em 1em 0;
	background: #f9f9f9;
	border: 1px #aaaaaa solid;
	border-collapse: collapse;
	empty-cells: show;
}
table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {
	border: 1px #aaaaaa solid;
	padding: 0.2em 0.4em;
}
table.wikitable th, table.wikitable td.hl3, table.wikitable th.hl3,
table.prettytable th, table.prettytable td.hl3, table.wikitable th.hl3 {
	background: #8da7d6;
	text-align: center;
}
table.wikitable td.hl1, table.wikitable th.hl1,
table.prettytable td.hl1, table.wikitable th.hl1 {
	background: #c5d8fc;
	text-align: center;
}
table.wikitable td.hl2, table.wikitable th.hl2,
table.prettytable td.hl2, table.wikitable th.hl2 {
	background: #a7c1f2;
	text-align: center;
}
table.wikitable caption,
table.prettytable caption {
	margin-left: inherit;
	margin-right: inherit;
	font-weight: bold;
}

/* Allow limiting of which header levels are shown in a TOC;
   <div class="toclimit-3">, for instance, will limit to
   showing ==headings== and ===headings=== but no further
   (as long as there are no =headings= on the page, which
   there shouldn't be according to the MoS).
 */
.toclimit-2 .toclevel-1 ul,
.toclimit-3 .toclevel-2 ul,
.toclimit-4 .toclevel-3 ul,
.toclimit-5 .toclevel-4 ul,
.toclimit-6 .toclevel-5 ul,
.toclimit-7 .toclevel-6 ul {
    display: none;
}