Skip to content

Commit

Permalink
Merge pull request #4973 from alphagov/tabular-number-class
Browse files Browse the repository at this point in the history
Add override class for tabular numbers
  • Loading branch information
querkmachine committed May 8, 2024
2 parents 78cdffb + f262500 commit 281e39a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
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);
}
}

0 comments on commit 281e39a

Please sign in to comment.