diff --git a/CHANGELOG.md b/CHANGELOG.md index 51342ffba..194d04511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 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)) +- Update table styles so tables always have bottom margin ([PR 1005](https://github.com/nhsuk/nhsuk-frontend/pull/1005)) ## 8.3.0 - 24 July 2024 diff --git a/packages/components/tables/_tables.scss b/packages/components/tables/_tables.scss index e064f7a2b..44343537b 100644 --- a/packages/components/tables/_tables.scss +++ b/packages/components/tables/_tables.scss @@ -22,6 +22,16 @@ } } +.nhsuk-table { + @include nhsuk-font($size: 19); + + width: 100%; + @include nhsuk-responsive-margin(7, "bottom"); + + border-spacing: 0; + border-collapse: collapse; +} + /* Table row hover ========================================================================== */ @@ -72,8 +82,6 @@ */ .nhsuk-table-responsive { - margin-bottom: 0; - width: 100%; thead { @include visually-hidden; /* [1] */ @@ -85,7 +93,7 @@ .nhsuk-table__body { .nhsuk-table-responsive__heading { - font-weight: $nhsuk-font-bold; + @include nhsuk-typography-weight-bold; padding-right: nhsuk-spacing(3); text-align: left; /* [8] */ diff --git a/packages/components/tables/template.njk b/packages/components/tables/template.njk index f380ce270..25a5bebf7 100644 --- a/packages/components/tables/template.njk +++ b/packages/components/tables/template.njk @@ -8,7 +8,7 @@ {{ params.heading | safe }} {%- endif %} {%- endif %} - {%- if params.caption %}