Difference between revisions of "MediaWiki:Common.css"

From FreeSpace Wiki
Jump to: navigation, search
(add CSS for TOC limit feature, requested by BW)
 
(One intermediate revision by one other user not shown)
Line 36: Line 36:
 
}
 
}
  
// install [[User:Cacycle/wikEd]] in-browser text editor
+
/* Allow limiting of which header levels are shown in a TOC;
document.write('<script type="text/javascript" src="'
+
  <div class="toclimit-3">, for instance, will limit to
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+
  showing ==headings== and ===headings=== but no further
+ '&action=raw&ctype=text/javascript"></' + 'script>');
+
  (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;
 +
}
  
 
/* </nowiki></pre> */
 
/* </nowiki></pre> */

Latest revision as of 06:10, 29 January 2014

/** CSS placed here will be applied to all skins */

/* <pre><nowiki> */

/* wikitable/prettytable class for skinning normal tables */
table.wikitable,
table.prettytable {
    margin: 1em 1em 1em 0;
    background: #f9f9f9;
    border: 1px #aaa solid;
    border-collapse: collapse;
}
 
table.wikitable th, table.wikitable td,
table.prettytable th, table.prettytable td {
    border: 1px #aaa solid;
    padding: 0.2em;
}
 
table.wikitable th,
table.prettytable th {
    background: #f2f2f2;
    text-align: center;
}
 
table.wikitable caption,
table.prettytable caption {
    margin-left: inherit;
    margin-right: inherit;
    font-weight: bold;
}
 
table.prettytable code,
table.wikitable code {
    background-color: transparent;
}

/* 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;
}

/* </nowiki></pre> */