Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add override class for tabular numbers #4973

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions packages/govuk-frontend/src/govuk/overrides/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}