Skip to content

Commit

Permalink
Change logo dimensions to be divisible by 2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
selfthinker committed Sep 19, 2016
1 parent 3a06fce commit aaf9930
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
Binary file modified source/assets/images/gov.uk_logotype_crown_invert_trans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions source/assets/stylesheets/_core-print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ img { max-width: 100% !important; }
select { background: white; }

#global-header {
margin-bottom: 1em;
margin: 3px 0 1em; // 3px additional space at top for countering -3px re-positioning of #logo img

#logo {
@include bold-80;
text-rendering: optimizeLegibility;

img {
width: 46px;
width: 45px;
height: 40px;
margin-right: 6px;
float: left;
position: relative;
top: -3px; // aligns bottom of img with bottom of "G"
vertical-align: bottom;
}
}

Expand Down
18 changes: 4 additions & 14 deletions source/assets/stylesheets/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
}
.header-logo {
margin: 5px 0 2px;
margin-top: 2px;
}
}
}
Expand Down Expand Up @@ -71,36 +71,26 @@

#logo {
float: left;
position: relative;
top: -1px;

overflow: visible;
vertical-align: baseline;

color: $white;
font-weight: bold;
font-size: 30px;
line-height: 1;
text-decoration: none;
text-rendering: optimizeLegibility;
margin-bottom: -3px;
padding-top: 2px;
border-bottom: 1px solid transparent;

background: image-url('images/gov.uk_logotype_crown.png') no-repeat;
background-size: 35px 31px;
background-size: 36px 32px;
background-position: 0 0;
@include ie-lte(8) {
background-image: image-url('images/gov.uk_logotype_crown-1x.png');
}

img {
position: relative;
top: -2px;

margin-right: 6px;

float: left;
margin: 2px 1px 0 0; // top margin aligns bottom of img with bottom of "G"
vertical-align: bottom;
visibility: hidden;
}

Expand Down
Binary file modified source/assets/stylesheets/images/gov.uk_logotype_crown-1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/assets/stylesheets/images/gov.uk_logotype_crown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/views/layouts/govuk_template.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="header-global">
<div class="header-logo">
<a href="<%= content_for?(:homepage_url) ? yield(:homepage_url) : "https://www.gov.uk/" %>" title="<%= content_for?(:logo_link_title) ? yield(:logo_link_title) : "Go to the GOV.UK homepage" %>" id="logo" class="content">
<img src="<%= asset_path 'gov.uk_logotype_crown_invert_trans.png' %>" width="35" height="31" alt=""> <%= content_for?(:global_header_text) ? yield(:global_header_text) : "GOV.UK" %>
<img src="<%= asset_path 'gov.uk_logotype_crown_invert_trans.png' %>" width="36" height="32" alt=""> <%= content_for?(:global_header_text) ? yield(:global_header_text) : "GOV.UK" %>
</a>
</div>
<%= yield :inside_header %>
Expand Down

0 comments on commit aaf9930

Please sign in to comment.