From f2625000baefa815164454af8ba4e3ddaa916da6 Mon Sep 17 00:00:00 2001 From: beeps Date: Tue, 7 May 2024 14:42:26 +0100 Subject: [PATCH] Add override class for tabular numbers --- CHANGELOG.md | 12 ++++++++++++ .../src/govuk/overrides/_typography.scss | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5747ac6f84..5c7d6a7ce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ For advice on how to use these release notes see [our guidance on staying up to ## Unreleased +### New features + +#### Use tabular numbers easily with `govuk-!-font-tabular-numbers` + +We've added a new override class for tabular number styling: `govuk-!-font-tabular-numbers`. + +Tabular numbers are useful when numbers are intended to be compared, for numerical sequences that may otherwise be difficult to read, or for numbers that dynamically update. + +It was previously only possible to use tabular numbers by using the `govuk-font-tabular-numbers` Sass mixin. + +This change was introduced in [pull request #4973: Add override class for tabular numbers](https://github.com/alphagov/govuk-frontend/pull/4973). + ### Deprecations #### Importing layers using `all` files diff --git a/packages/govuk-frontend/src/govuk/overrides/_typography.scss b/packages/govuk-frontend/src/govuk/overrides/_typography.scss index 836ca3f39c..0f924b4f04 100644 --- a/packages/govuk-frontend/src/govuk/overrides/_typography.scss +++ b/packages/govuk-frontend/src/govuk/overrides/_typography.scss @@ -27,4 +27,10 @@ .govuk-\!-font-weight-bold { @include govuk-typography-weight-bold($important: true); } + + // Tabular numbers + + .govuk-\!-font-tabular-numbers { + @include govuk-font-tabular-numbers($important: true); + } }