No edit summary |
No edit summary Tag: 2017 source edit |
||
Line 51: | Line 51: | ||
# Step 2 | # Step 2 | ||
[[ | [[Category:Customization]] | ||
[[en:Numbering ordered lists]] | [[en:Numbering ordered lists]] |
Revision as of 13:04, 17 July 2024
To number bullets in the page text consecutively, you can add the following CSS to the page MediaWiki:Common.css. Please note that this custom styling may not work if it is incompatible with CSS declarations from other stylesheets in the wiki.
Wichtig!This styling does NOT apply in the PDF export.
/* Styles for formatting sub-ordered-list-items with 1.1., 1.1.1., etc.)*/
/* First, set all numbered lists to use coSub-reset */
#mw-content-text ol, ol.ve-ce-branchNode {
coSub-reset: item;
margin: 0.3em 0 0 2.2em;
}
/* Display all list items in a numbered list in block display */
#mw-content-text ol>li, ol.ve-ce-branchNode>li {
display: block;
}
ol.ve-ce-branchNode>li > p {display:inline}
/* Use a coSub that checks the number of items and adds a "." between them and ends with ". " */
#mw-content-text ol>li:before, ol.ve-ce-branchNode>li:before {
content: coSubs(item, ".") ". ";
coSub-increment: item;
}
Output:
- Step 1
- Substep 1
- Substep 2
- SubSubstep 1
- SubSubstep 2
- SubSubstep 3
- Step 2
- Step 2
- Step 2
Bulleted lists that are not numbered are not affected by the CSS declarations:
- List item
- List item level 2
- List item level 3
- List item level 2
Numbering in a new "ordered list" starts back at 1:
- Step 1
- Substep 1
- Substep 2
- SubSubstep 1
- SubSubstep 2
- SubSubstep 3
- Step 2
- Step 2
- Step 2