From fd7782e3ce68fb65fe558f5a74fd2e66e4e607b2 Mon Sep 17 00:00:00 2001 From: Robin Whittleton Date: Fri, 16 Aug 2024 17:40:15 +0200 Subject: [PATCH] Use tabular numbers in tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As tables are frequently used for comparing columns of numeric data (and have the ability to be right-aligned) we should make sure that we make it as easy as possibly. Toggling tabular numbers on givens you the ability to scan columns of numbers effectively, assuming the font supports it. If it doesn’t then this doesn’t have any effect, but is no worse than the current behaviour. --- .changeset/wise-ducks-beam.md | 5 +++++ src/markdown/tables.scss | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/wise-ducks-beam.md diff --git a/.changeset/wise-ducks-beam.md b/.changeset/wise-ducks-beam.md new file mode 100644 index 0000000000..cbce8a32b4 --- /dev/null +++ b/.changeset/wise-ducks-beam.md @@ -0,0 +1,5 @@ +--- +'@primer/css': patch +--- + +Use tabular numbers in tables diff --git a/src/markdown/tables.scss b/src/markdown/tables.scss index 23d781a4c5..e71a633693 100644 --- a/src/markdown/tables.scss +++ b/src/markdown/tables.scss @@ -8,6 +8,7 @@ width: max-content; max-width: 100%; overflow: auto; + font-variant: tabular-nums; th { font-weight: $font-weight-bold;