From a95a2a91ed3d88277f3b038440aac87dc8f75d8e Mon Sep 17 00:00:00 2001 From: Kimberly Grey Date: Fri, 22 Jul 2022 13:31:27 +0100 Subject: [PATCH 1/3] Remove padding-right from last column in summary list row Tweaks CSS so that the last column always has right padding removed, not only if the last column is an actions column. --- src/govuk/components/summary-list/_index.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/govuk/components/summary-list/_index.scss b/src/govuk/components/summary-list/_index.scss index 95e0ebdc68..7c20dbd625 100644 --- a/src/govuk/components/summary-list/_index.scss +++ b/src/govuk/components/summary-list/_index.scss @@ -23,6 +23,11 @@ } } + // Remove right padding from the last column in the row + .govuk-summary-list__row > :last-child { + padding-right: 0; + } + // Provide an empty 'cell' for rows that don't have actions – otherwise the // bottom border is not drawn for that part of the row in some browsers. .govuk-summary-list__row--no-actions { @@ -52,7 +57,7 @@ margin-bottom: govuk-spacing(3); @include govuk-media-query($from: tablet) { width: 20%; - padding-right: 0; + padding-right: 0; // Needed for IE8 text-align: right; } } From e0397b655adcd9033d9725efad0aa1e4b7c86462 Mon Sep 17 00:00:00 2001 From: Kimberly Grey Date: Fri, 22 Jul 2022 13:50:16 +0100 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 570aa08431..f0f0246305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ We’ve also made fixes in the following pull requests: - [#2670: Define mininimum width for select component](https://github.com/alphagov/govuk-frontend/pull/2670) - [#2723: Style accordion and tabs text content with `govuk-body` class](https://github.com/alphagov/govuk-frontend/pull/2723) - [#2724: Remove redundant `aria-hidden` attribute from the content when using the Details polyfill](https://github.com/alphagov/govuk-frontend/pull/2724) +- [#2725: Remove padding-right from last column in summary list row](https://github.com/alphagov/govuk-frontend/pull/2725) ## 4.2.0 (Feature release) From 9aa5e77e91cd75d932c7f8a40e99a120b8949b2d Mon Sep 17 00:00:00 2001 From: Kimberly Grey Date: Tue, 26 Jul 2022 13:20:10 +0100 Subject: [PATCH 3/3] Fix right padding being removed from no-actions rows If some rows in the summary list had actions but others didn't, the rows without actions would result in a slightly wider 'last' column. This resolves that issue by not applying the right padding removal to these rows. --- src/govuk/components/summary-list/_index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/govuk/components/summary-list/_index.scss b/src/govuk/components/summary-list/_index.scss index 7c20dbd625..593996546c 100644 --- a/src/govuk/components/summary-list/_index.scss +++ b/src/govuk/components/summary-list/_index.scss @@ -24,7 +24,7 @@ } // Remove right padding from the last column in the row - .govuk-summary-list__row > :last-child { + .govuk-summary-list__row:not(.govuk-summary-list__row--no-actions) > :last-child { padding-right: 0; }