MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Manual revert
No edit summary
Line 87: Line 87:
{
{
   color: #6b3e26;
   color: #6b3e26;
   font-style: italic;
   font-style: oblique;
   margin-right: 1ex;
   margin-right: 1ex;
}
}

Revision as of 20:21, 20 September 2022

/* 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: #6b3e26;
  font-style: oblique;
  margin-right: 1ex;
}