mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
rustdoc: add comment about numeric spacing
This commit is contained in:
parent
9fbee7dcc5
commit
66e0483a65
@ -2335,6 +2335,10 @@ ${item.displayPath}<span class="${type}">${name}</span>\
|
||||
|
||||
function makeTabHeader(tabNb, text, nbElems) {
|
||||
// https://blog.horizon-eda.org/misc/2020/02/19/ui.html
|
||||
//
|
||||
// CSS runs with `font-variant-numeric: tabular-nums` to ensure all
|
||||
// digits are the same width. \u{2007} is a Unicode space character
|
||||
// that is defined to be the same width as a digit.
|
||||
const fmtNbElems =
|
||||
nbElems < 10 ? `\u{2007}(${nbElems})\u{2007}\u{2007}` :
|
||||
nbElems < 100 ? `\u{2007}(${nbElems})\u{2007}` :
|
||||
|
Loading…
Reference in New Issue
Block a user