MediaWiki:Common.css
MediaWiki interface page
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */
/*
* Override font size of section headings to improve readability
*
* Vector's font size for h4 is 100%, just like regular paragraphs, which makes
* the heading indiscernible from regular bolded text.
*/
.mw-body-content h1 { font-size: 188%; }
.mw-body-content h2 { font-size: 150%; }
.mw-body-content h3 { font-size: 128%; }
.mw-body-content h4 { font-size: 116%; }
.mw-body-content h5 { font-size: 108%; }
.mw-body-content h6 { font-size: 100%; }
/*
* Add anonymous replaced elements to auto-number sections
*
* (This feature was removed in MediaWiki 1.38 for "performance reasons",
* see https://www.mediawiki.org/wiki/MediaWiki_1.38#Other_changes )
*
* Note that MediaWiki does not have nested DOM elements for sections, so we
* cannot use nested counters and have to hack it with several counters per
* each level.
*
* Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Counter_Styles/Using_CSS_counters
*/
/* Create counters and set their initial value to 0. */
body {
counter-reset: h2-section h3-section h4-section h5-section h6-section;
}
/* Set up resetting */
/* (note that counter-reset does not work) */
h2 > .mw-headline
{
counter-increment: h2-section;
counter-set: h3-section h4-section h5-section h6-section;
}
h3 > .mw-headline
{
counter-increment: h3-section;
counter-set: h4-section h5-section h6-section;
}
h4 > .mw-headline
{
counter-increment: h4-section;
counter-set: h5-section h6-section;
}
h5 > .mw-headline
{
counter-increment: h5-section;
counter-set: h6-section;
}
h6 > .mw-headline
{
counter-increment: h6-section;
}
/* Display the counters in the headings */
h2 > .mw-headline::before
{
content: counter(h2-section);
}
h3 > .mw-headline::before
{
content: counter(h2-section) "." counter(h3-section);
}
h4 > .mw-headline::before
{
content: counter(h2-section) "." counter(h3-section) "." counter(h4-section);
}
h5 > .mw-headline::before
{
content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section);
}
h6 > .mw-headline::before
{
content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section) "." counter(h6-section);
}
h2 > .mw-headline::before,
h3 > .mw-headline::before,
h4 > .mw-headline::before,
h5 > .mw-headline::before,
h6 > .mw-headline::before
{
color: #2b2b2b;
font-style: italic;
margin-right: 1ex;
}