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

Fix padding on GOV.UK logo affecting hover and focus states #2171

Merged
merged 3 commits into from
Apr 6, 2021
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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ This was added in [pull request #2164: Enable cookie banner to set link styled a

### Fixes

- [#2132 Improve vertical alignment of phase banner tag on mobile devices](https://github.com/alphagov/govuk-frontend/pull/2132) – thanks to [@matthewmascord](https://github.com/matthewmascord) for contributing this.
- [#2157 Use pointer cursor for 'Menu' button in header](https://github.com/alphagov/govuk-frontend/pull/2157) – thanks to [@MalcolmVonMoJ](https://github.com/MalcolmVonMoJ) for contributing this.
- [#2132: Improve vertical alignment of phase banner tag on mobile devices](https://github.com/alphagov/govuk-frontend/pull/2132) – thanks to [@matthewmascord](https://github.com/matthewmascord) for contributing this.
- [#2157: Use pointer cursor for 'Menu' button in header](https://github.com/alphagov/govuk-frontend/pull/2157) – thanks to [@MalcolmVonMoJ](https://github.com/MalcolmVonMoJ) for contributing this.
- [#2171: Fix padding on GOV.UK logo affecting hover and focus states](https://github.com/alphagov/govuk-frontend/pull/2171)

## 3.11.0 (Feature release)

Expand Down
10 changes: 9 additions & 1 deletion src/govuk/components/header/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@

.govuk-header__logotype {
display: inline-block;

// Add a gap between logo and any product name
margin-right: govuk-spacing(1);

// But remove it if there's nothing after the logo to keep hover and focus
// states neat
&:last-child {
margin-right: 0;
}
}

.govuk-header__logotype-crown {
Expand All @@ -57,7 +65,6 @@
.govuk-header__product-name {
@include govuk-font($size: 24, $line-height: 1);
display: inline-table;
padding-right: govuk-spacing(2);
}

.govuk-header__link {
Expand Down Expand Up @@ -92,6 +99,7 @@
@include govuk-font($size: false, $weight: bold);

display: inline-block;
margin-right: govuk-spacing(2);
font-size: 30px; // We don't have a mixin that produces 30px font size
line-height: 1;

Expand Down