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

Crown logo is not always aligned with logotype #1575

Closed
NickColley opened this issue Sep 16, 2019 · 7 comments · Fixed by #1587
Closed

Crown logo is not always aligned with logotype #1575

NickColley opened this issue Sep 16, 2019 · 7 comments · Fixed by #1587
Assignees
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) 🕔 hours A well understood issue which we expect to take less than a day to resolve.

Comments

@NickColley
Copy link
Contributor

Speaking with Dave it seems you can't reproduce this on his machine but I have been able to on Browserstack.

Screen Shot 2019-09-16 at 14 04 28

Safari shows the logo lower instead of higher.

@NickColley NickColley added awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) labels Sep 16, 2019
@dashouse
Copy link

dashouse commented Sep 16, 2019

I believe something has happened to increase the header size by 4px, the crown has potentially just stayed in the same place?

The header should be 50px / 60px with blue bar. Now 54px / 64px.

Removing the svg puts it back to original size.

@NickColley
Copy link
Contributor Author

When testing in browser stack, Chrome 75 is fine 76 is not.

@NickColley
Copy link
Contributor Author

If you move the font sizing CSS to the child element it brings back the previous behaviour, with some small adjustments needed.

Options:

  1. Raise a bug report with Chrome
  2. Make non-breaking CSS adjustments
  3. Make a breaking change in version 4 to change the logo to entirely SVG

@colinrotherham
Copy link
Contributor

@NickColley I nearly raised this yesterday as I've been working on an old project (GOV.UK Elements) and spotted the alignment difference!

Can confirm in Chrome 77.

Logo

@kr8n3r
Copy link

kr8n3r commented Sep 16, 2019

something like this should have it aligned across FF, Safari and Chrome

.govuk-header__logotype-crown {
    position: relative;
    margin-right: 1px;
    fill: currentColor;
    top: 0.125em;
    width: 1.2em;
    height: 1.2em;
    margin-top: -8px;
}

width, height and top will align it to the baseline. negative top margin is to tweak offset a bit

@NickColley
Copy link
Contributor Author

NickColley commented Sep 18, 2019

Short term

We're going to fix this in CSS

Longer term

We've been thinking about replacing this with an inline SVG which includes the 'GOV.UK' text within the image itself.

This would also mean that when the fallback fonts are loaded then the logo will be correct, this could be useful if we were to change the loading strategy to 'swap'.

This would also include Internet Explorer 8 not loading the font.

We'll create another issue once we've done the short term work.

@NickColley NickColley added 🕔 hours A well understood issue which we expect to take less than a day to resolve. Priority: low and removed awaiting triage Needs triaging by team labels Sep 18, 2019
@36degrees
Copy link
Contributor

As found by @trevorsaint, it looks like adding display: inline-block to the span.govuk-header__logotype fixes this (at least in Chrome – will need x-browser testing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) 🕔 hours A well understood issue which we expect to take less than a day to resolve.
Projects
Development

Successfully merging a pull request may close this issue.

5 participants