Skip to content

Commit

Permalink
Hide print link if JS not available
Browse files Browse the repository at this point in the history
The print link relies on JS, so doesn't work if JS is not available. In this case, we should hide the link
  • Loading branch information
Vanita Barrett committed Jan 10, 2020
1 parent fdfd812 commit 22d4bfe
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions app/assets/stylesheets/views/_brexit_checker_results_page.scss
Expand Up @@ -85,28 +85,32 @@
}

.brexit-checker__print-link {
@include govuk-font(19);
background: image-url("govuk_publishing_components/icon-print.png") no-repeat 10px 50%;
padding: 0.5em 0.5em 0.5em 38px;
margin-left: -10px;
margin-top: govuk-spacing(3);
outline: 0;
border: 0;
cursor: pointer;
text-decoration: underline;
color: $govuk-link-colour;

@include govuk-device-pixel-ratio($ratio: 2) {
background-image: image-url("govuk_publishing_components/icon-print-2x.png");
background-size: 16px 18px;
}

&:hover {
color: $govuk-link-hover-colour;
}

&:focus {
@include govuk-focused-text;
display: none;

.js-enabled & {
@include govuk-font(19);
background: image-url("govuk_publishing_components/icon-print.png") no-repeat 10px 50%;
padding: 0.5em 0.5em 0.5em 38px;
margin-left: -10px;
margin-top: govuk-spacing(3);
outline: 0;
border: 0;
cursor: pointer;
text-decoration: underline;
color: $govuk-link-colour;

@include govuk-device-pixel-ratio($ratio: 2) {
background-image: image-url("govuk_publishing_components/icon-print-2x.png");
background-size: 16px 18px;
}

&:hover {
color: $govuk-link-hover-colour;
}

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

0 comments on commit 22d4bfe

Please sign in to comment.