We're replacing the browser-supplied <ol> <li> numbering of footnotes with explicit text in each footnote which contains the actual number. For example, "1. citation text...". This task is about designing a layout which satisfies several criteria:
- HTML semantics and structure should remain the same.
- Footnotes should continue to render correctly and have correct numbering (including language) even in the absence of CSS or browser support.
- Number should be included in copy-and-paste.
- Existing styles and gadgets should still work, or must be migrated.
- Still support multicolumn rendering.
- Looks the same as existing output.
- Must support RTL languages and numbers
<ol> is normally rendered as two columns, with the number right-aligned. The CSS3 specification for lists can be found here https://www.w3.org/TR/css-lists-3/
Status quo:
One possible implementation is that each item has a structure like,
<li> <span class="mw-ref-item-number">123.</span> <span class="backlinks">...</span> <span>Citation body...</span> </li>
Then, we apply a rule somewhat like,
.mw-ref-item-number {
/* Bigger than most three-digit numbers */
min-width: 3.2em;
display: inline-block;
text-align: end;
vertical-align: top;
/* TODO: prevent wrapping */
}

