Fix appearance of focused logo and service name in header#1361
Conversation
602bb8b to
2875cbf
Compare
colinrotherham
left a comment
There was a problem hiding this comment.
Incredible work 😮
I'm working odd hours tomorrow so had a look straight away!
Can I double check the logo padding inside the SVG?
It pushes the logo right/down a little bit—do we need to offset that?
|
A few notes:
|
It does, this is more of an issue for the organisational logos perhaps than when we use the NHS logo on its own. Open to other approaches to fix this! |
|
Would the GOV.UK Frontend Have a look at the image links example with double box shadow:
|
|
Ooooh, I’ll give it a try. |
1d7da81 to
de516b5
Compare
|
Updated this PR to add a new I’ve removed the hover and active styles from the NHS logo however, as it gets weird when this is combined with a service name. New comparison images below. Focused NHS logoBefore: After: Focused NHS logo and service name combinedBefore: After: Focused NHS organisation headerNo change, baring one pixel increase in gap between logo and organisation name (thus the updated visual regression images, now only 22 down from 72 in the initial PR!) Before: After: Focused service nameThis remains unchanged from the initial commit for this PR. Before: After: I have also added some extra visual regression tests for the focused NHS/service name/organisation name link. |
|
Forgot to mention, we need Until we align more with GOV.UK Frontend at least |
de516b5 to
d8b29f9
Compare
|
I've fixed Think we need a design opinion on whether the "expanded focus box" should have a solid outline all around |
@frankieroberto I gave this a try by adding: &:hover,
&:focus,
&:active {
.nhsuk-header__organisation-name,
.nhsuk-header__organisation-name-descriptor,
.nhsuk-header__service-name {
color: inherit;
}
}
+
+ &:hover {
+ .nhsuk-header__logo {
+ outline: $nhsuk-focus-width solid transparent;
+ box-shadow: 0 0 0 4px #003d78;
+ }
+ }Do you know where See what you mean about the Safari |
|
Happy with the focus states, thanks for these @paulrobertlloyd Seems a pity to drop the hover state, even though it was low-contrast. Could do a subtle colour or opacity change on hover, similar to buttons? |
55a462b to
cd4b017
Compare
|
Added a hover state that attempts to replicate the underline used in the service/organisation name. Some notes:
Combined logo and service name
Organisation name
|
31cbf5c to
1d8fc5d
Compare
|
Obviously @paulrobertlloyd found a brilliant workaround, but! What if we use his same Just pushed the old hover style back up, but feel free to drop the commit if we prefer the underline
|
a9fe67f to
6e147fe
Compare
|
I tried to recreate the previous hover state originally once I figured out the work around, but then decided on the underline because it:
|
6e147fe to
1d8fc5d
Compare
|
No worries, it's gone. Like it never happened 😶 |
|
colinrotherham
left a comment
There was a problem hiding this comment.
Happy for these hover/focus styles to go in @anandamaryon1?
Saw a thumbs up in #1361 (comment)
|
All I’ll add is that, when the link underline stuff gets merged, we should update the line-weight for the logo hover to match. |
Fix appearance of focused logo and service name in header


















Description
Fixes #1369.
Reviewing the focused header states, a few issues become apparent:
Note
The commentary below is out of date. I’m now using a different approach by adding a mixin to use for focusing images. See the updated fix described in #1361 (comment)
This PR fixes these issues by:
and finally:
Focused NHS logo
Before, focused:
After, focused:
After, hover:
After, active:
Focused organiaation logo
Before:
After:
Focused service name
Before:
After:
Checklist