1
1
mirror of https://github.com/primer/css.git synced 2024-11-22 01:53:17 +03:00

Use tabular numbers in tables (#2680)

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>
This commit is contained in:
Robin Whittleton 2024-11-07 23:07:38 +01:00 committed by GitHub
parent 7d4cd4061a
commit 1eb467e9ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
'@primer/css': patch
---
Use tabular numbers in tables

View File

@ -8,6 +8,7 @@
width: max-content; width: max-content;
max-width: 100%; max-width: 100%;
overflow: auto; overflow: auto;
font-variant: tabular-nums;
th { th {
// stylelint-disable-next-line primer/typography // stylelint-disable-next-line primer/typography