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 36 to type scale and swap headings to use it #989

Merged
merged 3 commits into from
Sep 17, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Change "Contact us" in the footer link examples to "Give us feedback" ([PR 972](https://github.com/nhsuk/nhsuk-frontend/pull/972))
- Remove the pattern from the date input component
- Large headings, legends and labels updated to use 36px rather than 32px. ([PR 989](https://github.com/nhsuk/nhsuk-frontend/pull/989))

:new: **New features**

Expand Down
2 changes: 1 addition & 1 deletion packages/components/fieldset/_fieldset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}

.nhsuk-fieldset__legend--l {
@include nhsuk-font($size: 32, $weight: bold);
@include nhsuk-font($size: 36, $weight: bold);
margin-bottom: nhsuk-spacing(3);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/components/label/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}

.nhsuk-label--l {
@include nhsuk-typography-responsive(32);
@include nhsuk-typography-responsive(36);
}

.nhsuk-label--m {
Expand Down
24 changes: 20 additions & 4 deletions packages/core/settings/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,36 @@ $nhsuk-typography-scale: (
line-height: 1.15
)
),
32: (
36: (
null: (
font-size: 24px,
font-size: 27px,
line-height: 32px
),
tablet: (
font-size: 32px,
font-size: 36px,
line-height: 40px
),
print: (
font-size: 24pt,
font-size: 27pt,
line-height: 1.05
)
),
// 32 is deprecated and will be removed in next major version
32:
(
null: (
font-size: 24px,
line-height: 32px
),
tablet: (
font-size: 32px,
line-height: 40px
),
print: (
font-size: 24pt,
line-height: 1.05
)
),
24: (
null: (
font-size: 20px,
Expand Down
4 changes: 2 additions & 2 deletions packages/core/styles/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ h1,
}

%nhsuk-heading-l {
@include nhsuk-typography-responsive(32);
@include nhsuk-typography-responsive(36);

display: block;
font-weight: $nhsuk-font-bold;
Expand Down Expand Up @@ -105,7 +105,7 @@ h6,
/* Captions to be used inside headings */

.nhsuk-caption-xl {
@include nhsuk-font(32);
@include nhsuk-font(36);

color: $nhsuk-secondary-text-color;
display: block;
Expand Down
5 changes: 3 additions & 2 deletions packages/core/tools/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
// }
//
// .foo {
// @include nhsuk-typography-responsive(32, $important: true);
// @include nhsuk-typography-responsive(36, $important: true);
// }
//
// @param {Map} $font-map - Font map
Expand All @@ -121,6 +121,7 @@
//

@mixin nhsuk-typography-responsive($size, $override-line-height: false, $important: false) {

@if not map-has-key($nhsuk-typography-scale, $size) {
@error "Unknown font size `#{$size}` - expected a point from the typography scale.";
}
Expand Down Expand Up @@ -170,7 +171,7 @@
// }
//
// .foo {
// @include nhsuk-font(32, $weight: bold);
// @include nhsuk-font(36, $weight: bold);
// }
//
// @param {Number} $size - Size of the font as it would appear on desktop -
Expand Down
Loading