Skip to content

Commit

Permalink
Merge pull request #1019 from nhsuk/typo-scale-test
Browse files Browse the repository at this point in the history
Update type scale
  • Loading branch information
anandamaryon1 authored Sep 17, 2024
2 parents 4a3f3cb + a925151 commit fb48afc
Show file tree
Hide file tree
Showing 190 changed files with 131 additions and 148 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

:recycle: **Changes**

- Large headings, legends and labels updated to use 36px rather than 32px. ([PR 989](https://github.com/nhsuk/nhsuk-frontend/pull/989))
- Medium headings, legends and labels updated to use 26px rather than 24px. ([Issue 445](https://github.com/nhsuk/nhsuk-service-manual-community-backlog/issues/445))
- Add sizing classes for table caption
- Reduce heading caption sizes
- Adjust print styles, making headings and body type smaller
- Fix Sass deprecation on `mix` function (passing a number without unit) ([PR 995](https://github.com/nhsuk/nhsuk-frontend/pull/995))
- Add nhsukAttributes macro, copied from GOV.UK ([PR 998](https://github.com/nhsuk/nhsuk-frontend/pull/998))
- Hide header's navigation links on print ([PR 1001](https://github.com/nhsuk/nhsuk-frontend/pull/1001))
Expand Down
6 changes: 1 addition & 5 deletions app/pages/examples.njk
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@
<li><a href="../components/warning-callout/index.html">Warning callout</a></li>
<li><a href="../components/warning-callout/custom-heading.html">Warning callout with custom heading</a></li>
</ul>

<h2>Styles</h2>
<ul class="nhsuk-list">
<li><a href="../styles/lists.html">Lists</a></li>
</ul>

{% endblock %}

{% block footer %}
Expand Down
101 changes: 0 additions & 101 deletions app/styles/lists.njk

This file was deleted.

4 changes: 2 additions & 2 deletions packages/components/action-link/_action-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
height: 36px;
left: -3px;
position: absolute;
top: -2px;
top: -3px;
width: 36px;

@include mq($until: tablet) {
height: 24px;
left: -2px;
margin-bottom: 0;
top: 2px;
top: 1px;
width: 24px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ $card-border-hover-color: $color_nhsuk-grey-3;
}

.nhsuk-card--care__heading {
@include nhsuk-font(24, $weight: bold);
@include nhsuk-font(26, $weight: bold);
@include print-color($nhsuk-print-text-color);

margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/error-summary/_error-summary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

.nhsuk-error-summary__title {
@include nhsuk-font(24, $weight: bold);
@include nhsuk-font(26, $weight: bold);

margin-top: 0;
@include nhsuk-responsive-margin(4, "bottom");
Expand Down
4 changes: 2 additions & 2 deletions packages/components/fieldset/_fieldset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
}

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

.nhsuk-fieldset__legend--m {
@include nhsuk-font($size: 24, $weight: bold);
@include nhsuk-font($size: 26, $weight: bold);
margin-bottom: nhsuk-spacing(3);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/label/_label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
}

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

.nhsuk-label--m {
@include nhsuk-typography-responsive(24);
@include nhsuk-typography-responsive(26);
}

.nhsuk-label--s {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/tables/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ The table Nunjucks macro takes the following arguments:
| **tableClasses** | string | No | Optional additional classes to add to the table. Separate each class with a space. |
| **attributes** | object | No | Any extra HTML attributes (for example data attributes) to add to the table. |
| **caption** | string | No | Optional caption for the table. |
| **captionClasses** | string | No | Optional additional classes to add to the table caption. Separate each class with a space. |
| **captionClasses** | string | No | Optional additional classes to add to the table caption, for example `nhsuk-table__caption--l`. Separate each class with a space. |
| **head** | array | No | Optional array of table head cells. |
| **head.[].text or head.[].html** | array | No | Optional array of table head cells. If `html` is specified, the `text` argument will be ignored. |
| **head.[].colspan** | number | No | Specify how many columns a cell extends. |
Expand Down
19 changes: 19 additions & 0 deletions packages/components/tables/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Table container is used to ensure the table does not break the container.
*
* 1. Margin is removed so there isn't double spacing.
* 2. XS size not added because it matches the table header, so it'd be bad for hierarchy
*/

.nhsuk-table-container {
Expand All @@ -22,6 +23,24 @@
}
}

.nhsuk-table__caption--xl {
@include nhsuk-typography-responsive(48);
}

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

.nhsuk-table__caption--m {
@include nhsuk-typography-responsive(26);
}

.nhsuk-table__caption--s {
@include nhsuk-typography-responsive(22);
}

/* [2] */

/* Table row hover
========================================================================== */

Expand Down
2 changes: 1 addition & 1 deletion packages/core/elements/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ a {
&:after {
color: $color_nhsuk-black;
content: " (Link: " attr(href) ")"; /* [1] */
font-size: 14pt; /* [2] */
font-size: inherit; /* [2] */
}
}
}
Expand Down
66 changes: 40 additions & 26 deletions packages/core/settings/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,57 @@ $nhsuk-typography-scale: (
64: (
null: (
font-size: 48px,
line-height: 56px
line-height: 54px
),
tablet: (
font-size: 64px,
line-height: 72px
line-height: 70px
),
print: (
font-size: 53pt,
font-size: 34pt,
line-height: 1.1
)
),
48: (
null: (
font-size: 32px,
line-height: 40px
line-height: 38px
),
tablet: (
font-size: 48px,
line-height: 56px
line-height: 54px
),
print: (
font-size: 32pt,
font-size: 26pt,
line-height: 1.15
)
),
32: (
36: (
null: (
font-size: 24px,
line-height: 32px
font-size: 27px,
line-height: 33px
),
tablet: (
font-size: 32px,
line-height: 40px
font-size: 36px,
line-height: 42px
),
print: (
font-size: 24pt,
line-height: 1.05
font-size: 20pt,
line-height: 1.2
)
),
26: (
null: (
font-size: 22px,
line-height: 29px
),
tablet: (
font-size: 26px,
line-height: 32px
),
print: (
font-size: 17pt,
line-height: 1.25
)
),
24: (
Expand All @@ -78,25 +92,25 @@ $nhsuk-typography-scale: (
),
tablet: (
font-size: 24px,
line-height: 32px
line-height: 31px
),
print: (
font-size: 18pt,
line-height: 1.15
font-size: 16pt,
line-height: 1.25
)
),
22: (
null: (
font-size: 18px,
line-height: 28px
font-size: 19px,
line-height: 27px
),
tablet: (
font-size: 22px,
line-height: 32px
line-height: 30px
),
print: (
font-size: 18pt,
line-height: 1.15
font-size: 15pt,
line-height: 1.25
)
),
19: (
Expand All @@ -109,8 +123,8 @@ $nhsuk-typography-scale: (
line-height: 28px
),
print: (
font-size: 14pt,
line-height: 1.15
font-size: 13pt,
line-height: 1.25
)
),
16: (
Expand All @@ -123,8 +137,8 @@ $nhsuk-typography-scale: (
line-height: 24px
),
print: (
font-size: 14pt,
line-height: 1.2
font-size: 12pt,
line-height: 1.3
)
),
14: (
Expand All @@ -138,7 +152,7 @@ $nhsuk-typography-scale: (
),
print: (
font-size: 12pt,
line-height: 1.2
line-height: 1.3
)
)
) !default;
Expand Down
Loading

0 comments on commit fb48afc

Please sign in to comment.