Skip to content

Commit

Permalink
Use tabular numbers in tables (#2680)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
robinwhittleton and langermank authored Nov 7, 2024
1 parent 7d4cd40 commit 1eb467e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-ducks-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/css': patch
---

Use tabular numbers in tables
1 change: 1 addition & 0 deletions src/markdown/tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
width: max-content;
max-width: 100%;
overflow: auto;
font-variant: tabular-nums;

th {
// stylelint-disable-next-line primer/typography
Expand Down

0 comments on commit 1eb467e

Please sign in to comment.