From 5f89afe301666bb653bf7fc726fd8fb5da6d06e1 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Tue, 2 Feb 2021 09:43:33 +0000 Subject: [PATCH 1/2] Remove UA horizontal margins on buttons in Safari MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Safari’s default user-agent styles for buttons include a 2px margin on the left and right. Explicitly set the left and right margin to 0 rather than relying on the default user-agent styles having a margin of 0 to ensure consistent alignment and spacing across browsers. --- src/govuk/components/button/_index.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/govuk/components/button/_index.scss b/src/govuk/components/button/_index.scss index f954e8b293..beba4044b2 100644 --- a/src/govuk/components/button/_index.scss +++ b/src/govuk/components/button/_index.scss @@ -29,6 +29,8 @@ position: relative; width: 100%; margin-top: 0; + margin-right: 0; + margin-left: 0; @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2 padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1 border: $govuk-border-width-form-element solid transparent; From 794368060c1fb916f2ee40bdcea12713e7a76c62 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Tue, 2 Feb 2021 09:46:16 +0000 Subject: [PATCH 2/2] Document in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de70e86956..d20d7710ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ We’ve made fixes to GOV.UK Frontend in the following pull requests: - [#2092: Use tabular numbers for character count message](https://github.com/alphagov/govuk-frontend/pull/2092) - [#2045: Stop same-site cookies from being wiped when printing in Internet Explorer 11](https://github.com/alphagov/govuk-frontend/pull/2045) – thanks to [@gunjam](https://github.com/gunjam) for contributing this - [#2093: Only output space after breadcrumbs class if there’s an additional class](https://github.com/alphagov/govuk-frontend/pull/2093) – thanks to [@frankieroberto](https://github.com/frankieroberto) for contributing this. +- [#2133: Remove user-agent default 2px horizontal margins on buttons in Safari](https://github.com/alphagov/govuk-frontend/pull/2133) ## 3.10.2 (Patch release)