MediaWiki:Gadget-autoNumberHeadings.css: Difference between revisions

From Working With Glass
Jump to navigation Jump to search
m Claycorp moved page MediaWiki:Gadget-autonum.css to MediaWiki:Gadget-autoNumberHeadings.css without leaving a redirect: Misspelled title
Correct CSS?
Line 11: Line 11:
  * and we display that instead of an automatic counter.
  * and we display that instead of an automatic counter.
  */
  */
.tpl-autonum-attr .mw-parser-output .mw-headline[data-autonum]:before,
.tpl-autonum-attr .mw-parser-output h1[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h2[data-autonum]:before ,
.tpl-autonum-attr .mw-parser-output h2[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h3[data-autonum]:before ,
.tpl-autonum-attr .mw-parser-output h3[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h4[data-autonum]:before ,
.tpl-autonum-attr .mw-parser-output h4[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h5[data-autonum]:before ,
.tpl-autonum-attr .mw-parser-output h5[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h6[data-autonum]:before {
.tpl-autonum-attr .mw-parser-output h6[data-autonum]::before {
  content: attr(data-autonum) " ";
    content: attr(data-autonum) " ";
    font-weight: bold;
}
}

Revision as of 05:23, 6 November 2026

/**
 * Auto-number headings
 *
 * @source https://www.mediawiki.org/wiki/Snippets/Auto-number_headings
 * @author Krinkle
 * @version 2024-07-28
 */

/**
 * JS mode: When a TOC is present, autonum.js sets the data-autonum attribute
 * and we display that instead of an automatic counter.
 */
.tpl-autonum-attr .mw-parser-output h1[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h2[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h3[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h4[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h5[data-autonum]::before,
.tpl-autonum-attr .mw-parser-output h6[data-autonum]::before {
    content: attr(data-autonum) " ";
    font-weight: bold;
}