-
Notifications
You must be signed in to change notification settings - Fork 67
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
Logo fixes #237
Logo fixes #237
Conversation
d0caa0f
to
3c37068
Compare
font-weight: bold; | ||
font-size: 24px; | ||
margin-bottom: 1em; | ||
margin: 3px 0 1em; // 3px addtional space at top for countering -3px re-poositioning of #logo img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
‘addtional’ should be ‘additional’. ‘re-poositioning’ should be ‘re-positioning’
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed.
Is there a reason why |
Also, did we consider moving to an SVG crown? Would be good to document why we decided not to here. |
Regarding the transparency, I don't know. I can use graphic tools to a degree but felt not confident enough doing something with an image as important as the logo. That's why I asked Mark to make them. Let's ask him about the transparency when he's back. We talked about using an SVG but if we wanted to do that, I think that should be in a separate PR. All of these commits here are fixing one thing or another. Using an SVG logo would be more of a feature than a bugfix. |
3c37068
to
5497e31
Compare
hey both, used the 1bit transparency out of habit (was an old IE thing right?). it's on a black background so thought might as well put it on a black matte. happy to do it again with full transparency if you prefer. being nit-picking, the GOV.UK looks like its sitting a tiny bit low on the new version (I guess this is because there's more whitespace around the top of the search bar now). could we shift it up a pixel or two? |
IE6 and lower. I think we can do full translucency now :) |
@markhurrell, sorry, I think I might have missed a pixel or so from the top when making the screenshot. Because nothing has changed on the dimensions at all, except what I described earlier:
I validated that by making a screenshot (together with bits of the chrome) and measuring the pixels while zoomed in. I guess it's probably best if we could look at it together on a real screen (and not a screenshot) to be sure. I can also push some pixels around at the same time if I need to. That should be the quickest to resolve any potential issues. |
@markhurrell, are you sure that is the correct image? I just put it into the folder and my git doesn't show me that there is any difference. On another related note, I have made a new before/after gif which shows both versions after each other, together with the browser canvas on the side to make sure you can see the correct dimensions. (Sorry for the bad quality.) |
@robinwhittleton the 1-bit transparency could be a side effect of using ImageAlpha incorrectly. |
nope I did it deliberately because I care about ie6 users bruh Mark Hurrell On 23 August 2016 at 17:13, Alex Torrance [email protected] wrote:
|
5497e31
to
2ae521f
Compare
I have updated the logo with the new one Mark provided. (Sorry, I didn't see any changes in git because I failed to copy the file correctly into the corresponding folder.) I also updated the one for IE8 and under (I just halved the new one). |
2ae521f
to
aaf9930
Compare
@NickColley, I believe this should fix that issue: alphagov/govuk_frontend_toolkit/pull/328 |
The other PR was merged, but I'm not sure how long it takes for the frontend toolkit to be packaged and released. |
@selfthinker we should wait till upstream is up to date then update it here to fix the issue I think? |
When something has a height (especially of px) it doesn't grow with the text (not when zooming but increasing just the font size). Just removing the `height` fixes it in this case.
* `line-height` should be unitless * Using padding on images is invalid, using margin instead
* Setting width and height via CSS is not necessary anymore since the dimensions were set in the HTML in c0e8bd3 * Removing the border on the logo img is not necessary anymore as it was removed on all images globally in db43128 * Setting `display` on the image is not necessary as it's also floating and everything that floats is always `display: block` * Setting a `line-height` has no effect on replaced elements like images * When the styling for the current print logo was changed in 0704a5e the old styling was not removed * Using `core-48` together with redefining the font-size and font-weight is (nearly) the same as using `bold-80`, the original PR alphagov/static#352 mentions that this was not intentional This was only changed to `bold-48`, not `bold-80` because of a bug in govuk_frontend_toolkit, see alphagov/govuk_frontend_toolkit#328
The logo was 71x62 and resized to be 35x31. As the ratio is slightly off because 71 is not divisible by 2 (there are no half pixels), this changes the logo to be 72x64. This also simplifies the CSS (removing unnecessary floats and spacing) and fixes vertical alignment of the logo in print.
aaf9930
to
973c9e4
Compare
@NickColley, as we investigated and found that govuk_template uses a 16 months old frontend toolkit and I don't think it's worth the hassle, I have removed the offending line and left a comment in the CSS accordingly. I hope this can now be merged? |
LGTM 👍 |
GOV.UK crown logo image has been tweaked slightly, so our app didn’t match newer prototypes. Changes from here: alphagov/govuk_template#237
Makes the following changes: Remove generated gov.uk from relative print links alphagov/govuk_template#234 Fix extended footer on certain pages alphagov/govuk_template#177 Degrade gracefully when external JS can’t be loaded alphagov/govuk_template#248 Add docs for adding tabindex="-1" to fix the skiplink alphagov/govuk_template#250 Logo fixes alphagov/govuk_template#237 Remove external links styles alphagov/govuk_template#231 Don’t include both html5shiv and html5shiv-printshiv alphagov/govuk_template#254 Update govuk_frontend_toolkit to 5.0.0 alphagov/govuk_template#256 Fixed scala compilation failure for play template alphagov/govuk_template#261
Makes the following changes: Remove generated gov.uk from relative print links alphagov/govuk_template#234 Fix extended footer on certain pages alphagov/govuk_template#177 Degrade gracefully when external JS can’t be loaded alphagov/govuk_template#248 Add docs for adding tabindex="-1" to fix the skiplink alphagov/govuk_template#250 Logo fixes alphagov/govuk_template#237 Remove external links styles alphagov/govuk_template#231 Don’t include both html5shiv and html5shiv-printshiv alphagov/govuk_template#254 Update govuk_frontend_toolkit to 5.0.0 alphagov/govuk_template#256 Fixed scala compilation failure for play template alphagov/govuk_template#261
I initially only wanted to fix that the logo breaks layout with increased font size (#232).
But because I found a couple of small issue around the logo (invalid, never executed, non-standard or confusing code), I fixed and refactored a few more things. One of the changes includes changing the dimensions of the logo. The "new" logo (both versions) were done and provided to me by @markhurrell.
Three known issues with the new logo:
I have intentionally not changed the IE8-and-under version of the logo as it doesn't look broken. Please let me know if you think that is important to do.I looked at the git history for most of my changes, please refer to the commit messages for further information (history and rationale).
Before/after screenshots
These screenshots were all made from Firefox on Mac.
The visible change is that the logo is grew 1px on both sides. Its bottom is still vertically aligned with the "G", so that it grows 1px to the top and 1px to the right. But the top space was removed again from an containing div, so the height dimensions of the left-hand elements should be exactly the same as before (except for the image itself), the width got pushed 1px to the right.
Screen logo before:
Screen logo after (hardly any changes, only the logo is bigger):
Print logo before:
Print logo after (a few more changes, for the better I think):
Browser tests
I tested in a lot of browsers via BrowerStack and it generally was fine. Some probably ignorable issues I found with this change:
What I didn't test: Because I don't know what else could potentially affect the header (other included elements or certain modifications) I didn't test any of that. It would be great if someone could let me know what else there is and how I can test it.