Skip to content

Commit

Permalink
Add display override for hiding content when printing
Browse files Browse the repository at this point in the history
When printing users often need to print the content without the surrounding site furniture (eg menus, breadcrumbs, back links and footers).

Introduce a helper so that a class can be used to hide any given element from the print view.

This is explicit and preferable to listing all the selectors for things that shouldn't be printed. These lists grow unwieldy over time.
  • Loading branch information
fofr committed Feb 4, 2020
1 parent 1d2fcb6 commit 9233294
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/govuk/overrides/_display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@
.govuk-\!-display-none {
display: none !important;
}

@include govuk-media-query($media-type: print) {
.govuk-\!-print-display-none {
display: none !important;
}
}
}

0 comments on commit 9233294

Please sign in to comment.