diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss b/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss index f8f610d8d7..19c2e80c41 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss @@ -50,32 +50,6 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4"); } } -.gem-c-cookie-banner__hide-button { - @include govuk-font($size: 19); - outline: 0; - border: 0; - background: none; - text-decoration: underline; - color: $govuk-link-colour; - padding: govuk-spacing(0); - margin-top: govuk-spacing(2); - - &:hover { - color: $govuk-link-hover-colour; - cursor: pointer; - } - - &:focus { - @include govuk-focused-text; - } - - @include govuk-media-query($from: desktop) { - margin-top: govuk-spacing(0); - position: absolute; - right: govuk-spacing(1); - } -} - // Override the styles from govuk_template // stylelint-disable selector-max-id .gem-c-cookie-banner#global-cookie-message { @@ -98,10 +72,4 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4"); @include govuk-font($size: 19); margin: 0 0 govuk-spacing(2) 0; } - - .gem-c-cookie-banner__confirmation-message { - @include govuk-media-query($from: desktop) { - margin-bottom: 0; - } - } } diff --git a/app/views/govuk_publishing_components/components/_cookie_banner.html.erb b/app/views/govuk_publishing_components/components/_cookie_banner.html.erb index 187f53351a..e31d4d684c 100644 --- a/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +++ b/app/views/govuk_publishing_components/components/_cookie_banner.html.erb @@ -1,10 +1,7 @@ <% id ||= 'global-cookie-message' title ||= "Cookies on GOV.UK" - - text ||= raw("

We use some essential cookies to make this website work.

-

We’d like to set additional cookies so we and our partners can remember your settings, understand how you use GOV.UK and make improvements.

- ") + text ||= raw("

We use cookies to collect information about how you use GOV.UK. Some of these are essential to make the site work.

We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.

We may also use cookies set by other sites to help us deliver content from their services.

") cookie_preferences_href ||= "/help/cookies" confirmation_message ||= raw("You can change your cookie settings at any time.") services_cookies ||= nil @@ -74,7 +71,9 @@ diff --git a/spec/components/cookie_banner_spec.rb b/spec/components/cookie_banner_spec.rb index 4a6f6b02e1..b40afbf227 100644 --- a/spec/components/cookie_banner_spec.rb +++ b/spec/components/cookie_banner_spec.rb @@ -9,8 +9,7 @@ def component_name render_component({}) assert_select '.gem-c-cookie-banner[id="global-cookie-message"][data-module="cookie-banner"]' assert_select ".gem-c-cookie-banner__heading", text: "Cookies on GOV.UK" - assert_select ".gem-c-cookie-banner__content", text: "We use some essential cookies to make this website work. - We’d like to set additional cookies so we and our partners can remember your settings, understand how you use GOV.UK and make improvements." + assert_select ".gem-c-cookie-banner__content", text: "We use cookies to collect information about how you use GOV.UK. Some of these are essential to make the site work.We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.We may also use cookies set by other sites to help us deliver content from their services." assert_select 'button[data-hide-cookie-banner="true"]' end @@ -45,7 +44,7 @@ def component_name it "renders a hide link within the confirmation banner" do render_component({}) - assert_select ".gem-c-cookie-banner__confirmation .gem-c-cookie-banner__hide-button", text: "Hide" + assert_select ".gem-c-cookie-banner__confirmation .gem-c-cookie-banner__hide-button", text: "Hide this message" assert_select '.gem-c-cookie-banner__hide-button[data-module=track-click][data-track-category=cookieBanner][data-track-action="Hide cookie banner"]' end