MediaWiki:Gadget-autonum.css explained

/******************************************************************************//**** THIS PAGE TRACKS . PLEASE AVOID EDITING DIRECTLY. /**** EDITS SHOULD BE PROPOSED DIRECTLY to ./**** A BOT WILL RAISE AN EDIT REQUEST IF IT BECOMES DIFFERENT FROM UPSTREAM./******************************************************************************/

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

/** * CSS mode: * Insert numbers on pages without a TOC. This could in principle work for all pages, * but to ensure consistency between the TOC and heading numbers we let JS follow * the TOC if there is one. */.tpl-autonum .mw-parser-output .tpl-autonum .mw-parser-output h2 .tpl-autonum .mw-parser-output h3 .tpl-autonum .mw-parser-output h4 .tpl-autonum .mw-parser-output h5 .tpl-autonum .mw-parser-output h2 .mw-headline:before,.tpl-autonum .mw-parser-output .mw-heading h2:before .tpl-autonum .mw-parser-output h3 .mw-headline:before,.tpl-autonum .mw-parser-output .mw-heading h3:before .tpl-autonum .mw-parser-output h4 .mw-headline:before,.tpl-autonum .mw-parser-output .mw-heading h4:before .tpl-autonum .mw-parser-output h5 .mw-headline:before,.tpl-autonum .mw-parser-output .mw-heading h5:before .tpl-autonum .mw-parser-output h6 .mw-headline:before,.tpl-autonum .mw-parser-output .mw-heading h6:before

/** * 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 .mw-headline[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