Default the cookie banner to be hidden

It should only be shown if JS is available and the
cookieMessage JS finds consent has not been set.
This commit is contained in:
Tom Byers
2020-01-14 12:11:40 +00:00
parent 1a97c6028c
commit 1d9c5e5da9
4 changed files with 11 additions and 23 deletions

View File

@@ -11,25 +11,11 @@
@include govuk-responsive-padding(5, "bottom");
}
.notify-cookie-banner__with-js {
// component should only be shown if JS is available, by the cookieMessage JS, so hide by default
.notify-cookie-banner {
display: none;
}
.notify-cookie-banner__no-js {
display: block;
}
.js-enabled {
.notify-cookie-banner__no-js,
.notify-cookie-banner {
display: none; // shown with JS, always on for non-JS
}
.notify-cookie-banner__with-js {
display: block;
}
}
.notify-cookie-banner__buttons {
display: flex;
flex-wrap: wrap;