Put basic print stylesheet back in

Replicates the GOV.UK template one, adjusted for
the GOV.UK Frontend template HTML.
This commit is contained in:
Tom Byers
2019-10-17 12:07:07 +01:00
parent 7f0b207f0a
commit faf2357ddf
3 changed files with 87 additions and 1 deletions

View File

@@ -0,0 +1,85 @@
// sass-lint:disable no-important
// set asset URL root to match that of application
$govuk-assets-path: "/static/";
@import "settings/all";
@import "tools/all";
@import "helpers/all";
@import "core/all";
@import "objects/all";
* {
background: transparent;
color: black;
text-shadow: none;
filter: none;
-ms-filter: none;
}
body {
@include govuk-font($size: 14);
margin: 0;
padding: 0;
width: 100%;
}
a,
a:visited {
word-wrap: break-word;
}
a[href^="/"]:after,
a[href^="http://"]:after,
a[href^="https://"]:after {
content: " (" attr(href) ")";
font-size: 90%;
}
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
img {
max-width: 100% !important;
}
select {
background: white;
}
.govuk-header {
.govuk-header__logo {
@include govuk-font($size: 19);
text-rendering: optimizeLegibility;
a {
&,
&:visited {
text-decoration: none;
}
&:after {
content: "";
}
}
svg {
width: 45px;
height: 40px;
position: relative;
top: -3px;
vertical-align: bottom;
}
}
}
.govuk-visually-hidden,
.govuk-visually-hidden-focusable,
.notify-cookie-message,
.govuk-skip-link,
.govuk-footer {
display: none !important;
}

View File

@@ -13,6 +13,7 @@
{% block head %} {% block head %}
<link rel="stylesheet" media="screen" href="{{ asset_url('stylesheets/main.css') }}" /> <link rel="stylesheet" media="screen" href="{{ asset_url('stylesheets/main.css') }}" />
<link rel="stylesheet" media="print" href="{{ asset_url('stylesheets/print.css') }}" />
<style> <style>
.govuk-header__container { border-color: {{header_colour}} } .govuk-header__container { border-color: {{header_colour}} }
</style> </style>

View File

@@ -126,7 +126,7 @@ const javascripts = () => {
const sass = () => { const sass = () => {
return src(paths.src + '/stylesheets/main*.scss') return src([paths.src + '/stylesheets/main*.scss', paths.src + '/stylesheets/print.scss'])
.pipe(plugins.prettyerror()) .pipe(plugins.prettyerror())
.pipe(plugins.sass({ .pipe(plugins.sass({
outputStyle: 'compressed', outputStyle: 'compressed',