diff --git a/resources/css/core/typography.css b/resources/css/core/typography.css index 6f75b1a5dfc..ce40a9d9372 100644 --- a/resources/css/core/typography.css +++ b/resources/css/core/typography.css @@ -78,7 +78,8 @@ body { @apply font-sans text-base tracking-normal text-gray-900 dark:text-gray-50; - font-variant: common-ligatures tabular-nums; + /* Proportional figures by default. Tables and dates opt into tabular figures below. */ + font-variant: common-ligatures; font-feature-settings: 'zero', 'ss01', @@ -86,6 +87,17 @@ body { ; } +@layer base { + /* Tabular figures where numbers need to line up. Grid/Table/List/Array fieldtypes are excluded since they hold content. */ + table:not(.grid-table, .table-contained), + input[type='number'], + [data-reka-calendar-cell-trigger], + [data-reka-date-field-segment], + [data-reka-time-field-segment] { + font-variant-numeric: tabular-nums; + } +} + @utility prose { color: var(--prose-body); max-width: 65ch;