MediaWiki:Gadget-autoNumberHeadings.css
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**
* 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;
}