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

Update header alignment to match layout #165

Merged
merged 2 commits into from
Nov 21, 2019
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
1 change: 1 addition & 0 deletions lib/assets/stylesheets/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import "modules/anchored-heading";
@import "modules/app-pane";
@import "modules/footer";
@import "modules/header";
@import "modules/page-review";
@import "modules/search";
@import "modules/contribution-banner";
Expand Down
16 changes: 16 additions & 0 deletions lib/assets/stylesheets/modules/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.app-header {
// Adjust the padding on the header container so that it matches the custom sidebar.
.govuk-header__container--full-width {
@include govuk-responsive-padding(6, "left");
@include govuk-responsive-padding(6, "right");
}
// Give the product name in the header more space so it does not wrap early on smaller screens.
@include govuk-media-query($from: desktop) {
.govuk-header__logo {
width: 45%;
}
.govuk-header__content {
width: 55%;
}
}
}
2 changes: 1 addition & 1 deletion lib/assets/stylesheets/modules/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ html.has-search-results-open {
-webkit-overflow-scrolling: touch;
-ms-overflow-style: none;
@include govuk-media-query(tablet) {
padding: 22px 20px 0 30px;
padding: govuk-spacing(6);
top: 0;
// The width of the sidebar
left: 330px;
Expand Down
4 changes: 1 addition & 3 deletions lib/assets/stylesheets/modules/_technical-documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
color: $govuk-text-colour;

@include govuk-media-query(tablet) {
// We add 2 pixels to the gutter here to ensure there's sufficient spacing between
// an anchor link (see _anchored-heading.scss) on a heading and the left-hand pane.
margin: 0 govuk-spacing(6) (govuk-spacing(6) + 2px);
margin: 0 govuk-spacing(6) govuk-spacing(6);
}

.has-search-results-open & {
Expand Down
4 changes: 2 additions & 2 deletions lib/assets/stylesheets/modules/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
a:link, a:visited {
display: block;
position: relative;
padding: 8px govuk-spacing(6) 8px govuk-spacing(3);
padding: 8px govuk-spacing(6) 8px govuk-spacing(2);
margin: 0 -1 * govuk-spacing(3);
border-left: 5px solid transparent;
text-decoration: none;
Expand Down Expand Up @@ -93,7 +93,7 @@

@include govuk-media-query(tablet) {
.toc {
padding: 22px govuk-spacing(6) govuk-spacing(3)
padding: govuk-spacing(5) govuk-spacing(6);
}

// Prevent the fixedsticky spacer from appearing if the browser is resized
Expand Down
2 changes: 1 addition & 1 deletion lib/source/layouts/_header.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header class="govuk-header " role="banner" data-module="govuk-header">
<header class="govuk-header app-header" role="banner" data-module="govuk-header">
<div class="govuk-header__container govuk-header__container--full-width">
<div class="govuk-header__logo">
<% if config[:tech_docs][:service_link] %>
Expand Down