Repository navigation
[6.x] Use proportional figures by default - #15660
Merged
Merged
Conversation
- Drop tabular-nums from body so prose, field values and instructions get proportional figures - Opt tables, number inputs and date/time pickers back into tabular figures
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Problem
Closes #15658
The CP sets
tabular-numsonbody, so every bit of text inherits tabular figures. That includes the content people write in Bard, Markdown, Text and Textarea fields, as well as field instructions. Tabular figures give every digit the same width so columns line up. In running text that makes narrow digits like 1 look loosely and unevenly spaced, so 11 reads almost like "1 1".What this PR Does
Proportional figures are now the default, and tabular figures only apply where numbers need to line up:
The Grid, Table, List and Array fieldtypes are left out. They're tables in the markup, but their cells hold content people write.
Why flip the default
Tabular figures are a tool for aligning numbers in columns, not a general-purpose default. That's why fonts like Inter and the system UI fonts ship with proportional figures and leave tabular figures as an opt-in OpenType feature (
tnum).Even in a CP, most numbers sit in running text rather than in columns: labels, instructions, buttons, notifications, and everything people write in their fields. The places where numbers need to line up are few and easy to name: tables, number inputs and date pickers. So it makes sense to opt those in, rather than opting everything else out.
The opt-out route wouldn't hold up anyway. Every new fieldtype, modal or addon that shows prose would need adding to the exclusion list, and they'd keep getting missed.
Pagination totals, revision timestamps and the Updates release notes also switch to proportional figures. They're short runs of text where alignment doesn't matter.
How to Reproduce