Skip to content

Commit

Permalink
Merge pull request #948 from alphagov/no-js-cookie-banner
Browse files Browse the repository at this point in the history
Hide 'Accept Cookies' button when Javascript not available
  • Loading branch information
Vanita Barrett authored Jun 25, 2019
2 parents c6ea893 + aef4cf5 commit 57d8d3c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Unreleased

* Fix confirmation message being read to screenreaders (PR #952)
* Hide 'Accept Cookies' button when Javascript not available (PR #948)

## 17.6.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ $govuk-cookie-banner-text-green: #00823b;
width: 100%;

@include govuk-media-query($from: mobile, $until: desktop) {
width: 49%;

&.gem-c-cookie-banner__button-accept {
float: left;
width: 49%;
}

&.gem-c-cookie-banner__button-settings {
float: right;
.js-enabled & {
float: right;
width: 49%;
}
}
}

Expand All @@ -75,6 +77,14 @@ $govuk-cookie-banner-text-green: #00823b;
}
}

.gem-c-cookie-banner__button-accept {
display: none;

.js-enabled & {
display: inline-block;
}
}

.gem-c-cookie-banner__confirmation {
display: none;
position: relative;
Expand Down

0 comments on commit 57d8d3c

Please sign in to comment.