From 1eb467e9edb3d9ddb84c47bfbf9a21cb9950bf06 Mon Sep 17 00:00:00 2001 From: Robin Whittleton Date: Thu, 7 Nov 2024 23:07:38 +0100 Subject: [PATCH] Use tabular numbers in tables (#2680) 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. Co-authored-by: Katie Langerman <18661030+langermank@users.noreply.github.com> --- .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 72e6635587..c421a88d82 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 { // stylelint-disable-next-line primer/typography