-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New class for collapsing columns for print
- Loading branch information
1 parent
de00a0c
commit fb67deb
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/assets/stylesheets/govuk_publishing_components/lib/_print_support.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// A helper class for removing column layouts when printing. | ||
// This should be applied to row/column layouts, by adding the | ||
// class to elements with a `govuk-grid-row` class. The columns | ||
// will then print at the full width of the page. | ||
// Note that only the immediate child columns will be affected. | ||
// If a child column also contains a row/column layout of | ||
// further elements, these will be unaffected and will retain | ||
// their existing column layout. Use the class again on these | ||
// nested grids to apply fullwidth column printing if required. | ||
|
||
@include govuk-media-query($media-type: print) { | ||
.gem-print-columns-none { | ||
width: 100%; | ||
|
||
> .govuk-width-container { | ||
margin: 0; | ||
max-width: none; | ||
} | ||
|
||
> [class*="govuk-grid-column"] { | ||
position: static !important; // stylelint-disable-line declaration-no-important | ||
float: none; | ||
clear: both; | ||
width: 100%; | ||
} | ||
} | ||
} |