Skip to content

Commit

Permalink
Merge pull request #2283 from alphagov/make-mobile-menu-toggle-a-button
Browse files Browse the repository at this point in the history
Make mobile menu toggle a button
  • Loading branch information
andysellick authored Sep 24, 2020
2 parents 5e14d15 + 6a336c8 commit b8a30e4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions app/assets/stylesheets/helpers/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,36 @@
}
}

.mobile-menu-toggle {
@include govuk-font(16);
float: right;
padding: 6px 0 4px 0;
color: govuk-colour("white");
background: none;
border: 0;

@include govuk-media-query($from: tablet) {
display: none;
}

&:focus {
@include govuk-focused-text;
}

&:after {
display: inline-block;
font-size: 8px;
height: 8px;
padding-left: 5px;
vertical-align: middle;
content: " \25BC";
}

&.js-visible:after {
content: " \25B2";
}
}

.header-proposition {
a {
&.menu {
Expand Down
2 changes: 1 addition & 1 deletion app/views/root/proposition_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="header-proposition">
<div class="content">
<a href="#proposition-links" class="js-header-toggle menu">Menu</a>
<button data-search-toggle-for="proposition-links" class="js-header-toggle mobile-menu-toggle">Menu</button>
</div>
</div>

0 comments on commit b8a30e4

Please sign in to comment.