diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fbb6d9557..9a67aca0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Note: We're not following semantic versioning yet, we are going to talk about this soon. -## Unreleased +## 0.0.32-alpha (Breaking release) 💥 Breaking changes: @@ -118,7 +118,7 @@ Note: We're not following semantic versioning yet, we are going to talk about th `govuk-font-regular-tabular-19`), have been removed and replaced with calls to a new mixin `govuk-font`. If you are using these mixins in your application you will need to update your code to call `govuk-font` instead. - + ([PR #772](https://github.com/alphagov/govuk-frontend/pull/772)) - The font maps are no longer as individual variables (e.g. `$govuk-font-80`) - @@ -170,15 +170,15 @@ Note: We're not following semantic versioning yet, we are going to talk about th ([PR #782](https://github.com/alphagov/govuk-frontend/pull/782)) - Removal of `govuk-prose-scope` - We don't have confidence that the prose scope is well understood – + We don't have confidence that the prose scope is well understood – without further research / better documentation it's safer to remove it for now. - - If you are currently using prose-scope, you should revert to applying classes to + + If you are currently using prose-scope, you should revert to applying classes to individual headings, lists and hr elements. - In version [0.0.29-alpha](https://github.com/alphagov/govuk-frontend/releases/tag/v0.0.29-alpha) - release we have added the option to enable global link and paragraph styles. - - If you're using a recent version of the Private Beta Prototype kit, + In version [0.0.29-alpha](https://github.com/alphagov/govuk-frontend/releases/tag/v0.0.29-alpha) + release we have added the option to enable global link and paragraph styles. + + If you're using a recent version of the Private Beta Prototype kit, this is enabled by default. ([PR #778](https://github.com/alphagov/govuk-frontend/pull/778)) @@ -234,10 +234,10 @@ Note: We're not following semantic versioning yet, we are going to talk about th and footer (the OGL logo) by marking them as non-focusable elements ([PR #774](https://github.com/alphagov/govuk-frontend/pull/774)) -- Use the correct class name in bold label example +- Use the correct class name in bold label example (govuk-label--s rather than govuk-label--bold) ([PR #784](https://github.com/alphagov/govuk-frontend/pull/784)) - + - Update table of arguments for each component to ensure they're accurate. ([PR #769](https://github.com/alphagov/govuk-frontend/pull/769)) diff --git a/dist/VERSION.txt b/dist/VERSION.txt index 65b49cfa8a..ad35dcca66 100644 --- a/dist/VERSION.txt +++ b/dist/VERSION.txt @@ -1 +1 @@ -0.0.31-alpha +0.0.32-alpha diff --git a/dist/assets/images/README.md b/dist/assets/images/README.md index 4967404967..cb3c28a2bc 100644 --- a/dist/assets/images/README.md +++ b/dist/assets/images/README.md @@ -8,10 +8,10 @@ the npm package install path to `/assets` Example: ``` -app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) +app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ``` For static use, the path is set to `/assets/images`. You need to copy assets -from `/node_modules/@govuk-frontend/frontend/assets` to the root of your folder. +from `/node_modules/govuk-frontend/assets` to the root of your folder. See `dist` folder for an example. diff --git a/dist/govuk-frontend-0.0.31-alpha.min.css b/dist/govuk-frontend-0.0.31-alpha.min.css deleted file mode 100644 index d79f9c5abf..0000000000 --- a/dist/govuk-frontend-0.0.31-alpha.min.css +++ /dev/null @@ -1,3 +0,0 @@ -.govuk-link,.govuk-prose-scope a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} - -/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:nta;src:url(/assets/fonts/light-2c037cf7e1-v1.eot);src:url(/assets/fonts/light-2c037cf7e1-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-f38ad40456-v1.woff2) format("woff2"),url(/assets/fonts/light-458f8ea81c-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:nta;src:url(/assets/fonts/bold-fb2676462a-v1.eot);src:url(/assets/fonts/bold-fb2676462a-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-a2452cb66f-v1.woff2) format("woff2"),url(/assets/fonts/bold-f38c792ac2-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot);src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-tabular-851b10ccdd-v1.woff2) format("woff2"),url(/assets/fonts/light-tabular-62cc6f0a28-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot);src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-tabular-b89238d840-v1.woff2) format("woff2"),url(/assets/fonts/bold-tabular-784c21afb8-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@media print{.govuk-link,.govuk-prose-scope a{font-family:sans-serif}}.govuk-link:focus,.govuk-prose-scope a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-link:link,.govuk-prose-scope a:link{color:#005ea5}.govuk-link:visited,.govuk-prose-scope a:visited{color:#4c2c92}.govuk-link:active,.govuk-link:hover,.govuk-prose-scope a:active,.govuk-prose-scope a:hover{color:#2b8cc4}@media print{.govuk-link[href^="/"]:after,.govuk-link[href^="http://"]:after,.govuk-link[href^="https://"]:after,.govuk-prose-scope a[href^="/"]:after,.govuk-prose-scope a[href^="http://"]:after,.govuk-prose-scope a[href^="https://"]:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:active,.govuk-link--muted:hover,.govuk-link--muted:link,.govuk-link--muted:visited{color:#6f777b}.govuk-link--muted:focus,.govuk-link--muted:link:focus{color:#0b0c0c}@media print{.govuk-link--muted:link:focus{color:#000}}.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:link:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:link:focus{color:#000}}.govuk-link--no-visited-state:visited{color:#005ea5}.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-size:19px;line-height:25px}}@media print{.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{margin-bottom:20px}}.govuk-list .govuk-list,.govuk-list .govuk-prose-scope ol,.govuk-list .govuk-prose-scope ul,.govuk-prose-scope .govuk-list ol,.govuk-prose-scope .govuk-list ul,.govuk-prose-scope ol .govuk-list,.govuk-prose-scope ol ol,.govuk-prose-scope ol ul,.govuk-prose-scope ul .govuk-list,.govuk-prose-scope ul ol,.govuk-prose-scope ul ul{margin-top:10px}@media (min-width:40.0625em){.govuk-list>li,.govuk-prose-scope ol>li,.govuk-prose-scope ul>li{margin-bottom:5px}}.govuk-list a:link,.govuk-prose-scope ol a:link,.govuk-prose-scope ul a:link{color:#005ea5}.govuk-list a:visited,.govuk-prose-scope ol a:visited,.govuk-prose-scope ul a:visited{color:#4c2c92}.govuk-list a:active,.govuk-list a:hover,.govuk-prose-scope ol a:active,.govuk-prose-scope ol a:hover,.govuk-prose-scope ul a:active,.govuk-prose-scope ul a:hover{color:#2b8cc4}.govuk-list--bullet,.govuk-prose-scope ul{padding-left:20px;list-style-type:disc}.govuk-list--number,.govuk-prose-scope ol{padding-left:20px;list-style-type:decimal}.govuk-template{background-color:#dee0e2}.govuk-template__body{margin:0;background-color:#fff}.govuk-heading-xl,.govuk-prose-scope h1{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl,.govuk-prose-scope h1{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-xl,.govuk-prose-scope h1{font-size:48px;line-height:50px}}@media print{.govuk-heading-xl,.govuk-prose-scope h1{font-size:32pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-xl,.govuk-prose-scope h1{margin-bottom:50px}}.govuk-heading-l,.govuk-prose-scope h2{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l,.govuk-prose-scope h2{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-l,.govuk-prose-scope h2{font-size:36px;line-height:40px}}@media print{.govuk-heading-l,.govuk-prose-scope h2{font-size:24pt;line-height:1.05}}@media (min-width:40.0625em){.govuk-heading-l,.govuk-prose-scope h2{margin-bottom:30px}}.govuk-heading-m,.govuk-prose-scope h3{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m,.govuk-prose-scope h3{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-m,.govuk-prose-scope h3{font-size:24px;line-height:30px}}@media print{.govuk-heading-m,.govuk-prose-scope h3{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-m,.govuk-prose-scope h3{margin-bottom:20px}}.govuk-heading-s,.govuk-prose-scope h4{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s,.govuk-prose-scope h4{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-s,.govuk-prose-scope h4{font-size:19px;line-height:25px}}@media print{.govuk-heading-s,.govuk-prose-scope h4{font-size:14pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-s,.govuk-prose-scope h4{margin-bottom:20px}}.govuk-caption-xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;display:block;margin-bottom:5px;color:#6f777b}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-xl{font-size:27px;line-height:30px}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;display:block;margin-bottom:5px;color:#6f777b}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-l{font-size:24px;line-height:30px}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;color:#6f777b}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-m{font-size:19px;line-height:25px}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-l,.govuk-body-lead{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;margin-top:0;margin-bottom:20px}@media print{.govuk-body-l,.govuk-body-lead{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-l,.govuk-body-lead{font-size:24px;line-height:30px}}@media print{.govuk-body-l,.govuk-body-lead{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-body-l,.govuk-body-lead{margin-bottom:30px}}.govuk-body,.govuk-body-m,.govuk-prose-scope p{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m,.govuk-prose-scope p{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body,.govuk-body-m,.govuk-prose-scope p{font-size:19px;line-height:25px}}@media print{.govuk-body,.govuk-body-m,.govuk-prose-scope p{font-size:14pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-body,.govuk-body-m,.govuk-prose-scope p{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-s{font-size:16px;line-height:20px}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;line-height:15px;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-xs{font-size:14px;line-height:20px}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l,.govuk-prose-scope .govuk-body-l+h2,.govuk-prose-scope .govuk-body-lead+h2{padding-top:5px}@media (min-width:40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l,.govuk-prose-scope .govuk-body-l+h2,.govuk-prose-scope .govuk-body-lead+h2{padding-top:10px}}.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l,.govuk-prose-scope .govuk-body+h2,.govuk-prose-scope .govuk-body-m+h2,.govuk-prose-scope .govuk-body-s+h2,.govuk-prose-scope .govuk-list+h2,.govuk-prose-scope ol+.govuk-heading-l,.govuk-prose-scope ol+h2,.govuk-prose-scope p+.govuk-heading-l,.govuk-prose-scope p+h2,.govuk-prose-scope ul+.govuk-heading-l,.govuk-prose-scope ul+h2{padding-top:15px}@media (min-width:40.0625em){.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l,.govuk-prose-scope .govuk-body+h2,.govuk-prose-scope .govuk-body-m+h2,.govuk-prose-scope .govuk-body-s+h2,.govuk-prose-scope .govuk-list+h2,.govuk-prose-scope ol+.govuk-heading-l,.govuk-prose-scope ol+h2,.govuk-prose-scope p+.govuk-heading-l,.govuk-prose-scope p+h2,.govuk-prose-scope ul+.govuk-heading-l,.govuk-prose-scope ul+h2{padding-top:20px}}.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s,.govuk-prose-scope .govuk-body+h3,.govuk-prose-scope .govuk-body+h4,.govuk-prose-scope .govuk-body-m+h3,.govuk-prose-scope .govuk-body-m+h4,.govuk-prose-scope .govuk-body-s+h3,.govuk-prose-scope .govuk-body-s+h4,.govuk-prose-scope .govuk-list+h3,.govuk-prose-scope .govuk-list+h4,.govuk-prose-scope ol+.govuk-heading-m,.govuk-prose-scope ol+.govuk-heading-s,.govuk-prose-scope ol+h3,.govuk-prose-scope ol+h4,.govuk-prose-scope p+.govuk-heading-m,.govuk-prose-scope p+.govuk-heading-s,.govuk-prose-scope p+h3,.govuk-prose-scope p+h4,.govuk-prose-scope ul+.govuk-heading-m,.govuk-prose-scope ul+.govuk-heading-s,.govuk-prose-scope ul+h3,.govuk-prose-scope ul+h4{padding-top:5px}@media (min-width:40.0625em){.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s,.govuk-prose-scope .govuk-body+h3,.govuk-prose-scope .govuk-body+h4,.govuk-prose-scope .govuk-body-m+h3,.govuk-prose-scope .govuk-body-m+h4,.govuk-prose-scope .govuk-body-s+h3,.govuk-prose-scope .govuk-body-s+h4,.govuk-prose-scope .govuk-list+h3,.govuk-prose-scope .govuk-list+h4,.govuk-prose-scope ol+.govuk-heading-m,.govuk-prose-scope ol+.govuk-heading-s,.govuk-prose-scope ol+h3,.govuk-prose-scope ol+h4,.govuk-prose-scope p+.govuk-heading-m,.govuk-prose-scope p+.govuk-heading-s,.govuk-prose-scope p+h3,.govuk-prose-scope p+h4,.govuk-prose-scope ul+.govuk-heading-m,.govuk-prose-scope ul+.govuk-heading-s,.govuk-prose-scope ul+h3,.govuk-prose-scope ul+h4{padding-top:10px}}.govuk-prose-scope b,.govuk-prose-scope strong{font-weight:700}.govuk-prose-scope hr,.govuk-section-break{margin:0;border:0;height:0}.govuk-prose-scope hr,.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width:40.0625em){.govuk-prose-scope hr,.govuk-section-break--xl{margin-top:50px;margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width:40.0625em){.govuk-section-break--l{margin-top:30px;margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width:40.0625em){.govuk-section-break--m{margin-top:20px;margin-bottom:20px}}.govuk-prose-scope hr,.govuk-section-break--visible{border-bottom:1px solid #bfc1c3}.govuk-form-group{margin-bottom:20px}@media (min-width:40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #b10e1e}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-main-wrapper{padding-top:20px;padding-bottom:20px}@media (min-width:40.0625em){.govuk-main-wrapper{padding-top:30px;padding-bottom:30px}}.govuk-main-wrapper--l{padding-top:30px}@media (min-width:40.0625em){.govuk-main-wrapper--l{padding-top:50px}}.govuk-circle{display:inline-block;border-radius:50%;color:#fff;background:#0b0c0c;text-align:center}.govuk-width-container{max-width:960px;margin:0 15px}@media (min-width:40.0625em){.govuk-width-container{margin:0 30px}}@media (min-width:1020px){.govuk-width-container{margin:0 auto}}.govuk-back-link{font-size:14px;line-height:16px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px;border-bottom:1px solid #0b0c0c;text-decoration:none}@media (min-width:40.0625em){.govuk-back-link{font-size:16px;line-height:20px}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2;font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:link:focus{color:#0b0c0c}@media print{.govuk-back-link:link:focus{color:#000}}.govuk-back-link:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 50%,100% 100%,100% 0);clip-path:polygon(0 50%,100% 100%,100% 0);border-width:5px 6px 5px 0;border-right-color:inherit;content:"";position:absolute;left:0;margin:auto}.govuk-back-link:before{top:-1px;bottom:1px}.govuk-breadcrumbs{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-breadcrumbs{font-size:16px;line-height:20px}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2;color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:-1px;bottom:1px;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#6f777b}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link:focus{color:#000}}.govuk-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:19px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin-top:0;margin-bottom:22px;padding:7px 10px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00823b;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-button{font-size:19px;line-height:19px}}@media print{.govuk-button{font-size:14pt;line-height:19px}}.govuk-button:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-button{margin-bottom:32px;width:auto}}.govuk-button:active,.govuk-button:hover,.govuk-button:link,.govuk-button:visited{color:#fff;text-decoration:none}.govuk-button:link:focus{color:#fff}.govuk-button:-moz-focus-inner{padding:0;border:0}.govuk-button:focus,.govuk-button:hover{background-color:#00692f}.govuk-button:active{top:2px;-webkit-box-shadow:none;box-shadow:none}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5;background:#00823b}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00823b;cursor:default}.govuk-button--disabled:focus,.govuk-button[disabled=disabled]:focus,.govuk-button[disabled]:focus{outline:none}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618}.govuk-button--start{font-weight:700;font-size:18px;line-height:1;min-height:auto;padding:8px 40px 8px 15px;background-image:url(/assets/images/icon-pointer.png);background-repeat:no-repeat;background-position:100% 50%}@media (min-width:40.0625em){.govuk-button--start{font-size:24px;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.govuk-button--start{background-image:url(/assets/images/icon-pointer-2x.png);background-size:30px 19px}}.govuk-button,.govuk-button--start{padding-top:9px;padding-bottom:6px}.govuk-error-message{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;display:block;margin-bottom:15px;clear:both;color:#b10e1e}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-message{font-size:19px;line-height:25px}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}.govuk-fieldset__legend{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;max-width:100%;margin-bottom:15px;padding:0;overflow:hidden;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend{font-size:19px;line-height:25px}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15;color:#000}}.govuk-fieldset__legend--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--xl{font-size:48px;line-height:50px}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--l{font-size:36px;line-height:40px}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--m{font-size:24px;line-height:30px}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--s{font-size:19px;line-height:25px}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;margin-bottom:15px;color:#6f777b}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-hint{font-size:19px;line-height:25px}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label{font-size:19px;line-height:25px}}@media print{.govuk-label{font-size:14pt;line-height:1.15;color:#000}}.govuk-label--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--xl{font-size:48px;line-height:50px}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--l{font-size:36px;line-height:40px}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--m{font-size:24px;line-height:30px}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--s{font-size:19px;line-height:25px}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-checkboxes__item{font-size:19px;line-height:25px}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer;margin:0;opacity:0}.govuk-checkboxes__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__input+.govuk-checkboxes__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__input+.govuk-checkboxes__label:after{content:"";position:absolute;top:11px;left:9px;width:18px;height:7px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{-webkit-box-shadow:0 0 0 3px #ffbf47;box-shadow:0 0 0 3px #ffbf47}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}@media (min-width:40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.govuk-checkboxes__conditional[aria-hidden=true]{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-input{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-input{font-size:19px;line-height:25px}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-input::-webkit-inner-spin-button,.govuk-input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border:4px solid #b10e1e}.govuk-input--width-30{max-width:60ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{width:50px;margin-right:20px;margin-bottom:0;float:left;clear:none}.govuk-date-input__label{display:block;padding-bottom:2px}.govuk-date-input__input{margin-bottom:0}.govuk-date-input__item--year{width:70px}.govuk-details{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-details{font-size:19px;line-height:25px}}@media print{.govuk-details{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#005ea5;cursor:pointer}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:hover{color:#2b8cc4}.govuk-details__summary:focus{outline:4px solid #ffbf47;outline-offset:-1px;background:#ffbf47}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:0;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,100% 50%,0 100%);clip-path:polygon(0 0,100% 50%,0 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:12.124px 7px 0;border-top-color:inherit}.govuk-details__text{padding:15px;padding-left:20px;border-left:5px solid #bfc1c3}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text p:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:4px solid #b10e1e}@media print{.govuk-error-summary{color:#000}}@media (min-width:40.0625em){.govuk-error-summary{padding:20px;margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-error-summary{border:5px solid #b10e1e}}.govuk-error-summary__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-summary__title{font-size:24px;line-height:30px}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-summary__body{font-size:19px;line-height:25px}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width:40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700}.govuk-error-summary__list a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-error-summary__list a:active,.govuk-error-summary__list a:focus,.govuk-error-summary__list a:hover,.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#b10e1e;text-decoration:underline}.govuk-error-summary__list a:link:focus{color:#b10e1e}.govuk-file-upload{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-file-upload{font-size:19px;line-height:25px}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15;color:#000}}.govuk-file-upload:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-file-upload--error{border:4px solid #b10e1e}.govuk-footer{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;padding-top:25px;padding-bottom:15px;border-top:1px solid #a1acb2;color:#454a4c;background:#dee0e2}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-footer{font-size:16px;line-height:20px}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-footer{padding-top:40px;padding-bottom:25px}}.govuk-footer__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-footer__link:link,.govuk-footer__link:visited{color:#454a4c}.govuk-footer__link:active,.govuk-footer__link:hover{color:#171819}.govuk-footer__link:focus,.govuk-footer__link:link:focus{color:#0b0c0c}@media print{.govuk-footer__link:link:focus{color:#000}}.govuk-footer__section-break{margin:0;margin-bottom:30px;border:0;border-bottom:1px solid #bfc1c3}@media (min-width:40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:40.0525em){.govuk-footer__meta-item--grow{-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top}@media (max-width:48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0;background-size:125px 102px;text-align:center;text-decoration:none;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:25px;padding-bottom:20px;border-bottom:1px solid #bfc1c3}@media (min-width:40.0625em){.govuk-footer__heading{margin-bottom:40px}}@media (max-width:40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.govuk-footer__section{display:inline-block;margin-right:15px;margin-bottom:30px;margin-left:15px;vertical-align:top;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}@media (max-width:48.0525em){.govuk-footer__section{-ms-flex-preferred-size:200px;flex-basis:200px}}@media (min-width:48.0625em){.govuk-footer__section:first-child{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2}}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}@media (min-width:48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width:40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;border-bottom:10px solid #fff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header{font-size:16px;line-height:20px}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header--full-width{padding:0 15px;border-color:#005ea5}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #005ea5}.govuk-header__logotype{margin-right:5px}.govuk-header__logotype-crown{margin-right:1px;fill:currentColor;vertical-align:middle}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:middle}.govuk-header__product-name{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__product-name{font-size:24px;line-height:30px}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1.15}}.govuk-header__link{text-decoration:none}.govuk-header__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover{text-decoration:underline}.govuk-header__link:focus,.govuk-header__link:link:focus{color:#0b0c0c}@media print{.govuk-header__link:link:focus{color:#000}}.govuk-header__link--homepage{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;font-size:30px;line-height:30px}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{margin-bottom:-1px;border-bottom:1px solid transparent;text-decoration:none}.govuk-header__link--homepage:active,.govuk-header__link--homepage:hover{border-bottom-color:currentColor}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__link--service-name{font-size:24px;line-height:30px}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width:40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width:48.0625em){.govuk-header__logo{display:inline-block;width:33.33%;padding-right:0;vertical-align:top}}@media (min-width:48.0625em){.govuk-header__content{display:inline-block;width:66.66%}}.govuk-header__menu-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__menu-button{font-size:16px;line-height:20px}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{text-decoration:underline}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:8.66px 5px 0;border-top-color:inherit;content:"";margin-left:5px}.govuk-header__menu-button:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0,0 100%,100% 100%);clip-path:polygon(50% 0,0 100%,100% 100%);border-width:0 5px 8.66px;border-bottom-color:inherit}.govuk-header__navigation{margin-bottom:10px;display:block;margin:0;padding:0;list-style:none}@media (min-width:40.0625em){.govuk-header__navigation{margin-bottom:10px}}.js-enabled .govuk-header__menu-button{display:block}@media (min-width:48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation{display:none}@media (min-width:48.0625em){.js-enabled .govuk-header__navigation{display:block}}.js-enabled .govuk-header__navigation--open{display:block}@media (min-width:48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width:48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:16px;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__navigation-item a{font-size:16px;line-height:20px}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item:last-child{margin-right:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-header__logotype-crown,.govuk-header__logotype-crown-fallback-image{position:relative;top:-4px}.govuk-header{padding-top:3px}.govuk-inset-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #bfc1c3}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-inset-text{font-size:19px;line-height:25px}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-inset-text{margin-top:30px;margin-bottom:30px}}.govuk-inset-text :first-child{margin-top:0}.govuk-inset-text :last-child,.govuk-inset-text :only-child{margin-bottom:0}.govuk-panel{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel{font-size:19px;line-height:25px}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width:40.0525em){.govuk-panel{padding:25px}}.govuk-panel--confirmation{color:#fff;background:#28a197}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel__title{font-size:48px;line-height:50px}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__body{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;line-height:25px}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel__body{font-size:36px;line-height:40px}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:1.25;display:inline-block;padding:5px 8px 0;color:#fff;background-color:#005ea5;letter-spacing:1px;text-decoration:none;text-transform:uppercase}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-tag{font-size:16px;line-height:1.25}}@media print{.govuk-tag{font-size:14pt;line-height:1.25}}.govuk-tag--inactive{background-color:#6f777b}.govuk-phase-banner{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;color:#0b0c0c;padding-top:10px;padding-bottom:10px;border-bottom:1px solid #bfc1c3}@media print{.govuk-phase-banner{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-phase-banner{font-size:16px;line-height:20px}}@media print{.govuk-phase-banner{font-size:14pt;line-height:1.2;color:#000}}.govuk-phase-banner__content{display:table;margin:0}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:baseline}.govuk-radios__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-radios__item{font-size:19px;line-height:25px}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer;margin:0;opacity:0}.govuk-radios__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__input+.govuk-radios__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__input+.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__input:focus+.govuk-radios__label:before{-webkit-box-shadow:0 0 0 4px #ffbf47;box-shadow:0 0 0 4px #ffbf47}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width:40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}@media (min-width:40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.govuk-radios__conditional[aria-hidden=true]{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-select{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;padding:5px;border:2px solid #0b0c0c}@media print{.govuk-select{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-select{font-size:19px;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-select:focus::-ms-value,.govuk-select option:active,.govuk-select option:checked{color:#fff;background-color:#005ea5}.govuk-select--error{border:4px solid #b10e1e}.govuk-skip-link{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:16px;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:link:focus{color:#0b0c0c}@media print{.govuk-skip-link:link:focus{color:#000}}@media (min-width:40.0625em){.govuk-skip-link{font-size:16px;line-height:20px}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}.govuk-table{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-table{font-size:19px;line-height:25px}}@media print{.govuk-table{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__cell,.govuk-table__header{padding:.52632em 1.05263em .52632em 0;border-bottom:1px solid #bfc1c3;text-align:left}.govuk-table__cell--numeric{font-family:ntatabularnumbers,nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}.govuk-table__cell--numeric,.govuk-table__header--numeric{text-align:right}.govuk-table__cell:last-child,.govuk-table__header:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-textarea{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%;margin-bottom:20px;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-textarea{font-size:19px;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}.govuk-textarea:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea--error{border:4px solid #b10e1e}.govuk-warning-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;position:relative;margin-bottom:20px;padding:10px 0}@media print{.govuk-warning-text{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-warning-text{font-size:19px;line-height:25px}}@media print{.govuk-warning-text{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0;white-space:nowrap}.govuk-warning-text__icon{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;position:absolute;top:50%;left:0;min-width:38px;min-height:35px;margin-top:-20px;padding-top:3px;font-size:1.6em;line-height:35px}@media print{.govuk-warning-text__icon{font-family:sans-serif}}.govuk-warning-text__text{display:block;margin-left:-15px;padding-left:65px}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{padding:0;border:0}.govuk-visually-hidden,.govuk-visually-hidden-focussable{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.govuk-visually-hidden-focussable:active,.govuk-visually-hidden-focussable:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-\!-display-inline{display:inline!important}.govuk-\!-display-inline-block{display:inline-block!important}.govuk-\!-display-block{display:block!important}.govuk-\!-m-r0{margin:0!important}@media (min-width:40.0625em){.govuk-\!-m-r0{margin:0!important}}.govuk-\!-mt-r0{margin-top:0!important}@media (min-width:40.0625em){.govuk-\!-mt-r0{margin-top:0!important}}.govuk-\!-mr-r0{margin-right:0!important}@media (min-width:40.0625em){.govuk-\!-mr-r0{margin-right:0!important}}.govuk-\!-mb-r0{margin-bottom:0!important}@media (min-width:40.0625em){.govuk-\!-mb-r0{margin-bottom:0!important}}.govuk-\!-ml-r0{margin-left:0!important}@media (min-width:40.0625em){.govuk-\!-ml-r0{margin-left:0!important}}.govuk-\!-m-r1{margin:5px!important}@media (min-width:40.0625em){.govuk-\!-m-r1{margin:5px!important}}.govuk-\!-mt-r1{margin-top:5px!important}@media (min-width:40.0625em){.govuk-\!-mt-r1{margin-top:5px!important}}.govuk-\!-mr-r1{margin-right:5px!important}@media (min-width:40.0625em){.govuk-\!-mr-r1{margin-right:5px!important}}.govuk-\!-mb-r1{margin-bottom:5px!important}@media (min-width:40.0625em){.govuk-\!-mb-r1{margin-bottom:5px!important}}.govuk-\!-ml-r1{margin-left:5px!important}@media (min-width:40.0625em){.govuk-\!-ml-r1{margin-left:5px!important}}.govuk-\!-m-r2{margin:10px!important}@media (min-width:40.0625em){.govuk-\!-m-r2{margin:10px!important}}.govuk-\!-mt-r2{margin-top:10px!important}@media (min-width:40.0625em){.govuk-\!-mt-r2{margin-top:10px!important}}.govuk-\!-mr-r2{margin-right:10px!important}@media (min-width:40.0625em){.govuk-\!-mr-r2{margin-right:10px!important}}.govuk-\!-mb-r2{margin-bottom:10px!important}@media (min-width:40.0625em){.govuk-\!-mb-r2{margin-bottom:10px!important}}.govuk-\!-ml-r2{margin-left:10px!important}@media (min-width:40.0625em){.govuk-\!-ml-r2{margin-left:10px!important}}.govuk-\!-m-r3{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-m-r3{margin:15px!important}}.govuk-\!-mt-r3{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-mt-r3{margin-top:15px!important}}.govuk-\!-mr-r3{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-mr-r3{margin-right:15px!important}}.govuk-\!-mb-r3{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-mb-r3{margin-bottom:15px!important}}.govuk-\!-ml-r3{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-ml-r3{margin-left:15px!important}}.govuk-\!-m-r4{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-m-r4{margin:20px!important}}.govuk-\!-mt-r4{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-mt-r4{margin-top:20px!important}}.govuk-\!-mr-r4{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-mr-r4{margin-right:20px!important}}.govuk-\!-mb-r4{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-mb-r4{margin-bottom:20px!important}}.govuk-\!-ml-r4{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-ml-r4{margin-left:20px!important}}.govuk-\!-m-r5{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-m-r5{margin:25px!important}}.govuk-\!-mt-r5{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-mt-r5{margin-top:25px!important}}.govuk-\!-mr-r5{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-mr-r5{margin-right:25px!important}}.govuk-\!-mb-r5{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-mb-r5{margin-bottom:25px!important}}.govuk-\!-ml-r5{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-ml-r5{margin-left:25px!important}}.govuk-\!-m-r6{margin:20px!important}@media (min-width:40.0625em){.govuk-\!-m-r6{margin:30px!important}}.govuk-\!-mt-r6{margin-top:20px!important}@media (min-width:40.0625em){.govuk-\!-mt-r6{margin-top:30px!important}}.govuk-\!-mr-r6{margin-right:20px!important}@media (min-width:40.0625em){.govuk-\!-mr-r6{margin-right:30px!important}}.govuk-\!-mb-r6{margin-bottom:20px!important}@media (min-width:40.0625em){.govuk-\!-mb-r6{margin-bottom:30px!important}}.govuk-\!-ml-r6{margin-left:20px!important}@media (min-width:40.0625em){.govuk-\!-ml-r6{margin-left:30px!important}}.govuk-\!-m-r7{margin:25px!important}@media (min-width:40.0625em){.govuk-\!-m-r7{margin:40px!important}}.govuk-\!-mt-r7{margin-top:25px!important}@media (min-width:40.0625em){.govuk-\!-mt-r7{margin-top:40px!important}}.govuk-\!-mr-r7{margin-right:25px!important}@media (min-width:40.0625em){.govuk-\!-mr-r7{margin-right:40px!important}}.govuk-\!-mb-r7{margin-bottom:25px!important}@media (min-width:40.0625em){.govuk-\!-mb-r7{margin-bottom:40px!important}}.govuk-\!-ml-r7{margin-left:25px!important}@media (min-width:40.0625em){.govuk-\!-ml-r7{margin-left:40px!important}}.govuk-\!-m-r8{margin:30px!important}@media (min-width:40.0625em){.govuk-\!-m-r8{margin:50px!important}}.govuk-\!-mt-r8{margin-top:30px!important}@media (min-width:40.0625em){.govuk-\!-mt-r8{margin-top:50px!important}}.govuk-\!-mr-r8{margin-right:30px!important}@media (min-width:40.0625em){.govuk-\!-mr-r8{margin-right:50px!important}}.govuk-\!-mb-r8{margin-bottom:30px!important}@media (min-width:40.0625em){.govuk-\!-mb-r8{margin-bottom:50px!important}}.govuk-\!-ml-r8{margin-left:30px!important}@media (min-width:40.0625em){.govuk-\!-ml-r8{margin-left:50px!important}}.govuk-\!-m-r9{margin:40px!important}@media (min-width:40.0625em){.govuk-\!-m-r9{margin:60px!important}}.govuk-\!-mt-r9{margin-top:40px!important}@media (min-width:40.0625em){.govuk-\!-mt-r9{margin-top:60px!important}}.govuk-\!-mr-r9{margin-right:40px!important}@media (min-width:40.0625em){.govuk-\!-mr-r9{margin-right:60px!important}}.govuk-\!-mb-r9{margin-bottom:40px!important}@media (min-width:40.0625em){.govuk-\!-mb-r9{margin-bottom:60px!important}}.govuk-\!-ml-r9{margin-left:40px!important}@media (min-width:40.0625em){.govuk-\!-ml-r9{margin-left:60px!important}}.govuk-\!-p-r0{padding:0!important}@media (min-width:40.0625em){.govuk-\!-p-r0{padding:0!important}}.govuk-\!-pt-r0{padding-top:0!important}@media (min-width:40.0625em){.govuk-\!-pt-r0{padding-top:0!important}}.govuk-\!-pr-r0{padding-right:0!important}@media (min-width:40.0625em){.govuk-\!-pr-r0{padding-right:0!important}}.govuk-\!-pb-r0{padding-bottom:0!important}@media (min-width:40.0625em){.govuk-\!-pb-r0{padding-bottom:0!important}}.govuk-\!-pl-r0{padding-left:0!important}@media (min-width:40.0625em){.govuk-\!-pl-r0{padding-left:0!important}}.govuk-\!-p-r1{padding:5px!important}@media (min-width:40.0625em){.govuk-\!-p-r1{padding:5px!important}}.govuk-\!-pt-r1{padding-top:5px!important}@media (min-width:40.0625em){.govuk-\!-pt-r1{padding-top:5px!important}}.govuk-\!-pr-r1{padding-right:5px!important}@media (min-width:40.0625em){.govuk-\!-pr-r1{padding-right:5px!important}}.govuk-\!-pb-r1{padding-bottom:5px!important}@media (min-width:40.0625em){.govuk-\!-pb-r1{padding-bottom:5px!important}}.govuk-\!-pl-r1{padding-left:5px!important}@media (min-width:40.0625em){.govuk-\!-pl-r1{padding-left:5px!important}}.govuk-\!-p-r2{padding:10px!important}@media (min-width:40.0625em){.govuk-\!-p-r2{padding:10px!important}}.govuk-\!-pt-r2{padding-top:10px!important}@media (min-width:40.0625em){.govuk-\!-pt-r2{padding-top:10px!important}}.govuk-\!-pr-r2{padding-right:10px!important}@media (min-width:40.0625em){.govuk-\!-pr-r2{padding-right:10px!important}}.govuk-\!-pb-r2{padding-bottom:10px!important}@media (min-width:40.0625em){.govuk-\!-pb-r2{padding-bottom:10px!important}}.govuk-\!-pl-r2{padding-left:10px!important}@media (min-width:40.0625em){.govuk-\!-pl-r2{padding-left:10px!important}}.govuk-\!-p-r3{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-p-r3{padding:15px!important}}.govuk-\!-pt-r3{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-pt-r3{padding-top:15px!important}}.govuk-\!-pr-r3{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-pr-r3{padding-right:15px!important}}.govuk-\!-pb-r3{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-pb-r3{padding-bottom:15px!important}}.govuk-\!-pl-r3{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-pl-r3{padding-left:15px!important}}.govuk-\!-p-r4{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-p-r4{padding:20px!important}}.govuk-\!-pt-r4{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-pt-r4{padding-top:20px!important}}.govuk-\!-pr-r4{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-pr-r4{padding-right:20px!important}}.govuk-\!-pb-r4{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-pb-r4{padding-bottom:20px!important}}.govuk-\!-pl-r4{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-pl-r4{padding-left:20px!important}}.govuk-\!-p-r5{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-p-r5{padding:25px!important}}.govuk-\!-pt-r5{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-pt-r5{padding-top:25px!important}}.govuk-\!-pr-r5{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-pr-r5{padding-right:25px!important}}.govuk-\!-pb-r5{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-pb-r5{padding-bottom:25px!important}}.govuk-\!-pl-r5{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-pl-r5{padding-left:25px!important}}.govuk-\!-p-r6{padding:20px!important}@media (min-width:40.0625em){.govuk-\!-p-r6{padding:30px!important}}.govuk-\!-pt-r6{padding-top:20px!important}@media (min-width:40.0625em){.govuk-\!-pt-r6{padding-top:30px!important}}.govuk-\!-pr-r6{padding-right:20px!important}@media (min-width:40.0625em){.govuk-\!-pr-r6{padding-right:30px!important}}.govuk-\!-pb-r6{padding-bottom:20px!important}@media (min-width:40.0625em){.govuk-\!-pb-r6{padding-bottom:30px!important}}.govuk-\!-pl-r6{padding-left:20px!important}@media (min-width:40.0625em){.govuk-\!-pl-r6{padding-left:30px!important}}.govuk-\!-p-r7{padding:25px!important}@media (min-width:40.0625em){.govuk-\!-p-r7{padding:40px!important}}.govuk-\!-pt-r7{padding-top:25px!important}@media (min-width:40.0625em){.govuk-\!-pt-r7{padding-top:40px!important}}.govuk-\!-pr-r7{padding-right:25px!important}@media (min-width:40.0625em){.govuk-\!-pr-r7{padding-right:40px!important}}.govuk-\!-pb-r7{padding-bottom:25px!important}@media (min-width:40.0625em){.govuk-\!-pb-r7{padding-bottom:40px!important}}.govuk-\!-pl-r7{padding-left:25px!important}@media (min-width:40.0625em){.govuk-\!-pl-r7{padding-left:40px!important}}.govuk-\!-p-r8{padding:30px!important}@media (min-width:40.0625em){.govuk-\!-p-r8{padding:50px!important}}.govuk-\!-pt-r8{padding-top:30px!important}@media (min-width:40.0625em){.govuk-\!-pt-r8{padding-top:50px!important}}.govuk-\!-pr-r8{padding-right:30px!important}@media (min-width:40.0625em){.govuk-\!-pr-r8{padding-right:50px!important}}.govuk-\!-pb-r8{padding-bottom:30px!important}@media (min-width:40.0625em){.govuk-\!-pb-r8{padding-bottom:50px!important}}.govuk-\!-pl-r8{padding-left:30px!important}@media (min-width:40.0625em){.govuk-\!-pl-r8{padding-left:50px!important}}.govuk-\!-p-r9{padding:40px!important}@media (min-width:40.0625em){.govuk-\!-p-r9{padding:60px!important}}.govuk-\!-pt-r9{padding-top:40px!important}@media (min-width:40.0625em){.govuk-\!-pt-r9{padding-top:60px!important}}.govuk-\!-pr-r9{padding-right:40px!important}@media (min-width:40.0625em){.govuk-\!-pr-r9{padding-right:60px!important}}.govuk-\!-pb-r9{padding-bottom:40px!important}@media (min-width:40.0625em){.govuk-\!-pb-r9{padding-bottom:60px!important}}.govuk-\!-pl-r9{padding-left:40px!important}@media (min-width:40.0625em){.govuk-\!-pl-r9{padding-left:60px!important}}.govuk-\!-f-80{font-size:53px!important;line-height:55px!important}@media (min-width:40.0625em){.govuk-\!-f-80{font-size:80px!important;line-height:80px!important}}@media print{.govuk-\!-f-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\!-f-48{font-size:32px!important;line-height:35px!important}@media (min-width:40.0625em){.govuk-\!-f-48{font-size:48px!important;line-height:50px!important}}@media print{.govuk-\!-f-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\!-f-36{font-size:24px!important;line-height:25px!important}@media (min-width:40.0625em){.govuk-\!-f-36{font-size:36px!important;line-height:40px!important}}@media print{.govuk-\!-f-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\!-f-27{font-size:18px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-f-27{font-size:27px!important;line-height:30px!important}}@media print{.govuk-\!-f-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\!-f-24{font-size:18px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-f-24{font-size:24px!important;line-height:30px!important}}@media print{.govuk-\!-f-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\!-f-19{font-size:16px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-f-19{font-size:19px!important;line-height:25px!important}}@media print{.govuk-\!-f-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\!-f-16{font-size:14px!important;line-height:16px!important}@media (min-width:40.0625em){.govuk-\!-f-16{font-size:16px!important;line-height:20px!important}}@media print{.govuk-\!-f-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\!-f-14{font-size:12px!important;line-height:15px!important}@media (min-width:40.0625em){.govuk-\!-f-14{font-size:14px!important;line-height:20px!important}}@media print{.govuk-\!-f-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\!-w-regular{font-weight:400!important}.govuk-\!-w-bold{font-weight:700!important}.govuk-\!-width-three-quarters{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-three-quarters{width:75%!important}}.govuk-\!-width-two-thirds{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-two-thirds{width:66.66%!important}}.govuk-\!-width-one-half{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-half{width:50%!important}}.govuk-\!-width-one-third{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-third{width:33.33%!important}}.govuk-\!-width-one-quarter{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-quarter{width:25%!important}} \ No newline at end of file diff --git a/dist/govuk-frontend-0.0.31-alpha.min.js b/dist/govuk-frontend-0.0.31-alpha.min.js deleted file mode 100644 index a6132ddb61..0000000000 --- a/dist/govuk-frontend-0.0.31-alpha.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define("all",["exports"],e):e(t.all={})}(this,function(t){"use strict";function e(t,e,n){t.addEventListener?t.addEventListener(e,function(t){n(t,t.target)},!1):t.attachEvent&&t.attachEvent("on"+e,function(t){n(t,t.srcElement)})}function n(t){return"number"==typeof t.which?t.which:t.keyCode}function o(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function i(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(var n=0;n0?t.className=t.className.replace(" "+e,""):t.className+=" "+e},s.prototype.handleClick=function(t){var e=this.$module,n=t.target||t.srcElement,o=e.querySelector("#"+n.getAttribute("aria-controls"));n&&o&&(this.toggleClass(o,"govuk-header__navigation--open"),this.toggleClass(n,"govuk-header__menu-button--open"),n.setAttribute("aria-expanded","true"!==n.getAttribute("aria-expanded")),o.setAttribute("aria-hidden","false"===o.getAttribute("aria-hidden")))},d.prototype.init=function(){var t=this.$module;i(this.$inputs,function(e){var n=e.getAttribute("data-aria-controls");n&&t.querySelector("#"+n)&&(e.setAttribute("aria-controls",n),e.removeAttribute("data-aria-controls"),this.setAttributes(e))}.bind(this)),t.addEventListener("click",this.handleClick.bind(this))},d.prototype.setAttributes=function(t){var e=t.checked;t.setAttribute("aria-expanded",e),document.querySelector("#"+t.getAttribute("aria-controls")).setAttribute("aria-hidden",!e)},d.prototype.handleClick=function(t){i(this.$inputs,function(t){var e="radio"===t.getAttribute("type"),n=t.getAttribute("aria-controls");e&&n&&this.setAttributes(t)}.bind(this))},p(),t.initAll=p}); diff --git a/dist/govuk-frontend-0.0.32-alpha.min.css b/dist/govuk-frontend-0.0.32-alpha.min.css new file mode 100644 index 0000000000..da9c3960be --- /dev/null +++ b/dist/govuk-frontend-0.0.32-alpha.min.css @@ -0,0 +1,3 @@ +.govuk-link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} + +/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:nta;src:url(/assets/fonts/light-2c037cf7e1-v1.eot);src:url(/assets/fonts/light-2c037cf7e1-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-f38ad40456-v1.woff2) format("woff2"),url(/assets/fonts/light-458f8ea81c-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:nta;src:url(/assets/fonts/bold-fb2676462a-v1.eot);src:url(/assets/fonts/bold-fb2676462a-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-a2452cb66f-v1.woff2) format("woff2"),url(/assets/fonts/bold-f38c792ac2-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot);src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-tabular-851b10ccdd-v1.woff2) format("woff2"),url(/assets/fonts/light-tabular-62cc6f0a28-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot);src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-tabular-b89238d840-v1.woff2) format("woff2"),url(/assets/fonts/bold-tabular-784c21afb8-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@media print{.govuk-link{font-family:sans-serif}}.govuk-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-link:link{color:#005ea5}.govuk-link:visited{color:#4c2c92}.govuk-link:active,.govuk-link:hover{color:#2b8cc4}@media print{.govuk-link[href^="/"]:after,.govuk-link[href^="http://"]:after,.govuk-link[href^="https://"]:after{content:" (" attr(href) ")";font-size:90%;word-wrap:break-word}}.govuk-link--muted:active,.govuk-link--muted:hover,.govuk-link--muted:link,.govuk-link--muted:visited{color:#6f777b}.govuk-link--muted:focus,.govuk-link--muted:link:focus{color:#0b0c0c}@media print{.govuk-link--muted:link:focus{color:#000}}.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}@media print{.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#000}}.govuk-link--text-colour:link:focus{color:#0b0c0c}@media print{.govuk-link--text-colour:link:focus{color:#000}}.govuk-link--no-visited-state:visited{color:#005ea5}.govuk-list{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}@media print{.govuk-list{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-list{font-size:19px;line-height:25px}}@media print{.govuk-list{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-list{margin-bottom:20px}}.govuk-list .govuk-list{margin-top:10px}@media (min-width:40.0625em){.govuk-list>li{margin-bottom:5px}}.govuk-list a:link{color:#005ea5}.govuk-list a:visited{color:#4c2c92}.govuk-list a:active,.govuk-list a:hover{color:#2b8cc4}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-template{background-color:#dee0e2}.govuk-template__body{margin:0;background-color:#fff}.govuk-heading-xl{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;display:block;margin-top:0;margin-bottom:30px}@media print{.govuk-heading-xl{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-xl{font-size:48px;line-height:50px}}@media print{.govuk-heading-xl{font-size:32pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-xl{margin-bottom:50px}}.govuk-heading-l{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px;display:block;margin-top:0;margin-bottom:20px}@media print{.govuk-heading-l{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-l{font-size:36px;line-height:40px}}@media print{.govuk-heading-l{font-size:24pt;line-height:1.05}}@media (min-width:40.0625em){.govuk-heading-l{margin-bottom:30px}}.govuk-heading-m{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-m{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-m{font-size:24px;line-height:30px}}@media print{.govuk-heading-m{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-m{margin-bottom:20px}}.govuk-heading-s{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;display:block;margin-top:0;margin-bottom:15px}@media print{.govuk-heading-s{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-heading-s{font-size:19px;line-height:25px}}@media print{.govuk-heading-s{font-size:14pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-heading-s{margin-bottom:20px}}.govuk-caption-xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;display:block;margin-bottom:5px;color:#6f777b}@media print{.govuk-caption-xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-xl{font-size:27px;line-height:30px}}@media print{.govuk-caption-xl{font-size:18pt;line-height:1.15}}.govuk-caption-l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;display:block;margin-bottom:5px;color:#6f777b}@media print{.govuk-caption-l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-l{font-size:24px;line-height:30px}}@media print{.govuk-caption-l{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-caption-l{margin-bottom:0}}.govuk-caption-m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;color:#6f777b}@media print{.govuk-caption-m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-caption-m{font-size:19px;line-height:25px}}@media print{.govuk-caption-m{font-size:14pt;line-height:1.15}}.govuk-body-l,.govuk-body-lead{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;margin-top:0;margin-bottom:20px}@media print{.govuk-body-l,.govuk-body-lead{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-l,.govuk-body-lead{font-size:24px;line-height:30px}}@media print{.govuk-body-l,.govuk-body-lead{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-body-l,.govuk-body-lead{margin-bottom:30px}}.govuk-body,.govuk-body-m{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;margin-top:0;margin-bottom:15px}@media print{.govuk-body,.govuk-body-m{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body,.govuk-body-m{font-size:19px;line-height:25px}}@media print{.govuk-body,.govuk-body-m{font-size:14pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-body,.govuk-body-m{margin-bottom:20px}}.govuk-body-s{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;margin-top:0;margin-bottom:15px}@media print{.govuk-body-s{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-s{font-size:16px;line-height:20px}}@media print{.govuk-body-s{font-size:14pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-body-s{margin-bottom:20px}}.govuk-body-xs{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:12px;line-height:15px;margin-top:0;margin-bottom:15px}@media print{.govuk-body-xs{color:#000;font-family:sans-serif}}@media (min-width:40.0625em){.govuk-body-xs{font-size:14px;line-height:20px}}@media print{.govuk-body-xs{font-size:12pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-body-xs{margin-bottom:20px}}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px}@media (min-width:40.0625em){.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:10px}}.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px}@media (min-width:40.0625em){.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:20px}}.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s{padding-top:5px}@media (min-width:40.0625em){.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s{padding-top:10px}}.govuk-section-break{margin:0;border:0;height:0}.govuk-section-break--xl{margin-top:30px;margin-bottom:30px}@media (min-width:40.0625em){.govuk-section-break--xl{margin-top:50px;margin-bottom:50px}}.govuk-section-break--l{margin-top:20px;margin-bottom:20px}@media (min-width:40.0625em){.govuk-section-break--l{margin-top:30px;margin-bottom:30px}}.govuk-section-break--m{margin-top:15px;margin-bottom:15px}@media (min-width:40.0625em){.govuk-section-break--m{margin-top:20px;margin-bottom:20px}}.govuk-section-break--visible{border-bottom:1px solid #bfc1c3}.govuk-form-group{margin-bottom:20px}@media (min-width:40.0625em){.govuk-form-group{margin-bottom:30px}}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #b10e1e}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-quarter{width:25%;float:left}}.govuk-grid-column-one-third{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-third{width:33.3333%;float:left}}.govuk-grid-column-one-half{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-one-half{width:50%;float:left}}.govuk-grid-column-two-thirds{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-two-thirds{width:66.6666%;float:left}}.govuk-grid-column-three-quarters{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-three-quarters{width:75%;float:left}}.govuk-grid-column-full{-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;padding:0 15px}@media (min-width:40.0625em){.govuk-grid-column-full{width:100%;float:left}}.govuk-main-wrapper{padding-top:20px;padding-bottom:20px}@media (min-width:40.0625em){.govuk-main-wrapper{padding-top:30px;padding-bottom:30px}}.govuk-main-wrapper--l{padding-top:30px}@media (min-width:40.0625em){.govuk-main-wrapper--l{padding-top:50px}}.govuk-width-container{max-width:960px;margin:0 15px}@media (min-width:40.0625em){.govuk-width-container{margin:0 30px}}@media (min-width:1020px){.govuk-width-container{margin:0 auto}}.govuk-back-link{font-size:14px;line-height:16px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px;border-bottom:1px solid #0b0c0c;text-decoration:none}@media (min-width:40.0625em){.govuk-back-link{font-size:16px;line-height:20px}}@media print{.govuk-back-link{font-size:14pt;line-height:1.2;font-family:sans-serif}}.govuk-back-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:visited{color:#0b0c0c}@media print{.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:visited{color:#000}}.govuk-back-link:link:focus{color:#0b0c0c}@media print{.govuk-back-link:link:focus{color:#000}}.govuk-back-link:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 50%,100% 100%,100% 0);clip-path:polygon(0 50%,100% 100%,100% 0);border-width:5px 6px 5px 0;border-right-color:inherit;content:"";position:absolute;left:0;margin:auto}.govuk-back-link:before{top:-1px;bottom:1px}.govuk-breadcrumbs{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;color:#0b0c0c;margin-top:15px;margin-bottom:10px}@media print{.govuk-breadcrumbs{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-breadcrumbs{font-size:16px;line-height:20px}}@media print{.govuk-breadcrumbs{font-size:14pt;line-height:1.2;color:#000}}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:-1px;bottom:1px;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#6f777b}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media print{.govuk-breadcrumbs__link{font-family:sans-serif}}.govuk-breadcrumbs__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:visited{color:#000}}.govuk-breadcrumbs__link:link:focus{color:#0b0c0c}@media print{.govuk-breadcrumbs__link:link:focus{color:#000}}.govuk-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:19px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin-top:0;margin-bottom:22px;padding:7px 10px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00823b;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none}@media print{.govuk-button{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-button{font-size:19px;line-height:19px}}@media print{.govuk-button{font-size:14pt;line-height:19px}}.govuk-button:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-button{margin-bottom:32px;width:auto}}.govuk-button:active,.govuk-button:hover,.govuk-button:link,.govuk-button:visited{color:#fff;text-decoration:none}.govuk-button:link:focus{color:#fff}.govuk-button:-moz-focus-inner{padding:0;border:0}.govuk-button:focus,.govuk-button:hover{background-color:#00692f}.govuk-button:active{top:2px;-webkit-box-shadow:none;box-shadow:none}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{opacity:.5;background:#00823b}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00823b;cursor:default}.govuk-button--disabled:focus,.govuk-button[disabled=disabled]:focus,.govuk-button[disabled]:focus{outline:none}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618}.govuk-button--start{font-weight:700;font-size:18px;line-height:1;min-height:auto;padding:8px 40px 8px 15px;background-image:url(/assets/images/icon-pointer.png);background-repeat:no-repeat;background-position:100% 50%}@media (min-width:40.0625em){.govuk-button--start{font-size:24px;line-height:1}}@media print{.govuk-button--start{font-size:18pt;line-height:1}}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.govuk-button--start{background-image:url(/assets/images/icon-pointer-2x.png);background-size:30px 19px}}.govuk-button,.govuk-button--start{padding-top:9px;padding-bottom:6px}.govuk-error-message{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;display:block;margin-bottom:15px;clear:both;color:#b10e1e}@media print{.govuk-error-message{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-message{font-size:19px;line-height:25px}}@media print{.govuk-error-message{font-size:14pt;line-height:1.15}}.govuk-fieldset{margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}.govuk-fieldset__legend{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;max-width:100%;margin-bottom:15px;padding:0;overflow:hidden;white-space:normal}@media print{.govuk-fieldset__legend{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend{font-size:19px;line-height:25px}}@media print{.govuk-fieldset__legend{font-size:14pt;line-height:1.15;color:#000}}.govuk-fieldset__legend--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px}@media print{.govuk-fieldset__legend--xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--xl{font-size:48px;line-height:50px}}@media print{.govuk-fieldset__legend--xl{font-size:32pt;line-height:1.15}}.govuk-fieldset__legend--l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px}@media print{.govuk-fieldset__legend--l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--l{font-size:36px;line-height:40px}}@media print{.govuk-fieldset__legend--l{font-size:24pt;line-height:1.05}}.govuk-fieldset__legend--m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px}@media print{.govuk-fieldset__legend--m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--m{font-size:24px;line-height:30px}}@media print{.govuk-fieldset__legend--m{font-size:18pt;line-height:1.15}}.govuk-fieldset__legend--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px}@media print{.govuk-fieldset__legend--s{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-fieldset__legend--s{font-size:19px;line-height:25px}}@media print{.govuk-fieldset__legend--s{font-size:14pt;line-height:1.15}}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;margin-bottom:15px;color:#6f777b}@media print{.govuk-hint{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-hint{font-size:19px;line-height:25px}}@media print{.govuk-hint{font-size:14pt;line-height:1.15}}.govuk-label{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;display:block;margin-bottom:5px}@media print{.govuk-label{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label{font-size:19px;line-height:25px}}@media print{.govuk-label{font-size:14pt;line-height:1.15;color:#000}}.govuk-label--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;margin-bottom:15px}@media print{.govuk-label--xl{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--xl{font-size:48px;line-height:50px}}@media print{.govuk-label--xl{font-size:32pt;line-height:1.15}}.govuk-label--l{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:24px;line-height:25px;margin-bottom:15px}@media print{.govuk-label--l{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--l{font-size:36px;line-height:40px}}@media print{.govuk-label--l{font-size:24pt;line-height:1.05}}.govuk-label--m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;margin-bottom:10px}@media print{.govuk-label--m{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--m{font-size:24px;line-height:30px}}@media print{.govuk-label--m{font-size:18pt;line-height:1.15}}.govuk-label--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px}@media print{.govuk-label--s{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-label--s{font-size:19px;line-height:25px}}@media print{.govuk-label--s{font-size:14pt;line-height:1.15}}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}@media print{.govuk-checkboxes__item{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-checkboxes__item{font-size:19px;line-height:25px}}@media print{.govuk-checkboxes__item{font-size:14pt;line-height:1.15}}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer;margin:0;opacity:0}.govuk-checkboxes__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__input+.govuk-checkboxes__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__input+.govuk-checkboxes__label:after{content:"";position:absolute;top:11px;left:9px;width:18px;height:7px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;opacity:0;background:transparent}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{-webkit-box-shadow:0 0 0 3px #ffbf47;box-shadow:0 0 0 3px #ffbf47}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{opacity:1}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{opacity:.5}.govuk-checkboxes__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}@media (min-width:40.0625em){.govuk-checkboxes__conditional{margin-bottom:20px}}.govuk-checkboxes__conditional[aria-hidden=true]{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-input{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media print{.govuk-input{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-input{font-size:19px;line-height:25px}}@media print{.govuk-input{font-size:14pt;line-height:1.15}}.govuk-input:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-input::-webkit-inner-spin-button,.govuk-input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border:4px solid #b10e1e}.govuk-input--width-30{max-width:60ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{width:50px;margin-right:20px;margin-bottom:0;float:left;clear:none}.govuk-date-input__label{display:block;padding-bottom:2px}.govuk-date-input__input{margin-bottom:0}.govuk-date-input__item--year{width:70px}.govuk-details{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;margin-bottom:20px;display:block}@media print{.govuk-details{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-details{font-size:19px;line-height:25px}}@media print{.govuk-details{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-details{margin-bottom:30px}}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#005ea5;cursor:pointer}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:hover{color:#2b8cc4}.govuk-details__summary:focus{outline:4px solid #ffbf47;outline-offset:-1px;background:#ffbf47}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:0;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,100% 50%,0 100%);clip-path:polygon(0 0,100% 50%,0 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:12.124px 7px 0;border-top-color:inherit}.govuk-details__text{padding:15px;padding-left:20px;border-left:5px solid #bfc1c3}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text p:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;margin-bottom:30px;border:4px solid #b10e1e}@media print{.govuk-error-summary{color:#000}}@media (min-width:40.0625em){.govuk-error-summary{padding:20px;margin-bottom:50px}}.govuk-error-summary:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-error-summary{border:5px solid #b10e1e}}.govuk-error-summary__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;margin-top:0;margin-bottom:15px}@media print{.govuk-error-summary__title{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-summary__title{font-size:24px;line-height:30px}}@media print{.govuk-error-summary__title{font-size:18pt;line-height:1.15}}@media (min-width:40.0625em){.govuk-error-summary__title{margin-bottom:20px}}.govuk-error-summary__body{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px}@media print{.govuk-error-summary__body{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-error-summary__body{font-size:19px;line-height:25px}}@media print{.govuk-error-summary__body{font-size:14pt;line-height:1.15}}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px}@media (min-width:40.0625em){.govuk-error-summary__body p{margin-bottom:20px}}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700}.govuk-error-summary__list a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-error-summary__list a:active,.govuk-error-summary__list a:focus,.govuk-error-summary__list a:hover,.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#b10e1e;text-decoration:underline}.govuk-error-summary__list a:link:focus{color:#b10e1e}.govuk-file-upload{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c}@media print{.govuk-file-upload{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-file-upload{font-size:19px;line-height:25px}}@media print{.govuk-file-upload{font-size:14pt;line-height:1.15;color:#000}}.govuk-file-upload:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-file-upload--error{border:4px solid #b10e1e}.govuk-footer{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;padding-top:25px;padding-bottom:15px;border-top:1px solid #a1acb2;color:#454a4c;background:#dee0e2}@media print{.govuk-footer{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-footer{font-size:16px;line-height:20px}}@media print{.govuk-footer{font-size:14pt;line-height:1.2}}@media (min-width:40.0625em){.govuk-footer{padding-top:40px;padding-bottom:25px}}.govuk-footer__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-footer__link:link,.govuk-footer__link:visited{color:#454a4c}.govuk-footer__link:active,.govuk-footer__link:hover{color:#171819}.govuk-footer__link:focus,.govuk-footer__link:link:focus{color:#0b0c0c}@media print{.govuk-footer__link:link:focus{color:#000}}.govuk-footer__section-break{margin:0;margin-bottom:30px;border:0;border-bottom:1px solid #bfc1c3}@media (min-width:40.0625em){.govuk-footer__section-break{margin-bottom:50px}}.govuk-footer__meta{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-ms-flex:1;flex:1}@media (max-width:40.0525em){.govuk-footer__meta-item--grow{-ms-flex-preferred-size:320px;flex-basis:320px}}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top}@media (max-width:48.0525em){.govuk-footer__licence-logo{margin-bottom:15px}}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0;background-size:125px 102px;text-align:center;text-decoration:none;white-space:nowrap}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:2dppx),only screen and (min-resolution:192dpi){.govuk-footer__copyright-logo{background-image:url(/assets/images/govuk-crest-2x.png)}}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:25px;padding-bottom:20px;border-bottom:1px solid #bfc1c3}@media (min-width:40.0625em){.govuk-footer__heading{margin-bottom:40px}}@media (max-width:40.0525em){.govuk-footer__heading{padding-bottom:10px}}.govuk-footer__navigation{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.govuk-footer__section{display:inline-block;margin-right:15px;margin-bottom:30px;margin-left:15px;vertical-align:top;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}@media (max-width:48.0525em){.govuk-footer__section{-ms-flex-preferred-size:200px;flex-basis:200px}}@media (min-width:48.0625em){.govuk-footer__section:first-child{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2}}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}@media (min-width:48.0625em){.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}}.govuk-footer__list-item{margin-bottom:15px}@media (min-width:40.0625em){.govuk-footer__list-item{margin-bottom:20px}}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;border-bottom:10px solid #fff;color:#fff;background:#0b0c0c}@media print{.govuk-header{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header{font-size:16px;line-height:20px}}@media print{.govuk-header{font-size:14pt;line-height:1.2}}.govuk-header--full-width{padding:0 15px;border-color:#005ea5}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #005ea5}.govuk-header__logotype{margin-right:5px}.govuk-header__logotype-crown{margin-right:1px;fill:currentColor;vertical-align:middle}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:middle}.govuk-header__product-name{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px}@media print{.govuk-header__product-name{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__product-name{font-size:24px;line-height:30px}}@media print{.govuk-header__product-name{font-size:18pt;line-height:1.15}}.govuk-header__link{text-decoration:none}.govuk-header__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover{text-decoration:underline}.govuk-header__link:focus,.govuk-header__link:link:focus{color:#0b0c0c}@media print{.govuk-header__link:link:focus{color:#000}}.govuk-header__link--homepage{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;font-size:30px;line-height:30px}@media print{.govuk-header__link--homepage{font-family:sans-serif}}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{margin-bottom:-1px;border-bottom:1px solid transparent;text-decoration:none}.govuk-header__link--homepage:active,.govuk-header__link--homepage:hover{border-bottom-color:currentColor}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px}@media print{.govuk-header__link--service-name{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__link--service-name{font-size:24px;line-height:30px}}@media print{.govuk-header__link--service-name{font-size:18pt;line-height:1.15}}.govuk-header__logo{margin-bottom:10px;padding-right:50px}@media (min-width:40.0625em){.govuk-header__logo{margin-bottom:10px}}@media (min-width:48.0625em){.govuk-header__logo{display:inline-block;width:33.33%;padding-right:0;vertical-align:top}}@media (min-width:48.0625em){.govuk-header__content{display:inline-block;width:66.66%}}.govuk-header__menu-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none}@media print{.govuk-header__menu-button{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__menu-button{font-size:16px;line-height:20px}}@media print{.govuk-header__menu-button{font-size:14pt;line-height:1.2}}.govuk-header__menu-button:hover{text-decoration:underline}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:8.66px 5px 0;border-top-color:inherit;content:"";margin-left:5px}.govuk-header__menu-button:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-header__menu-button{top:15px}}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0,0 100%,100% 100%);clip-path:polygon(50% 0,0 100%,100% 100%);border-width:0 5px 8.66px;border-bottom-color:inherit}.govuk-header__navigation{margin-bottom:10px;display:block;margin:0;padding:0;list-style:none}@media (min-width:40.0625em){.govuk-header__navigation{margin-bottom:10px}}.js-enabled .govuk-header__menu-button{display:block}@media (min-width:48.0625em){.js-enabled .govuk-header__menu-button{display:none}}.js-enabled .govuk-header__navigation{display:none}@media (min-width:48.0625em){.js-enabled .govuk-header__navigation{display:block}}.js-enabled .govuk-header__navigation--open{display:block}@media (min-width:48.0625em){.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133}@media (min-width:48.0625em){.govuk-header__navigation-item{display:inline-block;margin-right:15px;padding:5px 0;border:0}}.govuk-header__navigation-item a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:16px;white-space:nowrap}@media print{.govuk-header__navigation-item a{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-header__navigation-item a{font-size:16px;line-height:20px}}@media print{.govuk-header__navigation-item a{font-size:14pt;line-height:1.2}}.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item:last-child{margin-right:0}@media print{.govuk-header{border-bottom-width:0;color:#0b0c0c;background:transparent}.govuk-header__logotype-crown-fallback-image{display:none}.govuk-header__link:link,.govuk-header__link:visited{color:#0b0c0c}.govuk-header__link:after{display:none}}.govuk-header__logotype-crown,.govuk-header__logotype-crown-fallback-image{position:relative;top:-4px}.govuk-header{padding-top:3px}.govuk-inset-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;padding:15px;margin-top:20px;margin-bottom:20px;clear:both;border-left:10px solid #bfc1c3}@media print{.govuk-inset-text{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-inset-text{font-size:19px;line-height:25px}}@media print{.govuk-inset-text{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-inset-text{margin-top:30px;margin-bottom:30px}}.govuk-inset-text :first-child{margin-top:0}.govuk-inset-text :last-child,.govuk-inset-text :only-child{margin-bottom:0}.govuk-panel{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}@media print{.govuk-panel{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel{font-size:19px;line-height:25px}}@media print{.govuk-panel{font-size:14pt;line-height:1.15}}@media (max-width:40.0525em){.govuk-panel{padding:25px}}.govuk-panel--confirmation{color:#fff;background:#28a197}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px}@media print{.govuk-panel__title{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel__title{font-size:48px;line-height:50px}}@media print{.govuk-panel__title{font-size:32pt;line-height:1.15}}.govuk-panel__body{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:24px;line-height:25px}@media print{.govuk-panel__body{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-panel__body{font-size:36px;line-height:40px}}@media print{.govuk-panel__body{font-size:24pt;line-height:1.05}}.govuk-tag{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:1.25;display:inline-block;padding:5px 8px 0;color:#fff;background-color:#005ea5;letter-spacing:1px;text-decoration:none;text-transform:uppercase}@media print{.govuk-tag{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-tag{font-size:16px;line-height:1.25}}@media print{.govuk-tag{font-size:14pt;line-height:1.25}}.govuk-tag--inactive{background-color:#6f777b}.govuk-phase-banner{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;color:#0b0c0c;padding-top:10px;padding-bottom:10px;border-bottom:1px solid #bfc1c3}@media print{.govuk-phase-banner{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-phase-banner{font-size:16px;line-height:20px}}@media print{.govuk-phase-banner{font-size:14pt;line-height:1.2;color:#000}}.govuk-phase-banner__content{display:table;margin:0}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:baseline}.govuk-radios__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}@media print{.govuk-radios__item{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-radios__item{font-size:19px;line-height:25px}}@media print{.govuk-radios__item{font-size:14pt;line-height:1.15}}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer;margin:0;opacity:0}.govuk-radios__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__input+.govuk-radios__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__input+.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;opacity:0;background:currentColor}.govuk-radios__input:focus+.govuk-radios__label:before{-webkit-box-shadow:0 0 0 4px #ffbf47;box-shadow:0 0 0 4px #ffbf47}.govuk-radios__input:checked+.govuk-radios__label:after{opacity:1}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{opacity:.5}@media (min-width:40.0625em){.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}}.govuk-radios__conditional{margin-bottom:15px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}@media (min-width:40.0625em){.govuk-radios__conditional{margin-bottom:20px}}.govuk-radios__conditional[aria-hidden=true]{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-select{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;padding:5px;border:2px solid #0b0c0c}@media print{.govuk-select{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-select{font-size:19px;line-height:1.25}}@media print{.govuk-select{font-size:14pt;line-height:1.25}}.govuk-select:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-select:focus::-ms-value,.govuk-select option:active,.govuk-select option:checked{color:#fff;background-color:#005ea5}.govuk-select--error{border:4px solid #b10e1e}.govuk-skip-link{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:16px;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}@media print{.govuk-skip-link{font-family:sans-serif}}.govuk-skip-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:visited{color:#0b0c0c}@media print{.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:visited{color:#000}}.govuk-skip-link:link:focus{color:#0b0c0c}@media print{.govuk-skip-link:link:focus{color:#000}}@media (min-width:40.0625em){.govuk-skip-link{font-size:16px;line-height:20px}}@media print{.govuk-skip-link{font-size:14pt;line-height:1.2}}.govuk-table{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;width:100%;margin-bottom:20px;border-spacing:0;border-collapse:collapse}@media print{.govuk-table{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-table{font-size:19px;line-height:25px}}@media print{.govuk-table{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-table{margin-bottom:30px}}.govuk-table__header{font-weight:700}.govuk-table__cell,.govuk-table__header{padding:.52632em 1.05263em .52632em 0;border-bottom:1px solid #bfc1c3;text-align:left}.govuk-table__cell--numeric{font-family:ntatabularnumbers,nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400}@media print{.govuk-table__cell--numeric{font-family:sans-serif}}.govuk-table__cell--numeric,.govuk-table__header--numeric{text-align:right}.govuk-table__cell:last-child,.govuk-table__header:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-textarea{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%;margin-bottom:20px;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}@media print{.govuk-textarea{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-textarea{font-size:19px;line-height:1.25}}@media print{.govuk-textarea{font-size:14pt;line-height:1.25}}.govuk-textarea:focus{outline:3px solid #ffbf47;outline-offset:0}@media (min-width:40.0625em){.govuk-textarea{margin-bottom:30px}}.govuk-textarea--error{border:4px solid #b10e1e}.govuk-warning-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;position:relative;margin-bottom:20px;padding:10px 0}@media print{.govuk-warning-text{font-family:sans-serif}}@media (min-width:40.0625em){.govuk-warning-text{font-size:19px;line-height:25px}}@media print{.govuk-warning-text{font-size:14pt;line-height:1.15;color:#000}}@media (min-width:40.0625em){.govuk-warning-text{margin-bottom:30px}}.govuk-warning-text__assistive{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0;white-space:nowrap}.govuk-warning-text__icon{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;position:absolute;top:50%;left:0;min-width:38px;min-height:35px;margin-top:-20px;padding-top:3px;border-radius:50%;color:#fff;background:#0b0c0c;font-size:1.6em;line-height:35px;text-align:center}@media print{.govuk-warning-text__icon{font-family:sans-serif}}.govuk-warning-text__text{display:block;margin-left:-15px;padding-left:65px}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{padding:0;border:0}.govuk-visually-hidden,.govuk-visually-hidden-focussable{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.govuk-visually-hidden-focussable:active,.govuk-visually-hidden-focussable:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-\!-display-inline{display:inline!important}.govuk-\!-display-inline-block{display:inline-block!important}.govuk-\!-display-block{display:block!important}.govuk-\!-margin-0{margin:0!important}@media (min-width:40.0625em){.govuk-\!-margin-0{margin:0!important}}.govuk-\!-margin-top-0{margin-top:0!important}@media (min-width:40.0625em){.govuk-\!-margin-top-0{margin-top:0!important}}.govuk-\!-margin-right-0{margin-right:0!important}@media (min-width:40.0625em){.govuk-\!-margin-right-0{margin-right:0!important}}.govuk-\!-margin-bottom-0{margin-bottom:0!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-0{margin-bottom:0!important}}.govuk-\!-margin-left-0{margin-left:0!important}@media (min-width:40.0625em){.govuk-\!-margin-left-0{margin-left:0!important}}.govuk-\!-margin-1{margin:5px!important}@media (min-width:40.0625em){.govuk-\!-margin-1{margin:5px!important}}.govuk-\!-margin-top-1{margin-top:5px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-1{margin-top:5px!important}}.govuk-\!-margin-right-1{margin-right:5px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-1{margin-right:5px!important}}.govuk-\!-margin-bottom-1{margin-bottom:5px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-1{margin-bottom:5px!important}}.govuk-\!-margin-left-1{margin-left:5px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-1{margin-left:5px!important}}.govuk-\!-margin-2{margin:10px!important}@media (min-width:40.0625em){.govuk-\!-margin-2{margin:10px!important}}.govuk-\!-margin-top-2{margin-top:10px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-2{margin-top:10px!important}}.govuk-\!-margin-right-2{margin-right:10px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-2{margin-right:10px!important}}.govuk-\!-margin-bottom-2{margin-bottom:10px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-2{margin-bottom:10px!important}}.govuk-\!-margin-left-2{margin-left:10px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-2{margin-left:10px!important}}.govuk-\!-margin-3{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-3{margin:15px!important}}.govuk-\!-margin-top-3{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-3{margin-top:15px!important}}.govuk-\!-margin-right-3{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-3{margin-right:15px!important}}.govuk-\!-margin-bottom-3{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-3{margin-bottom:15px!important}}.govuk-\!-margin-left-3{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-3{margin-left:15px!important}}.govuk-\!-margin-4{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-4{margin:20px!important}}.govuk-\!-margin-top-4{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-4{margin-top:20px!important}}.govuk-\!-margin-right-4{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-4{margin-right:20px!important}}.govuk-\!-margin-bottom-4{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-4{margin-bottom:20px!important}}.govuk-\!-margin-left-4{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-4{margin-left:20px!important}}.govuk-\!-margin-5{margin:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-5{margin:25px!important}}.govuk-\!-margin-top-5{margin-top:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-5{margin-top:25px!important}}.govuk-\!-margin-right-5{margin-right:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-5{margin-right:25px!important}}.govuk-\!-margin-bottom-5{margin-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-5{margin-bottom:25px!important}}.govuk-\!-margin-left-5{margin-left:15px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-5{margin-left:25px!important}}.govuk-\!-margin-6{margin:20px!important}@media (min-width:40.0625em){.govuk-\!-margin-6{margin:30px!important}}.govuk-\!-margin-top-6{margin-top:20px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-6{margin-top:30px!important}}.govuk-\!-margin-right-6{margin-right:20px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-6{margin-right:30px!important}}.govuk-\!-margin-bottom-6{margin-bottom:20px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-6{margin-bottom:30px!important}}.govuk-\!-margin-left-6{margin-left:20px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-6{margin-left:30px!important}}.govuk-\!-margin-7{margin:25px!important}@media (min-width:40.0625em){.govuk-\!-margin-7{margin:40px!important}}.govuk-\!-margin-top-7{margin-top:25px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-7{margin-top:40px!important}}.govuk-\!-margin-right-7{margin-right:25px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-7{margin-right:40px!important}}.govuk-\!-margin-bottom-7{margin-bottom:25px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-7{margin-bottom:40px!important}}.govuk-\!-margin-left-7{margin-left:25px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-7{margin-left:40px!important}}.govuk-\!-margin-8{margin:30px!important}@media (min-width:40.0625em){.govuk-\!-margin-8{margin:50px!important}}.govuk-\!-margin-top-8{margin-top:30px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-8{margin-top:50px!important}}.govuk-\!-margin-right-8{margin-right:30px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-8{margin-right:50px!important}}.govuk-\!-margin-bottom-8{margin-bottom:30px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-8{margin-bottom:50px!important}}.govuk-\!-margin-left-8{margin-left:30px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-8{margin-left:50px!important}}.govuk-\!-margin-9{margin:40px!important}@media (min-width:40.0625em){.govuk-\!-margin-9{margin:60px!important}}.govuk-\!-margin-top-9{margin-top:40px!important}@media (min-width:40.0625em){.govuk-\!-margin-top-9{margin-top:60px!important}}.govuk-\!-margin-right-9{margin-right:40px!important}@media (min-width:40.0625em){.govuk-\!-margin-right-9{margin-right:60px!important}}.govuk-\!-margin-bottom-9{margin-bottom:40px!important}@media (min-width:40.0625em){.govuk-\!-margin-bottom-9{margin-bottom:60px!important}}.govuk-\!-margin-left-9{margin-left:40px!important}@media (min-width:40.0625em){.govuk-\!-margin-left-9{margin-left:60px!important}}.govuk-\!-padding-0{padding:0!important}@media (min-width:40.0625em){.govuk-\!-padding-0{padding:0!important}}.govuk-\!-padding-top-0{padding-top:0!important}@media (min-width:40.0625em){.govuk-\!-padding-top-0{padding-top:0!important}}.govuk-\!-padding-right-0{padding-right:0!important}@media (min-width:40.0625em){.govuk-\!-padding-right-0{padding-right:0!important}}.govuk-\!-padding-bottom-0{padding-bottom:0!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-0{padding-bottom:0!important}}.govuk-\!-padding-left-0{padding-left:0!important}@media (min-width:40.0625em){.govuk-\!-padding-left-0{padding-left:0!important}}.govuk-\!-padding-1{padding:5px!important}@media (min-width:40.0625em){.govuk-\!-padding-1{padding:5px!important}}.govuk-\!-padding-top-1{padding-top:5px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-1{padding-top:5px!important}}.govuk-\!-padding-right-1{padding-right:5px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-1{padding-right:5px!important}}.govuk-\!-padding-bottom-1{padding-bottom:5px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-1{padding-bottom:5px!important}}.govuk-\!-padding-left-1{padding-left:5px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-1{padding-left:5px!important}}.govuk-\!-padding-2{padding:10px!important}@media (min-width:40.0625em){.govuk-\!-padding-2{padding:10px!important}}.govuk-\!-padding-top-2{padding-top:10px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-2{padding-top:10px!important}}.govuk-\!-padding-right-2{padding-right:10px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-2{padding-right:10px!important}}.govuk-\!-padding-bottom-2{padding-bottom:10px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-2{padding-bottom:10px!important}}.govuk-\!-padding-left-2{padding-left:10px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-2{padding-left:10px!important}}.govuk-\!-padding-3{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-3{padding:15px!important}}.govuk-\!-padding-top-3{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-3{padding-top:15px!important}}.govuk-\!-padding-right-3{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-3{padding-right:15px!important}}.govuk-\!-padding-bottom-3{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-3{padding-bottom:15px!important}}.govuk-\!-padding-left-3{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-3{padding-left:15px!important}}.govuk-\!-padding-4{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-4{padding:20px!important}}.govuk-\!-padding-top-4{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-4{padding-top:20px!important}}.govuk-\!-padding-right-4{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-4{padding-right:20px!important}}.govuk-\!-padding-bottom-4{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-4{padding-bottom:20px!important}}.govuk-\!-padding-left-4{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-4{padding-left:20px!important}}.govuk-\!-padding-5{padding:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-5{padding:25px!important}}.govuk-\!-padding-top-5{padding-top:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-5{padding-top:25px!important}}.govuk-\!-padding-right-5{padding-right:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-5{padding-right:25px!important}}.govuk-\!-padding-bottom-5{padding-bottom:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-5{padding-bottom:25px!important}}.govuk-\!-padding-left-5{padding-left:15px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-5{padding-left:25px!important}}.govuk-\!-padding-6{padding:20px!important}@media (min-width:40.0625em){.govuk-\!-padding-6{padding:30px!important}}.govuk-\!-padding-top-6{padding-top:20px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-6{padding-top:30px!important}}.govuk-\!-padding-right-6{padding-right:20px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-6{padding-right:30px!important}}.govuk-\!-padding-bottom-6{padding-bottom:20px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-6{padding-bottom:30px!important}}.govuk-\!-padding-left-6{padding-left:20px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-6{padding-left:30px!important}}.govuk-\!-padding-7{padding:25px!important}@media (min-width:40.0625em){.govuk-\!-padding-7{padding:40px!important}}.govuk-\!-padding-top-7{padding-top:25px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-7{padding-top:40px!important}}.govuk-\!-padding-right-7{padding-right:25px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-7{padding-right:40px!important}}.govuk-\!-padding-bottom-7{padding-bottom:25px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-7{padding-bottom:40px!important}}.govuk-\!-padding-left-7{padding-left:25px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-7{padding-left:40px!important}}.govuk-\!-padding-8{padding:30px!important}@media (min-width:40.0625em){.govuk-\!-padding-8{padding:50px!important}}.govuk-\!-padding-top-8{padding-top:30px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-8{padding-top:50px!important}}.govuk-\!-padding-right-8{padding-right:30px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-8{padding-right:50px!important}}.govuk-\!-padding-bottom-8{padding-bottom:30px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-8{padding-bottom:50px!important}}.govuk-\!-padding-left-8{padding-left:30px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-8{padding-left:50px!important}}.govuk-\!-padding-9{padding:40px!important}@media (min-width:40.0625em){.govuk-\!-padding-9{padding:60px!important}}.govuk-\!-padding-top-9{padding-top:40px!important}@media (min-width:40.0625em){.govuk-\!-padding-top-9{padding-top:60px!important}}.govuk-\!-padding-right-9{padding-right:40px!important}@media (min-width:40.0625em){.govuk-\!-padding-right-9{padding-right:60px!important}}.govuk-\!-padding-bottom-9{padding-bottom:40px!important}@media (min-width:40.0625em){.govuk-\!-padding-bottom-9{padding-bottom:60px!important}}.govuk-\!-padding-left-9{padding-left:40px!important}@media (min-width:40.0625em){.govuk-\!-padding-left-9{padding-left:60px!important}}.govuk-\!-font-size-80{font-size:53px!important;line-height:55px!important}@media (min-width:40.0625em){.govuk-\!-font-size-80{font-size:80px!important;line-height:80px!important}}@media print{.govuk-\!-font-size-80{font-size:53pt!important;line-height:1.1!important}}.govuk-\!-font-size-48{font-size:32px!important;line-height:35px!important}@media (min-width:40.0625em){.govuk-\!-font-size-48{font-size:48px!important;line-height:50px!important}}@media print{.govuk-\!-font-size-48{font-size:32pt!important;line-height:1.15!important}}.govuk-\!-font-size-36{font-size:24px!important;line-height:25px!important}@media (min-width:40.0625em){.govuk-\!-font-size-36{font-size:36px!important;line-height:40px!important}}@media print{.govuk-\!-font-size-36{font-size:24pt!important;line-height:1.05!important}}.govuk-\!-font-size-27{font-size:18px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-font-size-27{font-size:27px!important;line-height:30px!important}}@media print{.govuk-\!-font-size-27{font-size:18pt!important;line-height:1.15!important}}.govuk-\!-font-size-24{font-size:18px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-font-size-24{font-size:24px!important;line-height:30px!important}}@media print{.govuk-\!-font-size-24{font-size:18pt!important;line-height:1.15!important}}.govuk-\!-font-size-19{font-size:16px!important;line-height:20px!important}@media (min-width:40.0625em){.govuk-\!-font-size-19{font-size:19px!important;line-height:25px!important}}@media print{.govuk-\!-font-size-19{font-size:14pt!important;line-height:1.15!important}}.govuk-\!-font-size-16{font-size:14px!important;line-height:16px!important}@media (min-width:40.0625em){.govuk-\!-font-size-16{font-size:16px!important;line-height:20px!important}}@media print{.govuk-\!-font-size-16{font-size:14pt!important;line-height:1.2!important}}.govuk-\!-font-size-14{font-size:12px!important;line-height:15px!important}@media (min-width:40.0625em){.govuk-\!-font-size-14{font-size:14px!important;line-height:20px!important}}@media print{.govuk-\!-font-size-14{font-size:12pt!important;line-height:1.2!important}}.govuk-\!-font-weight-regular{font-weight:400!important}.govuk-\!-font-weight-bold{font-weight:700!important}.govuk-\!-width-three-quarters{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-three-quarters{width:75%!important}}.govuk-\!-width-two-thirds{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-two-thirds{width:66.66%!important}}.govuk-\!-width-one-half{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-half{width:50%!important}}.govuk-\!-width-one-third{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-third{width:33.33%!important}}.govuk-\!-width-one-quarter{width:100%!important}@media (min-width:40.0625em){.govuk-\!-width-one-quarter{width:25%!important}} \ No newline at end of file diff --git a/dist/govuk-frontend-0.0.32-alpha.min.js b/dist/govuk-frontend-0.0.32-alpha.min.js new file mode 100644 index 0000000000..83293ad62b --- /dev/null +++ b/dist/govuk-frontend-0.0.32-alpha.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("GOVUKFrontend",["exports"],t):t(e.GOVUKFrontend={})}(this,function(e){"use strict";function t(e,t){if(window.NodeList.prototype.forEach)return e.forEach(t);for(var n=0;n0?e.className=e.className.replace(" "+t,""):e.className+=" "+t},c.prototype.handleClick=function(e){var t=this.$module,n=e.target||e.srcElement,o=t.querySelector("#"+n.getAttribute("aria-controls"));n&&o&&(this.toggleClass(o,"govuk-header__navigation--open"),this.toggleClass(n,"govuk-header__menu-button--open"),n.setAttribute("aria-expanded","true"!==n.getAttribute("aria-expanded")),o.setAttribute("aria-hidden","false"===o.getAttribute("aria-hidden")))},u.prototype.init=function(){var e=this.$module;t(this.$inputs,function(t){var n=t.getAttribute("data-aria-controls");n&&e.querySelector("#"+n)&&(t.setAttribute("aria-controls",n),t.removeAttribute("data-aria-controls"),this.setAttributes(t))}.bind(this)),e.addEventListener("click",this.handleClick.bind(this))},u.prototype.setAttributes=function(e){var t=e.checked;e.setAttribute("aria-expanded",t),document.querySelector("#"+e.getAttribute("aria-controls")).setAttribute("aria-hidden",!t)},u.prototype.handleClick=function(e){t(this.$inputs,function(e){var t="radio"===e.getAttribute("type"),n=e.getAttribute("aria-controls");t&&n&&this.setAttributes(e)}.bind(this))},e.initAll=function(){new n(document).init(),t(document.querySelectorAll("details"),function(e){new r(e).init()}),t(document.querySelectorAll('[data-module="checkboxes"]'),function(e){new i(e).init()}),new a(document.querySelector('[data-module="error-summary"]')).init(),new c(document.querySelector('[data-module="header"]')).init(),t(document.querySelectorAll('[data-module="radios"]'),function(e){new u(e).init()})},e.Button=n,e.Details=r,e.Checkboxes=i,e.ErrorSummary=a,e.Header=c,e.Radios=u}); diff --git a/dist/govuk-frontend-ie8-0.0.31-alpha.min.css b/dist/govuk-frontend-ie8-0.0.31-alpha.min.css deleted file mode 100644 index 8d6751c4d3..0000000000 --- a/dist/govuk-frontend-ie8-0.0.31-alpha.min.css +++ /dev/null @@ -1,3 +0,0 @@ -.govuk-link,.govuk-prose-scope a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} - -/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:nta;src:url(/assets/fonts/light-2c037cf7e1-v1.eot);src:url(/assets/fonts/light-2c037cf7e1-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-f38ad40456-v1.woff2) format("woff2"),url(/assets/fonts/light-458f8ea81c-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:nta;src:url(/assets/fonts/bold-fb2676462a-v1.eot);src:url(/assets/fonts/bold-fb2676462a-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-a2452cb66f-v1.woff2) format("woff2"),url(/assets/fonts/bold-f38c792ac2-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot);src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-tabular-851b10ccdd-v1.woff2) format("woff2"),url(/assets/fonts/light-tabular-62cc6f0a28-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot);src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-tabular-b89238d840-v1.woff2) format("woff2"),url(/assets/fonts/bold-tabular-784c21afb8-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}.govuk-link:focus,.govuk-prose-scope a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-link:link,.govuk-prose-scope a:link{color:#005ea5}.govuk-link:visited,.govuk-prose-scope a:visited{color:#4c2c92}.govuk-link:active,.govuk-link:hover,.govuk-prose-scope a:active,.govuk-prose-scope a:hover{color:#2b8cc4}.govuk-link--muted:active,.govuk-link--muted:hover,.govuk-link--muted:link,.govuk-link--muted:visited{color:#6f777b}.govuk-link--muted:focus,.govuk-link--muted:link:focus{color:#0b0c0c}.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:visited{color:#0b0c0c}.govuk-link--text-colour:link:focus{color:#0b0c0c}.govuk-link--no-visited-state:visited{color:#005ea5}.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;color:#0b0c0c;margin-top:0;margin-bottom:15px;padding-left:0;list-style-type:none}.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{font-size:19px;line-height:25px}.govuk-list,.govuk-prose-scope ol,.govuk-prose-scope ul{margin-bottom:20px}.govuk-list .govuk-list,.govuk-list .govuk-prose-scope ol,.govuk-list .govuk-prose-scope ul,.govuk-prose-scope .govuk-list ol,.govuk-prose-scope .govuk-list ul,.govuk-prose-scope ol .govuk-list,.govuk-prose-scope ol ol,.govuk-prose-scope ol ul,.govuk-prose-scope ul .govuk-list,.govuk-prose-scope ul ol,.govuk-prose-scope ul ul{margin-top:10px}.govuk-list>li,.govuk-prose-scope ol>li,.govuk-prose-scope ul>li{margin-bottom:5px}.govuk-list a:link,.govuk-prose-scope ol a:link,.govuk-prose-scope ul a:link{color:#005ea5}.govuk-list a:visited,.govuk-prose-scope ol a:visited,.govuk-prose-scope ul a:visited{color:#4c2c92}.govuk-list a:active,.govuk-list a:hover,.govuk-prose-scope ol a:active,.govuk-prose-scope ol a:hover,.govuk-prose-scope ul a:active,.govuk-prose-scope ul a:hover{color:#2b8cc4}.govuk-list--bullet,.govuk-prose-scope ul{padding-left:20px;list-style-type:disc}.govuk-list--number,.govuk-prose-scope ol{padding-left:20px;list-style-type:decimal}.govuk-template{background-color:#dee0e2}.govuk-template__body{margin:0;background-color:#fff}.govuk-heading-xl,.govuk-prose-scope h1{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;font-size:48px;line-height:50px;display:block;margin-top:0;margin-bottom:30px;margin-bottom:50px}.govuk-heading-l,.govuk-prose-scope h2{font-size:24px;line-height:25px;font-size:36px;line-height:40px;margin-bottom:20px;margin-bottom:30px}.govuk-heading-l,.govuk-heading-m,.govuk-prose-scope h2,.govuk-prose-scope h3{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:block;margin-top:0}.govuk-heading-m,.govuk-prose-scope h3{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:15px;margin-bottom:20px}.govuk-heading-s,.govuk-prose-scope h4{color:#0b0c0c;font-weight:700;font-size:16px;line-height:20px;font-size:19px;line-height:25px;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-caption-xl,.govuk-heading-s,.govuk-prose-scope h4{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block}.govuk-caption-xl{font-weight:400;font-size:18px;line-height:20px;font-size:27px;line-height:30px;margin-bottom:5px;color:#6f777b}.govuk-caption-l{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:5px;margin-bottom:0}.govuk-caption-l,.govuk-caption-m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;display:block;color:#6f777b}.govuk-caption-m{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-body-l,.govuk-body-lead{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:20px;margin-bottom:30px}.govuk-body,.govuk-body-l,.govuk-body-lead,.govuk-body-m,.govuk-prose-scope p{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;margin-top:0}.govuk-body,.govuk-body-m,.govuk-prose-scope p{font-size:16px;line-height:20px;font-size:19px;line-height:25px;margin-bottom:15px;margin-bottom:20px}.govuk-body-s{font-size:14px;line-height:16px;font-size:16px;line-height:20px}.govuk-body-s,.govuk-body-xs{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-body-xs{font-size:12px;line-height:15px;font-size:14px;line-height:20px}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l,.govuk-prose-scope .govuk-body-l+h2,.govuk-prose-scope .govuk-body-lead+h2{padding-top:5px;padding-top:10px}.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l,.govuk-prose-scope .govuk-body+h2,.govuk-prose-scope .govuk-body-m+h2,.govuk-prose-scope .govuk-body-s+h2,.govuk-prose-scope .govuk-list+h2,.govuk-prose-scope ol+.govuk-heading-l,.govuk-prose-scope ol+h2,.govuk-prose-scope p+.govuk-heading-l,.govuk-prose-scope p+h2,.govuk-prose-scope ul+.govuk-heading-l,.govuk-prose-scope ul+h2{padding-top:15px;padding-top:20px}.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s,.govuk-prose-scope .govuk-body+h3,.govuk-prose-scope .govuk-body+h4,.govuk-prose-scope .govuk-body-m+h3,.govuk-prose-scope .govuk-body-m+h4,.govuk-prose-scope .govuk-body-s+h3,.govuk-prose-scope .govuk-body-s+h4,.govuk-prose-scope .govuk-list+h3,.govuk-prose-scope .govuk-list+h4,.govuk-prose-scope ol+.govuk-heading-m,.govuk-prose-scope ol+.govuk-heading-s,.govuk-prose-scope ol+h3,.govuk-prose-scope ol+h4,.govuk-prose-scope p+.govuk-heading-m,.govuk-prose-scope p+.govuk-heading-s,.govuk-prose-scope p+h3,.govuk-prose-scope p+h4,.govuk-prose-scope ul+.govuk-heading-m,.govuk-prose-scope ul+.govuk-heading-s,.govuk-prose-scope ul+h3,.govuk-prose-scope ul+h4{padding-top:5px;padding-top:10px}.govuk-prose-scope b,.govuk-prose-scope strong{font-weight:700}.govuk-prose-scope hr,.govuk-section-break{margin:0;border:0;height:0}.govuk-prose-scope hr,.govuk-section-break--xl{margin-top:30px;margin-top:50px;margin-bottom:30px;margin-bottom:50px}.govuk-section-break--l{margin-top:20px;margin-top:30px;margin-bottom:20px;margin-bottom:30px}.govuk-section-break--m{margin-top:15px;margin-top:20px;margin-bottom:15px;margin-bottom:20px}.govuk-prose-scope hr,.govuk-section-break--visible{border-bottom:1px solid #bfc1c3}.govuk-form-group{margin-bottom:20px;margin-bottom:30px}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #b10e1e}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{width:100%;width:25%}.govuk-grid-column-one-quarter,.govuk-grid-column-one-third{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-one-third{width:100%;width:33.3333%}.govuk-grid-column-one-half{width:100%;width:50%}.govuk-grid-column-one-half,.govuk-grid-column-two-thirds{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-two-thirds{width:100%;width:66.6666%}.govuk-grid-column-three-quarters{width:100%;width:75%}.govuk-grid-column-full,.govuk-grid-column-three-quarters{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-full{width:100%}.govuk-main-wrapper{padding-top:20px;padding-top:30px;padding-bottom:20px;padding-bottom:30px}.govuk-main-wrapper--l{padding-top:30px;padding-top:50px}.govuk-circle{display:inline-block;border-radius:50%;color:#fff;background:#0b0c0c;text-align:center}.govuk-width-container{max-width:960px;width:960px;margin:0 15px;margin:0 30px}.govuk-back-link{font-size:14px;line-height:16px;font-size:16px;line-height:20px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px;border-bottom:1px solid #0b0c0c;text-decoration:none}.govuk-back-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:link:focus,.govuk-back-link:visited{color:#0b0c0c}.govuk-back-link:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 50%,100% 100%,100% 0);clip-path:polygon(0 50%,100% 100%,100% 0);border-width:5px 6px 5px 0;border-right-color:inherit;content:"";position:absolute;left:0;margin:auto}.govuk-back-link:before{top:-1px;bottom:1px}.govuk-breadcrumbs{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;color:#0b0c0c;margin-top:15px;margin-bottom:10px}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:-1px;bottom:1px;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#6f777b;content:"\003e";width:auto;height:auto;border:0;color:#6f777b;font-family:Arial,sans-serif}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-breadcrumbs__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:link:focus,.govuk-breadcrumbs__link:visited{color:#0b0c0c}.govuk-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:19px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin-top:0;margin-bottom:22px;margin-bottom:32px;padding:7px 10px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00823b;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none;border-bottom:2px solid #003618;width:auto}.govuk-button:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-button:active,.govuk-button:hover,.govuk-button:link,.govuk-button:visited{color:#fff;text-decoration:none}.govuk-button:link:focus{color:#fff}.govuk-button:-moz-focus-inner{padding:0;border:0}.govuk-button:focus,.govuk-button:hover{background-color:#00692f}.govuk-button:active{top:2px;-webkit-box-shadow:none;box-shadow:none;border-bottom-width:0}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{filter:alpha(opacity=50);background:#00823b}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00823b;cursor:default}.govuk-button--disabled:focus,.govuk-button[disabled=disabled]:focus,.govuk-button[disabled]:focus{outline:none}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;border-bottom:2px solid #003618}.govuk-button--start{font-weight:700;font-size:18px;font-size:24px;line-height:1;min-height:auto;padding:8px 40px 8px 15px;background-image:url(/assets/images/icon-pointer.png);background-repeat:no-repeat;background-position:100% 50%}.govuk-button,.govuk-button--start{padding-top:9px;padding-bottom:6px}.govuk-error-message{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;margin-bottom:15px;clear:both;color:#b10e1e}.govuk-fieldset{margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}.govuk-fieldset__legend{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;max-width:100%;margin-bottom:15px;padding:0;overflow:hidden;white-space:normal}.govuk-fieldset__legend--xl{font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-fieldset__legend--l,.govuk-fieldset__legend--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-fieldset__legend--l{font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-fieldset__legend--m{font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-fieldset__legend--m,.govuk-fieldset__legend--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-fieldset__legend--s{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{margin-bottom:15px;color:#6f777b}.govuk-hint,.govuk-label{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block}.govuk-label{color:#0b0c0c;margin-bottom:5px}.govuk-label--xl{font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-label--l,.govuk-label--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;margin-bottom:15px}.govuk-label--l{font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-label--m{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:10px}.govuk-label--m,.govuk-label--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-label--s{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer}.govuk-checkboxes__input:focus{outline:3px solid #ffbf47}.govuk-checkboxes__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__input+.govuk-checkboxes__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__input+.govuk-checkboxes__label:after{content:"";position:absolute;top:11px;left:9px;width:18px;height:7px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;filter:alpha(opacity=0);background:transparent}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{-webkit-box-shadow:0 0 0 3px #ffbf47;box-shadow:0 0 0 3px #ffbf47}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{filter:alpha(opacity=100)}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{filter:alpha(opacity=50)}.govuk-checkboxes__conditional{margin-bottom:15px;margin-bottom:20px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}.govuk-checkboxes__conditional[aria-hidden=true]{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-input{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.govuk-input:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-input::-webkit-inner-spin-button,.govuk-input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border:4px solid #b10e1e}.govuk-input--width-30{max-width:60ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{width:50px;margin-right:20px;margin-bottom:0;float:left;clear:none}.govuk-date-input__label{display:block;padding-bottom:2px}.govuk-date-input__input{margin-bottom:0}.govuk-date-input__item--year{width:70px}.govuk-details{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;margin-bottom:20px;margin-bottom:30px;display:block}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#005ea5;cursor:pointer}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:hover{color:#2b8cc4}.govuk-details__summary:focus{outline:4px solid #ffbf47;outline-offset:-1px;background:#ffbf47}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:0;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,100% 50%,0 100%);clip-path:polygon(0 0,100% 50%,0 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:12.124px 7px 0;border-top-color:inherit}.govuk-details__text{padding:15px;padding-left:20px;border-left:5px solid #bfc1c3}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text p:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;padding:20px;margin-bottom:30px;margin-bottom:50px;border:4px solid #b10e1e;border:5px solid #b10e1e}.govuk-error-summary:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-error-summary__title{font-weight:700;font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-error-summary__body,.govuk-error-summary__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-error-summary__body{font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700}.govuk-error-summary__list a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-error-summary__list a:active,.govuk-error-summary__list a:focus,.govuk-error-summary__list a:hover,.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#b10e1e;text-decoration:underline}.govuk-error-summary__list a:link:focus{color:#b10e1e}.govuk-file-upload{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c}.govuk-file-upload:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-file-upload--error{border:4px solid #b10e1e}.govuk-footer{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;padding-top:25px;padding-top:40px;padding-bottom:15px;padding-bottom:25px;border-top:1px solid #a1acb2;color:#454a4c;background:#dee0e2}.govuk-footer__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-footer__link:link,.govuk-footer__link:visited{color:#454a4c}.govuk-footer__link:active,.govuk-footer__link:hover{color:#171819}.govuk-footer__link:focus,.govuk-footer__link:link:focus{color:#0b0c0c}.govuk-footer__section-break{margin:0;margin-bottom:30px;margin-bottom:50px;border:0;border-bottom:1px solid #bfc1c3}.govuk-footer__meta{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-ms-flex:1;flex:1}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0;background-size:125px 102px;text-align:center;text-decoration:none;white-space:nowrap}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:25px;margin-bottom:40px;padding-bottom:20px;border-bottom:1px solid #bfc1c3}.govuk-footer__navigation{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.govuk-footer__section{display:inline-block;margin-right:15px;margin-bottom:30px;margin-left:15px;vertical-align:top;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.govuk-footer__section:first-child{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}.govuk-footer__list-item{margin-bottom:15px;margin-bottom:20px}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;border-bottom:10px solid #fff;color:#fff;background:#0b0c0c}.govuk-header--full-width{padding:0 15px;border-color:#005ea5}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #005ea5}.govuk-header__logotype{margin-right:5px}.govuk-header__logotype-crown{margin-right:1px;fill:currentColor;vertical-align:middle}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:middle}.govuk-header__product-name{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-header__link{text-decoration:none}.govuk-header__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover{text-decoration:underline}.govuk-header__link:focus,.govuk-header__link:link:focus{color:#0b0c0c}.govuk-header__link--homepage{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;font-size:30px;line-height:30px}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{margin-bottom:-1px;border-bottom:1px solid transparent;text-decoration:none}.govuk-header__link--homepage:active,.govuk-header__link--homepage:hover{border-bottom-color:currentColor}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-header__logo{margin-bottom:10px;padding-right:50px;display:inline-block;width:33.33%;padding-right:0;vertical-align:top}.govuk-header__content{display:inline-block;width:66.66%}.govuk-header__menu-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;top:15px}.govuk-header__menu-button:hover{text-decoration:underline}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:8.66px 5px 0;border-top-color:inherit;content:"";margin-left:5px}.govuk-header__menu-button:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0,0 100%,100% 100%);clip-path:polygon(50% 0,0 100%,100% 100%);border-width:0 5px 8.66px;border-bottom-color:inherit}.govuk-header__navigation{margin-bottom:10px;display:block;margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button,.js-enabled .govuk-header__navigation{display:block;display:none}.js-enabled .govuk-header__navigation--open{display:block}.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133;display:inline-block;margin-right:15px;padding:5px 0;border:0}.govuk-header__navigation-item a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:16px;font-size:16px;line-height:20px;white-space:nowrap}.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item:last-child{margin-right:0}.govuk-header__logotype-crown,.govuk-header__logotype-crown-fallback-image{position:relative;top:-4px}.govuk-header{padding-top:3px}.govuk-inset-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;padding:15px;margin-top:20px;margin-top:30px;margin-bottom:20px;margin-bottom:30px;clear:both;border-left:10px solid #bfc1c3}.govuk-inset-text :first-child{margin-top:0}.govuk-inset-text :last-child,.govuk-inset-text :only-child{margin-bottom:0}.govuk-panel{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}.govuk-panel--confirmation{color:#fff;background:#28a197}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-weight:700;font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-panel__body,.govuk-panel__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-panel__body{font-weight:400;font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-tag{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:16px;line-height:1.25;display:inline-block;padding:5px 8px 0;color:#fff;background-color:#005ea5;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.govuk-tag--inactive{background-color:#6f777b}.govuk-phase-banner{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;color:#0b0c0c;padding-top:10px;padding-bottom:10px;border-bottom:1px solid #bfc1c3}.govuk-phase-banner__content{display:table;margin:0}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:baseline}.govuk-radios__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer}.govuk-radios__input:focus{outline:3px solid #ffbf47}.govuk-radios__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__input+.govuk-radios__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__input+.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;filter:alpha(opacity=0);background:currentColor}.govuk-radios__input:focus+.govuk-radios__label:before{-webkit-box-shadow:0 0 0 4px #ffbf47;box-shadow:0 0 0 4px #ffbf47}.govuk-radios__input:checked+.govuk-radios__label:after{filter:alpha(opacity=100)}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{filter:alpha(opacity=50)}.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}.govuk-radios__conditional{margin-bottom:15px;margin-bottom:20px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}.govuk-radios__conditional[aria-hidden=true]{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-select{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;padding:5px;border:2px solid #0b0c0c}.govuk-select:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-select:focus::-ms-value,.govuk-select option:active,.govuk-select option:checked{color:#fff;background-color:#005ea5}.govuk-select--error{border:4px solid #b10e1e}.govuk-skip-link{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:16px;font-size:16px;line-height:20px;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-skip-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:link:focus,.govuk-skip-link:visited,.govuk-table{color:#0b0c0c}.govuk-table{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;width:100%;margin-bottom:20px;margin-bottom:30px;border-spacing:0;border-collapse:collapse}.govuk-table__header{font-weight:700}.govuk-table__cell,.govuk-table__header{padding:.52632em 1.05263em .52632em 0;border-bottom:1px solid #bfc1c3;text-align:left}.govuk-table__cell--numeric{font-family:ntatabularnumbers,nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400}.govuk-table__cell--numeric,.govuk-table__header--numeric{text-align:right}.govuk-table__cell:last-child,.govuk-table__header:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-textarea{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%;margin-bottom:20px;margin-bottom:30px;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}.govuk-textarea:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-textarea--error{border:4px solid #b10e1e}.govuk-warning-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;position:relative;margin-bottom:20px;margin-bottom:30px;padding:10px 0}.govuk-warning-text__assistive{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0;white-space:nowrap}.govuk-warning-text__icon{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;position:absolute;top:50%;left:0;min-width:38px;min-height:35px;margin-top:-20px;padding-top:3px;font-size:1.6em;line-height:35px}.govuk-warning-text__text{display:block;margin-left:-15px;padding-left:65px}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{padding:0;border:0}.govuk-visually-hidden,.govuk-visually-hidden-focussable{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.govuk-visually-hidden-focussable:active,.govuk-visually-hidden-focussable:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-\!-display-inline{display:inline!important}.govuk-\!-display-inline-block{display:inline-block!important}.govuk-\!-display-block{display:block!important}.govuk-\!-m-r0{margin:0!important}.govuk-\!-mt-r0{margin-top:0!important}.govuk-\!-mr-r0{margin-right:0!important}.govuk-\!-mb-r0{margin-bottom:0!important}.govuk-\!-ml-r0{margin-left:0!important}.govuk-\!-m-r1{margin:5px!important}.govuk-\!-mt-r1{margin-top:5px!important}.govuk-\!-mr-r1{margin-right:5px!important}.govuk-\!-mb-r1{margin-bottom:5px!important}.govuk-\!-ml-r1{margin-left:5px!important}.govuk-\!-m-r2{margin:10px!important}.govuk-\!-mt-r2{margin-top:10px!important}.govuk-\!-mr-r2{margin-right:10px!important}.govuk-\!-mb-r2{margin-bottom:10px!important}.govuk-\!-ml-r2{margin-left:10px!important}.govuk-\!-m-r3{margin:15px!important}.govuk-\!-mt-r3{margin-top:15px!important}.govuk-\!-mr-r3{margin-right:15px!important}.govuk-\!-mb-r3{margin-bottom:15px!important}.govuk-\!-ml-r3{margin-left:15px!important}.govuk-\!-m-r4{margin:15px!important;margin:20px!important}.govuk-\!-mt-r4{margin-top:15px!important;margin-top:20px!important}.govuk-\!-mr-r4{margin-right:15px!important;margin-right:20px!important}.govuk-\!-mb-r4{margin-bottom:15px!important;margin-bottom:20px!important}.govuk-\!-ml-r4{margin-left:15px!important;margin-left:20px!important}.govuk-\!-m-r5{margin:15px!important;margin:25px!important}.govuk-\!-mt-r5{margin-top:15px!important;margin-top:25px!important}.govuk-\!-mr-r5{margin-right:15px!important;margin-right:25px!important}.govuk-\!-mb-r5{margin-bottom:15px!important;margin-bottom:25px!important}.govuk-\!-ml-r5{margin-left:15px!important;margin-left:25px!important}.govuk-\!-m-r6{margin:20px!important;margin:30px!important}.govuk-\!-mt-r6{margin-top:20px!important;margin-top:30px!important}.govuk-\!-mr-r6{margin-right:20px!important;margin-right:30px!important}.govuk-\!-mb-r6{margin-bottom:20px!important;margin-bottom:30px!important}.govuk-\!-ml-r6{margin-left:20px!important;margin-left:30px!important}.govuk-\!-m-r7{margin:25px!important;margin:40px!important}.govuk-\!-mt-r7{margin-top:25px!important;margin-top:40px!important}.govuk-\!-mr-r7{margin-right:25px!important;margin-right:40px!important}.govuk-\!-mb-r7{margin-bottom:25px!important;margin-bottom:40px!important}.govuk-\!-ml-r7{margin-left:25px!important;margin-left:40px!important}.govuk-\!-m-r8{margin:30px!important;margin:50px!important}.govuk-\!-mt-r8{margin-top:30px!important;margin-top:50px!important}.govuk-\!-mr-r8{margin-right:30px!important;margin-right:50px!important}.govuk-\!-mb-r8{margin-bottom:30px!important;margin-bottom:50px!important}.govuk-\!-ml-r8{margin-left:30px!important;margin-left:50px!important}.govuk-\!-m-r9{margin:40px!important;margin:60px!important}.govuk-\!-mt-r9{margin-top:40px!important;margin-top:60px!important}.govuk-\!-mr-r9{margin-right:40px!important;margin-right:60px!important}.govuk-\!-mb-r9{margin-bottom:40px!important;margin-bottom:60px!important}.govuk-\!-ml-r9{margin-left:40px!important;margin-left:60px!important}.govuk-\!-p-r0{padding:0!important}.govuk-\!-pt-r0{padding-top:0!important}.govuk-\!-pr-r0{padding-right:0!important}.govuk-\!-pb-r0{padding-bottom:0!important}.govuk-\!-pl-r0{padding-left:0!important}.govuk-\!-p-r1{padding:5px!important}.govuk-\!-pt-r1{padding-top:5px!important}.govuk-\!-pr-r1{padding-right:5px!important}.govuk-\!-pb-r1{padding-bottom:5px!important}.govuk-\!-pl-r1{padding-left:5px!important}.govuk-\!-p-r2{padding:10px!important}.govuk-\!-pt-r2{padding-top:10px!important}.govuk-\!-pr-r2{padding-right:10px!important}.govuk-\!-pb-r2{padding-bottom:10px!important}.govuk-\!-pl-r2{padding-left:10px!important}.govuk-\!-p-r3{padding:15px!important}.govuk-\!-pt-r3{padding-top:15px!important}.govuk-\!-pr-r3{padding-right:15px!important}.govuk-\!-pb-r3{padding-bottom:15px!important}.govuk-\!-pl-r3{padding-left:15px!important}.govuk-\!-p-r4{padding:15px!important;padding:20px!important}.govuk-\!-pt-r4{padding-top:15px!important;padding-top:20px!important}.govuk-\!-pr-r4{padding-right:15px!important;padding-right:20px!important}.govuk-\!-pb-r4{padding-bottom:15px!important;padding-bottom:20px!important}.govuk-\!-pl-r4{padding-left:15px!important;padding-left:20px!important}.govuk-\!-p-r5{padding:15px!important;padding:25px!important}.govuk-\!-pt-r5{padding-top:15px!important;padding-top:25px!important}.govuk-\!-pr-r5{padding-right:15px!important;padding-right:25px!important}.govuk-\!-pb-r5{padding-bottom:15px!important;padding-bottom:25px!important}.govuk-\!-pl-r5{padding-left:15px!important;padding-left:25px!important}.govuk-\!-p-r6{padding:20px!important;padding:30px!important}.govuk-\!-pt-r6{padding-top:20px!important;padding-top:30px!important}.govuk-\!-pr-r6{padding-right:20px!important;padding-right:30px!important}.govuk-\!-pb-r6{padding-bottom:20px!important;padding-bottom:30px!important}.govuk-\!-pl-r6{padding-left:20px!important;padding-left:30px!important}.govuk-\!-p-r7{padding:25px!important;padding:40px!important}.govuk-\!-pt-r7{padding-top:25px!important;padding-top:40px!important}.govuk-\!-pr-r7{padding-right:25px!important;padding-right:40px!important}.govuk-\!-pb-r7{padding-bottom:25px!important;padding-bottom:40px!important}.govuk-\!-pl-r7{padding-left:25px!important;padding-left:40px!important}.govuk-\!-p-r8{padding:30px!important;padding:50px!important}.govuk-\!-pt-r8{padding-top:30px!important;padding-top:50px!important}.govuk-\!-pr-r8{padding-right:30px!important;padding-right:50px!important}.govuk-\!-pb-r8{padding-bottom:30px!important;padding-bottom:50px!important}.govuk-\!-pl-r8{padding-left:30px!important;padding-left:50px!important}.govuk-\!-p-r9{padding:40px!important;padding:60px!important}.govuk-\!-pt-r9{padding-top:40px!important;padding-top:60px!important}.govuk-\!-pr-r9{padding-right:40px!important;padding-right:60px!important}.govuk-\!-pb-r9{padding-bottom:40px!important;padding-bottom:60px!important}.govuk-\!-pl-r9{padding-left:40px!important;padding-left:60px!important}.govuk-\!-f-80{font-size:53px!important;line-height:55px!important;font-size:80px!important;line-height:80px!important}.govuk-\!-f-48{font-size:32px!important;line-height:35px!important;font-size:48px!important;line-height:50px!important}.govuk-\!-f-36{font-size:24px!important;line-height:25px!important;font-size:36px!important;line-height:40px!important}.govuk-\!-f-27{font-size:18px!important;font-size:27px!important}.govuk-\!-f-24,.govuk-\!-f-27{line-height:20px!important;line-height:30px!important}.govuk-\!-f-24{font-size:18px!important;font-size:24px!important}.govuk-\!-f-19{font-size:16px!important;line-height:20px!important;font-size:19px!important;line-height:25px!important}.govuk-\!-f-16{font-size:14px!important;line-height:16px!important;font-size:16px!important;line-height:20px!important}.govuk-\!-f-14{font-size:12px!important;line-height:15px!important;font-size:14px!important;line-height:20px!important}.govuk-\!-w-regular{font-weight:400!important}.govuk-\!-w-bold{font-weight:700!important}.govuk-\!-width-three-quarters{width:100%!important;width:75%!important}.govuk-\!-width-two-thirds{width:100%!important;width:66.66%!important}.govuk-\!-width-one-half{width:100%!important;width:50%!important}.govuk-\!-width-one-third{width:100%!important;width:33.33%!important}.govuk-\!-width-one-quarter{width:100%!important;width:25%!important} \ No newline at end of file diff --git a/dist/govuk-frontend-ie8-0.0.32-alpha.min.css b/dist/govuk-frontend-ie8-0.0.32-alpha.min.css new file mode 100644 index 0000000000..df34d461cf --- /dev/null +++ b/dist/govuk-frontend-ie8-0.0.32-alpha.min.css @@ -0,0 +1,3 @@ +.govuk-link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} + +/*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */@font-face{font-family:nta;src:url(/assets/fonts/light-2c037cf7e1-v1.eot);src:url(/assets/fonts/light-2c037cf7e1-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-f38ad40456-v1.woff2) format("woff2"),url(/assets/fonts/light-458f8ea81c-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:nta;src:url(/assets/fonts/bold-fb2676462a-v1.eot);src:url(/assets/fonts/bold-fb2676462a-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-a2452cb66f-v1.woff2) format("woff2"),url(/assets/fonts/bold-f38c792ac2-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot);src:url(/assets/fonts/light-tabular-498ea8ffe2-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/light-tabular-851b10ccdd-v1.woff2) format("woff2"),url(/assets/fonts/light-tabular-62cc6f0a28-v1.woff) format("woff");font-weight:400;font-style:normal;font-display:fallback}@font-face{font-family:ntatabularnumbers;src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot);src:url(/assets/fonts/bold-tabular-357fdfbcc3-v1.eot?#iefix) format("embedded-opentype"),url(/assets/fonts/bold-tabular-b89238d840-v1.woff2) format("woff2"),url(/assets/fonts/bold-tabular-784c21afb8-v1.woff) format("woff");font-weight:700;font-style:normal;font-display:fallback}.govuk-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-link:link{color:#005ea5}.govuk-link:visited{color:#4c2c92}.govuk-link:active,.govuk-link:hover{color:#2b8cc4}.govuk-link--muted:active,.govuk-link--muted:hover,.govuk-link--muted:link,.govuk-link--muted:visited{color:#6f777b}.govuk-link--muted:focus,.govuk-link--muted:link:focus,.govuk-link--text-colour:active,.govuk-link--text-colour:focus,.govuk-link--text-colour:hover,.govuk-link--text-colour:link,.govuk-link--text-colour:link:focus,.govuk-link--text-colour:visited{color:#0b0c0c}.govuk-link--no-visited-state:visited{color:#005ea5}.govuk-list{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;margin-top:0;margin-bottom:15px;margin-bottom:20px;padding-left:0;list-style-type:none}.govuk-list .govuk-list{margin-top:10px}.govuk-list>li{margin-bottom:5px}.govuk-list a:link{color:#005ea5}.govuk-list a:visited{color:#4c2c92}.govuk-list a:active,.govuk-list a:hover{color:#2b8cc4}.govuk-list--bullet{padding-left:20px;list-style-type:disc}.govuk-list--number{padding-left:20px;list-style-type:decimal}.govuk-template{background-color:#dee0e2}.govuk-template__body{margin:0;background-color:#fff}.govuk-heading-xl{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:32px;line-height:35px;font-size:48px;line-height:50px;display:block;margin-top:0;margin-bottom:30px;margin-bottom:50px}.govuk-heading-l{font-size:24px;line-height:25px;font-size:36px;line-height:40px;margin-bottom:20px;margin-bottom:30px}.govuk-heading-l,.govuk-heading-m{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:block;margin-top:0}.govuk-heading-m{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:15px;margin-bottom:20px}.govuk-heading-s{color:#0b0c0c;font-weight:700;font-size:16px;line-height:20px;font-size:19px;line-height:25px;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-caption-xl,.govuk-heading-s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block}.govuk-caption-xl{font-weight:400;font-size:18px;line-height:20px;font-size:27px;line-height:30px;margin-bottom:5px;color:#6f777b}.govuk-caption-l{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:5px;margin-bottom:0}.govuk-caption-l,.govuk-caption-m{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;display:block;color:#6f777b}.govuk-caption-m{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-body-l,.govuk-body-lead{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:20px;margin-bottom:30px}.govuk-body,.govuk-body-l,.govuk-body-lead,.govuk-body-m{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;margin-top:0}.govuk-body,.govuk-body-m{font-size:16px;line-height:20px;font-size:19px;line-height:25px;margin-bottom:15px;margin-bottom:20px}.govuk-body-s{font-size:14px;line-height:16px;font-size:16px;line-height:20px}.govuk-body-s,.govuk-body-xs{color:#0b0c0c;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-body-xs{font-size:12px;line-height:15px;font-size:14px;line-height:20px}.govuk-body-l+.govuk-heading-l,.govuk-body-lead+.govuk-heading-l{padding-top:5px;padding-top:10px}.govuk-body+.govuk-heading-l,.govuk-body-m+.govuk-heading-l,.govuk-body-s+.govuk-heading-l,.govuk-list+.govuk-heading-l{padding-top:15px;padding-top:20px}.govuk-body+.govuk-heading-m,.govuk-body+.govuk-heading-s,.govuk-body-m+.govuk-heading-m,.govuk-body-m+.govuk-heading-s,.govuk-body-s+.govuk-heading-m,.govuk-body-s+.govuk-heading-s,.govuk-list+.govuk-heading-m,.govuk-list+.govuk-heading-s{padding-top:5px;padding-top:10px}.govuk-section-break{margin:0;border:0;height:0}.govuk-section-break--xl{margin-top:30px;margin-top:50px;margin-bottom:30px;margin-bottom:50px}.govuk-section-break--l{margin-top:20px;margin-top:30px;margin-bottom:20px;margin-bottom:30px}.govuk-section-break--m{margin-top:15px;margin-top:20px;margin-bottom:15px;margin-bottom:20px}.govuk-section-break--visible{border-bottom:1px solid #bfc1c3}.govuk-form-group{margin-bottom:20px;margin-bottom:30px}.govuk-form-group .govuk-form-group:last-of-type{margin-bottom:0}.govuk-form-group--error{padding-left:15px;border-left:5px solid #b10e1e}.govuk-form-group--error .govuk-form-group{padding:0;border:0}.govuk-grid-row{margin-right:-15px;margin-left:-15px}.govuk-grid-row:after{content:"";display:block;clear:both}.govuk-grid-column-one-quarter{width:100%;width:25%}.govuk-grid-column-one-quarter,.govuk-grid-column-one-third{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-one-third{width:100%;width:33.3333%}.govuk-grid-column-one-half{width:100%;width:50%}.govuk-grid-column-one-half,.govuk-grid-column-two-thirds{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-two-thirds{width:100%;width:66.6666%}.govuk-grid-column-three-quarters{width:100%;width:75%}.govuk-grid-column-full,.govuk-grid-column-three-quarters{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 15px;float:left}.govuk-grid-column-full{width:100%}.govuk-main-wrapper{padding-top:20px;padding-top:30px;padding-bottom:20px;padding-bottom:30px}.govuk-main-wrapper--l{padding-top:30px;padding-top:50px}.govuk-width-container{max-width:960px;width:960px;margin:0 15px;margin:0 30px}.govuk-back-link{font-size:14px;line-height:16px;font-size:16px;line-height:20px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;position:relative;margin-top:15px;margin-bottom:15px;padding-left:14px;border-bottom:1px solid #0b0c0c;text-decoration:none}.govuk-back-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-back-link:active,.govuk-back-link:focus,.govuk-back-link:hover,.govuk-back-link:link,.govuk-back-link:link:focus,.govuk-back-link:visited{color:#0b0c0c}.govuk-back-link:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 50%,100% 100%,100% 0);clip-path:polygon(0 50%,100% 100%,100% 0);border-width:5px 6px 5px 0;border-right-color:inherit;content:"";position:absolute;left:0;margin:auto}.govuk-back-link:before{top:-1px;bottom:1px}.govuk-breadcrumbs{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;color:#0b0c0c;margin-top:15px;margin-bottom:10px}.govuk-breadcrumbs__list{margin:0;padding:0;list-style-type:none}.govuk-breadcrumbs__list:after{content:"";display:block;clear:both}.govuk-breadcrumbs__list-item{display:inline-block;position:relative;margin-bottom:5px;margin-left:10px;padding-left:15.655px;float:left}.govuk-breadcrumbs__list-item:before{content:"";display:block;position:absolute;top:-1px;bottom:1px;left:-3.31px;width:7px;height:7px;margin:auto 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border:solid;border-width:1px 1px 0 0;border-color:#6f777b;content:"\003e";width:auto;height:auto;border:0;color:#6f777b;font-family:Arial,sans-serif}.govuk-breadcrumbs__list-item:first-child{margin-left:0;padding-left:0}.govuk-breadcrumbs__list-item:first-child:before{content:none;display:none}.govuk-breadcrumbs__link{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-breadcrumbs__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-breadcrumbs__link:active,.govuk-breadcrumbs__link:focus,.govuk-breadcrumbs__link:hover,.govuk-breadcrumbs__link:link,.govuk-breadcrumbs__link:link:focus,.govuk-breadcrumbs__link:visited{color:#0b0c0c}.govuk-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:19px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;position:relative;width:100%;margin-top:0;margin-bottom:22px;margin-bottom:32px;padding:7px 10px;border:2px solid transparent;border-radius:0;color:#fff;background-color:#00823b;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;text-align:center;vertical-align:top;cursor:pointer;-webkit-appearance:none;border-bottom:2px solid #003618;width:auto}.govuk-button:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-button:active,.govuk-button:hover,.govuk-button:link,.govuk-button:visited{color:#fff;text-decoration:none}.govuk-button:link:focus{color:#fff}.govuk-button:-moz-focus-inner{padding:0;border:0}.govuk-button:focus,.govuk-button:hover{background-color:#00692f}.govuk-button:active{top:2px;-webkit-box-shadow:none;box-shadow:none;border-bottom-width:0}.govuk-button:before{content:"";display:block;position:absolute;top:-2px;right:-2px;bottom:-4px;left:-2px;background:transparent}.govuk-button:active:before{top:-4px}.govuk-button--disabled,.govuk-button[disabled=disabled],.govuk-button[disabled]{filter:alpha(opacity=50);background:#00823b}.govuk-button--disabled:hover,.govuk-button[disabled=disabled]:hover,.govuk-button[disabled]:hover{background-color:#00823b;cursor:default}.govuk-button--disabled:focus,.govuk-button[disabled=disabled]:focus,.govuk-button[disabled]:focus{outline:none}.govuk-button--disabled:active,.govuk-button[disabled=disabled]:active,.govuk-button[disabled]:active{top:0;-webkit-box-shadow:0 2px 0 #003618;box-shadow:0 2px 0 #003618;border-bottom:2px solid #003618}.govuk-button--start{font-weight:700;font-size:18px;font-size:24px;line-height:1;min-height:auto;padding:8px 40px 8px 15px;background-image:url(/assets/images/icon-pointer.png);background-repeat:no-repeat;background-position:100% 50%}.govuk-button,.govuk-button--start{padding-top:9px;padding-bottom:6px}.govuk-error-message{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;margin-bottom:15px;clear:both;color:#b10e1e}.govuk-fieldset{margin:0;padding:0;border:0}.govuk-fieldset:after{content:"";display:block;clear:both}.govuk-fieldset__legend{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;-webkit-box-sizing:border-box;box-sizing:border-box;display:table;max-width:100%;margin-bottom:15px;padding:0;overflow:hidden;white-space:normal}.govuk-fieldset__legend--xl{font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-fieldset__legend--l,.govuk-fieldset__legend--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-fieldset__legend--l{font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-fieldset__legend--m{font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-fieldset__legend--m,.govuk-fieldset__legend--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-fieldset__legend--s{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-fieldset__heading{margin:0;font-size:inherit;font-weight:inherit}.govuk-hint{margin-bottom:15px;color:#6f777b}.govuk-hint,.govuk-label{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block}.govuk-label{color:#0b0c0c;margin-bottom:5px}.govuk-label--xl{font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-label--l,.govuk-label--xl{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;margin-bottom:15px}.govuk-label--l{font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-label--m{font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-bottom:10px}.govuk-label--m,.govuk-label--s{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700}.govuk-label--s{font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-label-wrapper{margin:0}.govuk-checkboxes__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}.govuk-checkboxes__item:last-child,.govuk-checkboxes__item:last-of-type{margin-bottom:0}.govuk-checkboxes__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer}.govuk-checkboxes__input:focus{outline:3px solid #ffbf47}.govuk-checkboxes__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-checkboxes__input+.govuk-checkboxes__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;background:transparent}.govuk-checkboxes__input+.govuk-checkboxes__label:after{content:"";position:absolute;top:11px;left:9px;width:18px;height:7px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);border:solid;border-width:0 0 5px 5px;border-top-color:transparent;filter:alpha(opacity=0);background:transparent}.govuk-checkboxes__input:focus+.govuk-checkboxes__label:before{-webkit-box-shadow:0 0 0 3px #ffbf47;box-shadow:0 0 0 3px #ffbf47}.govuk-checkboxes__input:checked+.govuk-checkboxes__label:after{filter:alpha(opacity=100)}.govuk-checkboxes__input:disabled,.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{cursor:default}.govuk-checkboxes__input:disabled+.govuk-checkboxes__label{filter:alpha(opacity=50)}.govuk-checkboxes__conditional{margin-bottom:15px;margin-bottom:20px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}.govuk-checkboxes__conditional[aria-hidden=true]{display:none}.govuk-checkboxes__conditional>:last-child{margin-bottom:0}.govuk-input{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;margin-top:0;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.govuk-input:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-input::-webkit-inner-spin-button,.govuk-input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.govuk-input[type=number]{-moz-appearance:textfield}.govuk-input--error{border:4px solid #b10e1e}.govuk-input--width-30{max-width:60ex}.govuk-input--width-20{max-width:41ex}.govuk-input--width-10{max-width:23ex}.govuk-date-input:after{content:"";display:block;clear:both}.govuk-date-input__item{width:50px;margin-right:20px;margin-bottom:0;float:left;clear:none}.govuk-date-input__label{display:block;padding-bottom:2px}.govuk-date-input__input{margin-bottom:0}.govuk-date-input__item--year{width:70px}.govuk-details{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;margin-bottom:20px;margin-bottom:30px;display:block}.govuk-details__summary{display:inline-block;position:relative;margin-bottom:5px;padding-left:25px;color:#005ea5;cursor:pointer}.govuk-details__summary-text{text-decoration:underline}.govuk-details__summary:hover{color:#2b8cc4}.govuk-details__summary:focus{outline:4px solid #ffbf47;outline-offset:-1px;background:#ffbf47}.govuk-details__summary::-webkit-details-marker{display:none}.govuk-details__summary:before{content:"";position:absolute;top:0;bottom:0;left:0;margin:auto;display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,100% 50%,0 100%);clip-path:polygon(0 0,100% 50%,0 100%);border-width:7px 0 7px 12.124px;border-left-color:inherit}.govuk-details[open]>.govuk-details__summary:before{display:block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:12.124px 7px 0;border-top-color:inherit}.govuk-details__text{padding:15px;padding-left:20px;border-left:5px solid #bfc1c3}.govuk-details__text p{margin-top:0;margin-bottom:20px}.govuk-details__text p:last-child{margin-bottom:0}.govuk-error-summary{color:#0b0c0c;padding:15px;padding:20px;margin-bottom:30px;margin-bottom:50px;border:4px solid #b10e1e;border:5px solid #b10e1e}.govuk-error-summary:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-error-summary__title{font-weight:700;font-size:18px;line-height:20px;font-size:24px;line-height:30px;margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-error-summary__body,.govuk-error-summary__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-error-summary__body{font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px}.govuk-error-summary__body p{margin-top:0;margin-bottom:15px;margin-bottom:20px}.govuk-error-summary__list{margin-top:0;margin-bottom:0}.govuk-error-summary__list a{font-weight:700}.govuk-error-summary__list a:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-error-summary__list a:active,.govuk-error-summary__list a:focus,.govuk-error-summary__list a:hover,.govuk-error-summary__list a:link,.govuk-error-summary__list a:visited{color:#b10e1e;text-decoration:underline}.govuk-error-summary__list a:link:focus{color:#b10e1e}.govuk-file-upload{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c}.govuk-file-upload:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-file-upload--error{border:4px solid #b10e1e}.govuk-footer{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;padding-top:25px;padding-top:40px;padding-bottom:15px;padding-bottom:25px;border-top:1px solid #a1acb2;color:#454a4c;background:#dee0e2}.govuk-footer__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-footer__link:link,.govuk-footer__link:visited{color:#454a4c}.govuk-footer__link:active,.govuk-footer__link:hover{color:#171819}.govuk-footer__link:focus,.govuk-footer__link:link:focus{color:#0b0c0c}.govuk-footer__section-break{margin:0;margin-bottom:30px;margin-bottom:50px;border:0;border-bottom:1px solid #bfc1c3}.govuk-footer__meta{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.govuk-footer__meta-item{margin-right:15px;margin-bottom:25px;margin-left:15px}.govuk-footer__meta-item--grow{-webkit-box-flex:1;-ms-flex:1;flex:1}.govuk-footer__licence-logo{display:inline-block;margin-right:10px;vertical-align:top}.govuk-footer__licence-description{display:inline-block}.govuk-footer__copyright-logo{display:inline-block;min-width:125px;padding-top:112px;background-image:url(/assets/images/govuk-crest.png);background-repeat:no-repeat;background-position:50% 0;background-size:125px 102px;text-align:center;text-decoration:none;white-space:nowrap}.govuk-footer__inline-list{margin-top:0;margin-bottom:15px;padding:0}.govuk-footer__inline-list-item{display:inline-block;margin-right:15px;margin-bottom:5px}.govuk-footer__heading{margin-bottom:25px;margin-bottom:40px;padding-bottom:20px;border-bottom:1px solid #bfc1c3}.govuk-footer__navigation{display:-webkit-box;display:-ms-flexbox;display:flex;margin-right:-15px;margin-left:-15px;-ms-flex-wrap:wrap;flex-wrap:wrap}.govuk-footer__section{display:inline-block;margin-right:15px;margin-bottom:30px;margin-left:15px;vertical-align:top;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.govuk-footer__section:first-child{-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2}.govuk-footer__list{margin:0;padding:0;list-style:none;-webkit-column-gap:30px;column-gap:30px}.govuk-footer__list--columns-2{-webkit-column-count:2;column-count:2}.govuk-footer__list--columns-3{-webkit-column-count:3;column-count:3}.govuk-footer__list-item{margin-bottom:15px;margin-bottom:20px}.govuk-footer__list-item:last-child{margin-bottom:0}.govuk-header{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;border-bottom:10px solid #fff;color:#fff;background:#0b0c0c}.govuk-header--full-width{padding:0 15px;border-color:#005ea5}.govuk-header__container{position:relative;margin-bottom:-10px;padding-top:10px;border-bottom:10px solid #005ea5}.govuk-header__logotype{margin-right:5px}.govuk-header__logotype-crown{margin-right:1px;fill:currentColor;vertical-align:middle}.govuk-header__logotype-crown-fallback-image{width:36px;height:32px;border:0;vertical-align:middle}.govuk-header__product-name{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-header__link{text-decoration:none}.govuk-header__link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-header__link:link,.govuk-header__link:visited{color:#fff}.govuk-header__link:hover{text-decoration:underline}.govuk-header__link:focus,.govuk-header__link:link:focus{color:#0b0c0c}.govuk-header__link--homepage{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;font-size:30px;line-height:30px}.govuk-header__link--homepage:link,.govuk-header__link--homepage:visited{margin-bottom:-1px;border-bottom:1px solid transparent;text-decoration:none}.govuk-header__link--homepage:active,.govuk-header__link--homepage:hover{border-bottom-color:currentColor}.govuk-header__link--service-name{display:inline-block;margin-bottom:10px;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:18px;line-height:20px;font-size:24px;line-height:30px}.govuk-header__logo{margin-bottom:10px;padding-right:50px;display:inline-block;width:33.33%;padding-right:0;vertical-align:top}.govuk-header__content{display:inline-block;width:66.66%}.govuk-header__menu-button{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;display:none;position:absolute;top:20px;right:0;margin:0;padding:0;border:0;color:#fff;background:none;top:15px}.govuk-header__menu-button:hover{text-decoration:underline}.govuk-header__menu-button:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(0 0,50% 100%,100% 0);clip-path:polygon(0 0,50% 100%,100% 0);border-width:8.66px 5px 0;border-top-color:inherit;content:"";margin-left:5px}.govuk-header__menu-button:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-header__menu-button--open:after{display:inline-block;width:0;height:0;border-style:solid;border-color:transparent;-webkit-clip-path:polygon(50% 0,0 100%,100% 100%);clip-path:polygon(50% 0,0 100%,100% 100%);border-width:0 5px 8.66px;border-bottom-color:inherit}.govuk-header__navigation{margin-bottom:10px;display:block;margin:0;padding:0;list-style:none}.js-enabled .govuk-header__menu-button,.js-enabled .govuk-header__navigation{display:block;display:none}.js-enabled .govuk-header__navigation--open{display:block}.govuk-header__navigation--end{margin:0;padding:5px 0;text-align:right}.govuk-header__navigation--no-service-name{padding-top:40px}.govuk-header__navigation-item{padding:10px 0;border-bottom:1px solid #2e3133;display:inline-block;margin-right:15px;padding:5px 0;border:0}.govuk-header__navigation-item a{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;line-height:16px;font-size:16px;line-height:20px;white-space:nowrap}.govuk-header__navigation-item--active a:hover,.govuk-header__navigation-item--active a:link,.govuk-header__navigation-item--active a:visited{color:#1d8feb}.govuk-header__navigation-item:last-child{margin-right:0}.govuk-header__logotype-crown,.govuk-header__logotype-crown-fallback-image{position:relative;top:-4px}.govuk-header{padding-top:3px}.govuk-inset-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;padding:15px;margin-top:20px;margin-top:30px;margin-bottom:20px;margin-bottom:30px;clear:both;border-left:10px solid #bfc1c3}.govuk-inset-text :first-child{margin-top:0}.govuk-inset-text :last-child,.govuk-inset-text :only-child{margin-bottom:0}.govuk-panel{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;-webkit-box-sizing:border-box;box-sizing:border-box;margin-bottom:15px;padding:35px;border:5px solid transparent;text-align:center}.govuk-panel--confirmation{color:#fff;background:#28a197}.govuk-panel__title{margin-top:0;margin-bottom:30px;font-weight:700;font-size:32px;line-height:35px;font-size:48px;line-height:50px}.govuk-panel__body,.govuk-panel__title{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.govuk-panel__body{font-weight:400;font-size:24px;line-height:25px;font-size:36px;line-height:40px}.govuk-tag{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;font-size:14px;font-size:16px;line-height:1.25;display:inline-block;padding:5px 8px 0;color:#fff;background-color:#005ea5;letter-spacing:1px;text-decoration:none;text-transform:uppercase}.govuk-tag--inactive{background-color:#6f777b}.govuk-phase-banner{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:14px;line-height:16px;font-size:16px;line-height:20px;color:#0b0c0c;padding-top:10px;padding-bottom:10px;border-bottom:1px solid #bfc1c3}.govuk-phase-banner__content{display:table;margin:0}.govuk-phase-banner__content__tag{margin-right:10px}.govuk-phase-banner__text{display:table-cell;vertical-align:baseline}.govuk-radios__item{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;display:block;position:relative;min-height:40px;margin-bottom:10px;padding:0 0 0 40px;clear:left}.govuk-radios__item:last-child,.govuk-radios__item:last-of-type{margin-bottom:0}.govuk-radios__input{position:absolute;z-index:1;top:0;left:0;width:40px;height:40px;cursor:pointer}.govuk-radios__input:focus{outline:3px solid #ffbf47}.govuk-radios__label{display:block;padding:8px 15px 5px;cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation}.govuk-radios__input+.govuk-radios__label:before{content:"";-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0;width:40px;height:40px;border:2px solid currentColor;border-radius:50%;background:transparent}.govuk-radios__input+.govuk-radios__label:after{content:"";position:absolute;top:10px;left:10px;width:0;height:0;border:10px solid currentColor;border-radius:50%;filter:alpha(opacity=0);background:currentColor}.govuk-radios__input:focus+.govuk-radios__label:before{-webkit-box-shadow:0 0 0 4px #ffbf47;box-shadow:0 0 0 4px #ffbf47}.govuk-radios__input:checked+.govuk-radios__label:after{filter:alpha(opacity=100)}.govuk-radios__input:disabled,.govuk-radios__input:disabled+.govuk-radios__label{cursor:default}.govuk-radios__input:disabled+.govuk-radios__label{filter:alpha(opacity=50)}.govuk-radios--inline:after{content:"";display:block;clear:both}.govuk-radios--inline .govuk-radios__item{margin-right:20px;float:left;clear:none}.govuk-radios__conditional{margin-bottom:15px;margin-bottom:20px;margin-left:18px;padding-left:33px;border-left:4px solid #bfc1c3}.govuk-radios__conditional[aria-hidden=true]{display:none}.govuk-radios__conditional>:last-child{margin-bottom:0}.govuk-select{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:40px;padding:5px;border:2px solid #0b0c0c}.govuk-select:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-select:focus::-ms-value,.govuk-select option:active,.govuk-select option:checked{color:#fff;background-color:#005ea5}.govuk-select--error{border:4px solid #b10e1e}.govuk-skip-link{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap;font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:14px;line-height:16px;font-size:16px;line-height:20px;display:block;padding:10px 15px}.govuk-skip-link:active,.govuk-skip-link:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-skip-link:focus{outline:3px solid #ffbf47;outline-offset:0;background-color:#ffbf47}.govuk-skip-link:active,.govuk-skip-link:focus,.govuk-skip-link:hover,.govuk-skip-link:link,.govuk-skip-link:link:focus,.govuk-skip-link:visited,.govuk-table{color:#0b0c0c}.govuk-table{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;width:100%;margin-bottom:20px;margin-bottom:30px;border-spacing:0;border-collapse:collapse}.govuk-table__header{font-weight:700}.govuk-table__cell,.govuk-table__header{padding:.52632em 1.05263em .52632em 0;border-bottom:1px solid #bfc1c3;text-align:left}.govuk-table__cell--numeric{font-family:ntatabularnumbers,nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400}.govuk-table__cell--numeric,.govuk-table__header--numeric{text-align:right}.govuk-table__cell:last-child,.govuk-table__header:last-child{padding-right:0}.govuk-table__caption{font-weight:700;display:table-caption;text-align:left}.govuk-textarea{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;font-size:19px;line-height:1.25;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%;margin-bottom:20px;margin-bottom:30px;padding:5px;border:2px solid #0b0c0c;border-radius:0;-webkit-appearance:none}.govuk-textarea:focus{outline:3px solid #ffbf47;outline-offset:0}.govuk-textarea--error{border:4px solid #b10e1e}.govuk-warning-text{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;font-size:16px;line-height:20px;font-size:19px;line-height:25px;color:#0b0c0c;position:relative;margin-bottom:20px;margin-bottom:30px;padding:10px 0}.govuk-warning-text__assistive{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0;white-space:nowrap}.govuk-warning-text__icon{font-family:nta,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:700;display:inline-block;position:absolute;top:50%;left:0;min-width:38px;min-height:35px;margin-top:-20px;padding-top:3px;border-radius:50%;color:#fff;background:#0b0c0c;font-size:1.6em;line-height:35px;text-align:center}.govuk-warning-text__text{display:block;margin-left:-15px;padding-left:65px}.govuk-clearfix:after{content:"";display:block;clear:both}.govuk-visually-hidden{padding:0;border:0}.govuk-visually-hidden,.govuk-visually-hidden-focussable{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);white-space:nowrap}.govuk-visually-hidden-focussable:active,.govuk-visually-hidden-focussable:focus{position:static;width:auto;height:auto;margin:inherit;overflow:visible;clip:auto;-webkit-clip-path:none;clip-path:none;white-space:inherit}.govuk-\!-display-inline{display:inline!important}.govuk-\!-display-inline-block{display:inline-block!important}.govuk-\!-display-block{display:block!important}.govuk-\!-margin-0{margin:0!important}.govuk-\!-margin-top-0{margin-top:0!important}.govuk-\!-margin-right-0{margin-right:0!important}.govuk-\!-margin-bottom-0{margin-bottom:0!important}.govuk-\!-margin-left-0{margin-left:0!important}.govuk-\!-margin-1{margin:5px!important}.govuk-\!-margin-top-1{margin-top:5px!important}.govuk-\!-margin-right-1{margin-right:5px!important}.govuk-\!-margin-bottom-1{margin-bottom:5px!important}.govuk-\!-margin-left-1{margin-left:5px!important}.govuk-\!-margin-2{margin:10px!important}.govuk-\!-margin-top-2{margin-top:10px!important}.govuk-\!-margin-right-2{margin-right:10px!important}.govuk-\!-margin-bottom-2{margin-bottom:10px!important}.govuk-\!-margin-left-2{margin-left:10px!important}.govuk-\!-margin-3{margin:15px!important}.govuk-\!-margin-top-3{margin-top:15px!important}.govuk-\!-margin-right-3{margin-right:15px!important}.govuk-\!-margin-bottom-3{margin-bottom:15px!important}.govuk-\!-margin-left-3{margin-left:15px!important}.govuk-\!-margin-4{margin:15px!important;margin:20px!important}.govuk-\!-margin-top-4{margin-top:15px!important;margin-top:20px!important}.govuk-\!-margin-right-4{margin-right:15px!important;margin-right:20px!important}.govuk-\!-margin-bottom-4{margin-bottom:15px!important;margin-bottom:20px!important}.govuk-\!-margin-left-4{margin-left:15px!important;margin-left:20px!important}.govuk-\!-margin-5{margin:15px!important;margin:25px!important}.govuk-\!-margin-top-5{margin-top:15px!important;margin-top:25px!important}.govuk-\!-margin-right-5{margin-right:15px!important;margin-right:25px!important}.govuk-\!-margin-bottom-5{margin-bottom:15px!important;margin-bottom:25px!important}.govuk-\!-margin-left-5{margin-left:15px!important;margin-left:25px!important}.govuk-\!-margin-6{margin:20px!important;margin:30px!important}.govuk-\!-margin-top-6{margin-top:20px!important;margin-top:30px!important}.govuk-\!-margin-right-6{margin-right:20px!important;margin-right:30px!important}.govuk-\!-margin-bottom-6{margin-bottom:20px!important;margin-bottom:30px!important}.govuk-\!-margin-left-6{margin-left:20px!important;margin-left:30px!important}.govuk-\!-margin-7{margin:25px!important;margin:40px!important}.govuk-\!-margin-top-7{margin-top:25px!important;margin-top:40px!important}.govuk-\!-margin-right-7{margin-right:25px!important;margin-right:40px!important}.govuk-\!-margin-bottom-7{margin-bottom:25px!important;margin-bottom:40px!important}.govuk-\!-margin-left-7{margin-left:25px!important;margin-left:40px!important}.govuk-\!-margin-8{margin:30px!important;margin:50px!important}.govuk-\!-margin-top-8{margin-top:30px!important;margin-top:50px!important}.govuk-\!-margin-right-8{margin-right:30px!important;margin-right:50px!important}.govuk-\!-margin-bottom-8{margin-bottom:30px!important;margin-bottom:50px!important}.govuk-\!-margin-left-8{margin-left:30px!important;margin-left:50px!important}.govuk-\!-margin-9{margin:40px!important;margin:60px!important}.govuk-\!-margin-top-9{margin-top:40px!important;margin-top:60px!important}.govuk-\!-margin-right-9{margin-right:40px!important;margin-right:60px!important}.govuk-\!-margin-bottom-9{margin-bottom:40px!important;margin-bottom:60px!important}.govuk-\!-margin-left-9{margin-left:40px!important;margin-left:60px!important}.govuk-\!-padding-0{padding:0!important}.govuk-\!-padding-top-0{padding-top:0!important}.govuk-\!-padding-right-0{padding-right:0!important}.govuk-\!-padding-bottom-0{padding-bottom:0!important}.govuk-\!-padding-left-0{padding-left:0!important}.govuk-\!-padding-1{padding:5px!important}.govuk-\!-padding-top-1{padding-top:5px!important}.govuk-\!-padding-right-1{padding-right:5px!important}.govuk-\!-padding-bottom-1{padding-bottom:5px!important}.govuk-\!-padding-left-1{padding-left:5px!important}.govuk-\!-padding-2{padding:10px!important}.govuk-\!-padding-top-2{padding-top:10px!important}.govuk-\!-padding-right-2{padding-right:10px!important}.govuk-\!-padding-bottom-2{padding-bottom:10px!important}.govuk-\!-padding-left-2{padding-left:10px!important}.govuk-\!-padding-3{padding:15px!important}.govuk-\!-padding-top-3{padding-top:15px!important}.govuk-\!-padding-right-3{padding-right:15px!important}.govuk-\!-padding-bottom-3{padding-bottom:15px!important}.govuk-\!-padding-left-3{padding-left:15px!important}.govuk-\!-padding-4{padding:15px!important;padding:20px!important}.govuk-\!-padding-top-4{padding-top:15px!important;padding-top:20px!important}.govuk-\!-padding-right-4{padding-right:15px!important;padding-right:20px!important}.govuk-\!-padding-bottom-4{padding-bottom:15px!important;padding-bottom:20px!important}.govuk-\!-padding-left-4{padding-left:15px!important;padding-left:20px!important}.govuk-\!-padding-5{padding:15px!important;padding:25px!important}.govuk-\!-padding-top-5{padding-top:15px!important;padding-top:25px!important}.govuk-\!-padding-right-5{padding-right:15px!important;padding-right:25px!important}.govuk-\!-padding-bottom-5{padding-bottom:15px!important;padding-bottom:25px!important}.govuk-\!-padding-left-5{padding-left:15px!important;padding-left:25px!important}.govuk-\!-padding-6{padding:20px!important;padding:30px!important}.govuk-\!-padding-top-6{padding-top:20px!important;padding-top:30px!important}.govuk-\!-padding-right-6{padding-right:20px!important;padding-right:30px!important}.govuk-\!-padding-bottom-6{padding-bottom:20px!important;padding-bottom:30px!important}.govuk-\!-padding-left-6{padding-left:20px!important;padding-left:30px!important}.govuk-\!-padding-7{padding:25px!important;padding:40px!important}.govuk-\!-padding-top-7{padding-top:25px!important;padding-top:40px!important}.govuk-\!-padding-right-7{padding-right:25px!important;padding-right:40px!important}.govuk-\!-padding-bottom-7{padding-bottom:25px!important;padding-bottom:40px!important}.govuk-\!-padding-left-7{padding-left:25px!important;padding-left:40px!important}.govuk-\!-padding-8{padding:30px!important;padding:50px!important}.govuk-\!-padding-top-8{padding-top:30px!important;padding-top:50px!important}.govuk-\!-padding-right-8{padding-right:30px!important;padding-right:50px!important}.govuk-\!-padding-bottom-8{padding-bottom:30px!important;padding-bottom:50px!important}.govuk-\!-padding-left-8{padding-left:30px!important;padding-left:50px!important}.govuk-\!-padding-9{padding:40px!important;padding:60px!important}.govuk-\!-padding-top-9{padding-top:40px!important;padding-top:60px!important}.govuk-\!-padding-right-9{padding-right:40px!important;padding-right:60px!important}.govuk-\!-padding-bottom-9{padding-bottom:40px!important;padding-bottom:60px!important}.govuk-\!-padding-left-9{padding-left:40px!important;padding-left:60px!important}.govuk-\!-font-size-80{font-size:53px!important;line-height:55px!important;font-size:80px!important;line-height:80px!important}.govuk-\!-font-size-48{font-size:32px!important;line-height:35px!important;font-size:48px!important;line-height:50px!important}.govuk-\!-font-size-36{font-size:24px!important;line-height:25px!important;font-size:36px!important;line-height:40px!important}.govuk-\!-font-size-27{font-size:18px!important;font-size:27px!important}.govuk-\!-font-size-24,.govuk-\!-font-size-27{line-height:20px!important;line-height:30px!important}.govuk-\!-font-size-24{font-size:18px!important;font-size:24px!important}.govuk-\!-font-size-19{font-size:16px!important;line-height:20px!important;font-size:19px!important;line-height:25px!important}.govuk-\!-font-size-16{font-size:14px!important;line-height:16px!important;font-size:16px!important;line-height:20px!important}.govuk-\!-font-size-14{font-size:12px!important;line-height:15px!important;font-size:14px!important;line-height:20px!important}.govuk-\!-font-weight-regular{font-weight:400!important}.govuk-\!-font-weight-bold{font-weight:700!important}.govuk-\!-width-three-quarters{width:100%!important;width:75%!important}.govuk-\!-width-two-thirds{width:100%!important;width:66.66%!important}.govuk-\!-width-one-half{width:100%!important;width:50%!important}.govuk-\!-width-one-third{width:100%!important;width:33.33%!important}.govuk-\!-width-one-quarter{width:100%!important;width:25%!important} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 38ee70a337..0f2566f262 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + "integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=" }, "accepts": { "version": "1.3.4", @@ -235,7 +235,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "requires": { "color-convert": "1.9.1" } @@ -249,7 +249,7 @@ "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", "dev": true, "optional": true, "requires": { @@ -404,7 +404,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=" }, "arr-union": { "version": "3.1.0", @@ -1924,13 +1924,13 @@ "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", "dev": true }, "clap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", + "integrity": "sha1-TzZ0WzIAhJJVf0ZBLWbVDLmbzlE=", "dev": true, "requires": { "chalk": "1.1.3" @@ -2334,7 +2334,7 @@ "cosmiconfig": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz", - "integrity": "sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==", + "integrity": "sha1-YXPOvVb6wELB9DkO33r2wHx8uJI=", "dev": true, "requires": { "is-directory": "0.3.1", @@ -2528,7 +2528,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -2676,7 +2676,7 @@ "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { "ms": "2.0.0" @@ -2789,7 +2789,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -3206,7 +3206,7 @@ "escodegen": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", - "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "integrity": "sha1-mBGi8mXcHNOJRCDuNxcGS2MriFI=", "dev": true, "requires": { "esprima": "3.1.3", @@ -3343,7 +3343,7 @@ "eslint-config-standard-jsx": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz", - "integrity": "sha512-F8fRh2WFnTek7dZH9ZaE0PCBwdVGkwVWZmizla/DDNOmg7Tx6B/IlK5+oYpiX29jpu73LszeJj5i1axEZv6VMw==", + "integrity": "sha1-AJ5TxN2x6e5wtGUP/mOn85+INuE=", "dev": true }, "eslint-import-resolver-node": { @@ -3360,7 +3360,7 @@ "eslint-module-utils": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", - "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "integrity": "sha1-q67IJBd2E7ipWymWOeG2+s9HNEk=", "dev": true, "requires": { "debug": "2.6.9", @@ -3388,7 +3388,7 @@ "eslint-plugin-node": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-4.2.3.tgz", - "integrity": "sha512-vIUQPuwbVYdz/CYnlTLsJrRy7iXHQjdEe5wz0XhhdTym3IInM/zZLlPf9nZ2mThsH0QcsieCOWs2vOeCy/22LQ==", + "integrity": "sha1-wEOQq428u2iHF0Aj1vOnJ2nmO5c=", "dev": true, "requires": { "ignore": "3.3.7", @@ -3545,7 +3545,7 @@ "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "integrity": "sha1-Yi4y6CSItJJ5EUpPns9F581rulU=", "requires": { "pseudomap": "1.0.2", "yallist": "2.1.2" @@ -4005,7 +4005,7 @@ "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "integrity": "sha1-q8/Iunb3CMQql7PWhbfpRQv7nOQ=", "dev": true }, "find-up": { @@ -4730,7 +4730,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", "dev": true }, "gauge": { @@ -4782,7 +4782,7 @@ "get-own-enumerable-property-symbols": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", - "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==", + "integrity": "sha1-XErYfyg0xLm06EVJ3B4GUPs4wks=", "dev": true }, "get-stdin": { @@ -4991,7 +4991,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "globby": { @@ -5011,7 +5011,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -5637,7 +5637,7 @@ "gulp-sass-lint": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/gulp-sass-lint/-/gulp-sass-lint-1.3.4.tgz", - "integrity": "sha512-HjRwdVueJOQKV0+wVT3Ld5HFRk9fELXIHllQPS4cU9C2SC9RKIfExT7/RLDegZ2cQXeFRkVii4GFw4WnzV+epQ==", + "integrity": "sha1-qZUMLdBQ/QD78uvAYwFkNKIhAOI=", "dev": true, "requires": { "gulp-util": "3.0.8", @@ -6059,7 +6059,7 @@ "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=", "dev": true }, "html-comment-regex": { @@ -6179,7 +6179,7 @@ "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "integrity": "sha1-90aPYBNfXl2tM5nAqBvpoWA6CCs=", "dev": true }, "ignore": { @@ -6610,7 +6610,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", "dev": true, "requires": { "isobject": "3.0.1" @@ -9216,7 +9216,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "1.1.9" } @@ -10355,7 +10355,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "2.5.0", @@ -10462,7 +10462,7 @@ "nwmatcher": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.3.tgz", - "integrity": "sha512-IKdSTiDWCarf2JTS5e9e2+5tPZGdkRJ79XjYV0pzK8Q9BpsFyBq1RGKxzs7Q8UBushGw7m6TzVKz6fcY99iSWw==", + "integrity": "sha1-ZDSOOz2A8DW0CsEVY9J4+LctuJw=", "dev": true }, "oauth-sign": { @@ -10694,7 +10694,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11148,7 +11148,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11400,7 +11400,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11473,7 +11473,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11545,7 +11545,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11616,7 +11616,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11687,7 +11687,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11758,7 +11758,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11829,7 +11829,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -11901,7 +11901,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12077,7 +12077,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12148,7 +12148,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12233,7 +12233,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12312,7 +12312,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12384,7 +12384,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12458,7 +12458,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12532,7 +12532,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12603,7 +12603,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12677,7 +12677,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12749,7 +12749,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12820,7 +12820,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12891,7 +12891,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -12963,7 +12963,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13034,7 +13034,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13107,7 +13107,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13200,7 +13200,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13273,7 +13273,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13345,7 +13345,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13417,7 +13417,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13500,7 +13500,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13582,7 +13582,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13654,7 +13654,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13726,7 +13726,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -13816,7 +13816,7 @@ "postcss": { "version": "5.2.18", "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "integrity": "sha1-ut+hSX1GJE9jkPWLMZgw2RB4U8U=", "dev": true, "requires": { "chalk": "1.1.3", @@ -14065,7 +14065,7 @@ "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -14188,7 +14188,7 @@ "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", "requires": { "is-equal-shallow": "0.1.3" } @@ -14406,7 +14406,7 @@ "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", "requires": { "glob": "7.1.2" }, @@ -14414,7 +14414,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -14494,7 +14494,7 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" }, "safe-regex": { "version": "1.1.0", @@ -15688,7 +15688,7 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", "dev": true }, "scss-comment-parser": { @@ -15749,7 +15749,7 @@ "send": { "version": "0.16.1", "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", - "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "integrity": "sha1-pw4coh0TgsEdDZ9iMd6ygQgNerM=", "dev": true, "requires": { "debug": "2.6.9", @@ -15776,7 +15776,7 @@ "serve-static": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", - "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", + "integrity": "sha1-TFfVNASnYdjy58HooYpH2/J4pxk=", "dev": true, "requires": { "encodeurl": "1.0.2", @@ -16014,7 +16014,7 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" }, "source-map-resolve": { "version": "0.5.1", @@ -16141,7 +16141,7 @@ "standard": { "version": "10.0.3", "resolved": "https://registry.npmjs.org/standard/-/standard-10.0.3.tgz", - "integrity": "sha512-JURZ+85ExKLQULckDFijdX5WHzN6RC7fgiZNSV4jFQVo+3tPoQGHyBrGekye/yf0aOfb4210EM5qPNlc2cRh4w==", + "integrity": "sha1-eGm8v0Ir3uqraJof+x/qlnfdUOo=", "dev": true, "requires": { "eslint": "3.19.0", @@ -16239,7 +16239,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -16491,7 +16491,7 @@ "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", "requires": { "safe-buffer": "5.1.1" } @@ -16737,7 +16737,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "2.0.0", @@ -17152,7 +17152,7 @@ "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=", "dev": true, "requires": { "nopt": "1.0.10" @@ -17860,7 +17860,7 @@ "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", "requires": { "isexe": "2.0.0" } @@ -18076,7 +18076,7 @@ "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=", "dev": true, "requires": { "execa": "0.7.0", @@ -18117,7 +18117,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { "is-fullwidth-code-point": "2.0.0", diff --git a/package/all.js b/package/all.js index 5647cc69a9..44caa40054 100644 --- a/package/all.js +++ b/package/all.js @@ -1,73 +1,9 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define('all', ['exports'], factory) : - (factory((global.all = {}))); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) : + (factory((global.GOVUKFrontend = {}))); }(this, (function (exports) { 'use strict'; -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function addEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.addEventListener) { - node.addEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.attachEvent) { - node.attachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} - -/** -* Remove event utility for modern browsers or IE8 -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function removeEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.removeEventListener) { - node.removeEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.detachEvent) { - node.detachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} - -/** -* Cross-browser character code / key pressed -* @param {object} event event -* @returns {number} character code -*/ -function charCode (event) { - return (typeof event.which === 'number') ? event.which : event.keyCode -} - -/** -* Cross-browser preventing default action -* @param {object} event event -*/ -function preventDefault (event) { - // Support: IE9+ and other browsers - if (event.preventDefault) { - event.preventDefault(); - // Support: IE8 - } else { - event.returnValue = false; - } -} - /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill * This seems to fail in IE8, requires more investigation. @@ -82,45 +18,181 @@ function nodeListForEach (nodes, callback) { } } -/** - * JavaScript 'shim' to trigger the click event of element(s) when the space key is pressed. - * - * Created since some Assistive Technologies (for example some Screenreaders) - * will tell a user to press space on a 'button', so this functionality needs to be shimmed - * See https://github.com/alphagov/govuk_elements/pull/272#issuecomment-233028270 - * - * Usage instructions: - * the 'shim' will be automatically initialised - */ +// Used to generate a unique string, allows multiple instances of the component without +// Them conflicting with each other. +// https://stackoverflow.com/a/8809472 +function generateUniqueID () { + var d = new Date().getTime(); + if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') { + d += window.performance.now(); // use high-precision timer if available + } + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16) + }) +} -var KEY_SPACE = 32; +(function(undefined) { -function Button () { } +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js +var detect = ('Window' in this); -/** -* Add event handler for KeyDown -* if the event target element has a role='button' and the event is key space pressed -* then it prevents the default event and triggers a click event -* @param {object} event event -*/ -Button.prototype.handleKeyDown = function (event) { - // get the target element - var target = event.target || event.srcElement; - // if the element has a role='button' and the pressed key is a space, we'll simulate a click - if (target.getAttribute('role') === 'button' && charCode(event) === KEY_SPACE) { - preventDefault(event); - // trigger the target's click event - target.click(); - } -}; +if (detect) return -/** -* Initialise an event listener for keydown at document level -* this will help listening for later inserted elements with a role="button" -*/ -Button.prototype.init = function () { - addEvent(document, 'keydown', this.handleKeyDown); -}; +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + (function (global) { + if (global.constructor) { + global.Window = global.constructor; + } else { + (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this; + } + }(this)); +} + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js +var detect = ("Document" in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + + if (this.HTMLDocument) { // IE8 + + // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. + this.Document = this.HTMLDocument; + + } else { + + // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. + this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); + this.Document.prototype = document; + } +} + + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js +var detect = ('Element' in this && 'HTMLElement' in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always +(function () { + + // IE8 + if (window.Element && !window.HTMLElement) { + window.HTMLElement = window.Element; + return; + } + + // create Element constructor + window.Element = window.HTMLElement = new Function('return function Element() {}')(); + + // generate sandboxed iframe + var vbody = document.appendChild(document.createElement('body')); + var frame = vbody.appendChild(document.createElement('iframe')); + + // use sandboxed iframe to replicate Element functionality + var frameDocument = frame.contentWindow.document; + var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); + var cache = {}; + + // polyfill Element.prototype on an element + var shiv = function (element, deep) { + var + childNodes = element.childNodes || [], + index = -1, + key, value, childNode; + + if (element.nodeType === 1 && element.constructor !== Element) { + element.constructor = Element; + + for (key in cache) { + value = cache[key]; + element[key] = value; + } + } + + while (childNode = deep && childNodes[++index]) { + shiv(childNode, deep); + } + + return element; + }; + + var elements = document.getElementsByTagName('*'); + var nativeCreateElement = document.createElement; + var interval; + var loopLimit = 100; + + prototype.attachEvent('onpropertychange', function (event) { + var + propertyName = event.propertyName, + nonValue = !cache.hasOwnProperty(propertyName), + newValue = prototype[propertyName], + oldValue = cache[propertyName], + index = -1, + element; + + while (element = elements[++index]) { + if (element.nodeType === 1) { + if (nonValue || element[propertyName] === oldValue) { + element[propertyName] = newValue; + } + } + } + + cache[propertyName] = newValue; + }); + + prototype.constructor = Element; + + if (!prototype.hasAttribute) { + // .hasAttribute + prototype.hasAttribute = function hasAttribute(name) { + return this.getAttribute(name) !== null; + }; + } + + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck() { + if (!(loopLimit--)) clearTimeout(interval); + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck()) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 25); + } + + // Apply to any new elements created after load + document.createElement = function createElement(nodeName) { + var element = nativeCreateElement(String(nodeName).toLowerCase()); + return shiv(element); + }; + + // remove sandboxed iframe + document.removeChild(vbody); +}()); + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); (function(undefined) { @@ -210,774 +282,604 @@ if (detect) return .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); (function(undefined) { - // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js - var detect = 'bind' in Function.prototype; - if (detect) return +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js +var detect = ( + (function(global) { - // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always - Object.defineProperty(Function.prototype, 'bind', { - value: function bind(that) { // .length is 1 - // add necessary es5-shim utilities - var $Array = Array; - var $Object = Object; - var ObjectPrototype = $Object.prototype; - var ArrayPrototype = $Array.prototype; - var Empty = function Empty() {}; - var to_string = ObjectPrototype.toString; - var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; - var array_slice = ArrayPrototype.slice; - var array_concat = ArrayPrototype.concat; - var array_push = ArrayPrototype.push; - var max = Math.max; - // /add necessary es5-shim utilities + if (!('Event' in global)) return false; + if (typeof global.Event === 'function') return true; - // 1. Let Target be the this value. - var target = this; - // 2. If IsCallable(Target) is false, throw a TypeError exception. - if (!isCallable(target)) { - throw new TypeError('Function.prototype.bind called on incompatible ' + target); - } - // 3. Let A be a new (possibly empty) internal list of all of the - // argument values provided after thisArg (arg1, arg2 etc), in order. - // XXX slicedArgs will stand in for "A" if used - var args = array_slice.call(arguments, 1); // for normal call - // 4. Let F be a new native ECMAScript object. - // 11. Set the [[Prototype]] internal property of F to the standard - // built-in Function prototype object as specified in 15.3.3.1. - // 12. Set the [[Call]] internal property of F as described in - // 15.3.4.5.1. - // 13. Set the [[Construct]] internal property of F as described in - // 15.3.4.5.2. - // 14. Set the [[HasInstance]] internal property of F as described in - // 15.3.4.5.3. - var bound; - var binder = function () { - - if (this instanceof bound) { - // 15.3.4.5.2 [[Construct]] - // When the [[Construct]] internal method of a function object, - // F that was created using the bind function is called with a - // list of arguments ExtraArgs, the following steps are taken: - // 1. Let target be the value of F's [[TargetFunction]] - // internal property. - // 2. If target has no [[Construct]] internal method, a - // TypeError exception is thrown. - // 3. Let boundArgs be the value of F's [[BoundArgs]] internal - // property. - // 4. Let args be a new list containing the same values as the - // list boundArgs in the same order followed by the same - // values as the list ExtraArgs in the same order. - // 5. Return the result of calling the [[Construct]] internal - // method of target providing args as the arguments. - - var result = target.apply( - this, - array_concat.call(args, array_slice.call(arguments)) - ); - if ($Object(result) === result) { - return result; - } - return this; - - } else { - // 15.3.4.5.1 [[Call]] - // When the [[Call]] internal method of a function object, F, - // which was created using the bind function is called with a - // this value and a list of arguments ExtraArgs, the following - // steps are taken: - // 1. Let boundArgs be the value of F's [[BoundArgs]] internal - // property. - // 2. Let boundThis be the value of F's [[BoundThis]] internal - // property. - // 3. Let target be the value of F's [[TargetFunction]] internal - // property. - // 4. Let args be a new list containing the same values as the - // list boundArgs in the same order followed by the same - // values as the list ExtraArgs in the same order. - // 5. Return the result of calling the [[Call]] internal method - // of target providing boundThis as the this value and - // providing args as the arguments. - - // equiv: target.call(this, ...boundArgs, ...args) - return target.apply( - that, - array_concat.call(args, array_slice.call(arguments)) - ); - - } - - }; - - // 15. If the [[Class]] internal property of Target is "Function", then - // a. Let L be the length property of Target minus the length of A. - // b. Set the length own property of F to either 0 or L, whichever is - // larger. - // 16. Else set the length own property of F to 0. - - var boundLength = max(0, target.length - args.length); - - // 17. Set the attributes of the length own property of F to the values - // specified in 15.3.5.1. - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - array_push.call(boundArgs, '$' + i); - } - - // XXX Build a dynamic function with desired amount of arguments is the only - // way to set the length property of a function. - // In environments where Content Security Policies enabled (Chrome extensions, - // for ex.) all use of eval or Function costructor throws an exception. - // However in all of these environments Function.prototype.bind exists - // and so this code will never be executed. - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder); - - if (target.prototype) { - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - // Clean up dangling references. - Empty.prototype = null; - } - - // TODO - // 18. Set the [[Extensible]] internal property of F to true. - - // TODO - // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). - // 20. Call the [[DefineOwnProperty]] internal method of F with - // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: - // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and - // false. - // 21. Call the [[DefineOwnProperty]] internal method of F with - // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, - // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, - // and false. - - // TODO - // NOTE Function objects created using Function.prototype.bind do not - // have a prototype property or the [[Code]], [[FormalParameters]], and - // [[Scope]] internal properties. - // XXX can't delete prototype in pure-js. - - // 22. Return F. - return bound; - } - }); -}) -.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - -/** - * JavaScript 'polyfill' for HTML5's
and elements - * and 'shim' to add accessiblity enhancements for all browsers - * - * http://caniuse.com/#feat=details - * - * Usage instructions: - * the 'polyfill' will be automatically initialised - */ - -var KEY_ENTER = 13; -var KEY_SPACE$1 = 32; - -// Create a flag to know if the browser supports navtive details -var NATIVE_DETAILS = typeof document.createElement('details').open === 'boolean'; - -function Details () { - // Create a flag so we can prevent the initialisation - // function firing from both DOMContentLoaded and window.onload - this.INITIALISED = false; -} - -/** -* Handle cross-modal click events -* @param {object} node element -* @param {function} callback function -*/ -Details.prototype.handleKeyDown = function (node, callback) { - addEvent(node, 'keypress', function (event, target) { - // When the key gets pressed - check if it is enter or space - if (charCode(event) === KEY_ENTER || charCode(event) === KEY_SPACE$1) { - if (target.nodeName.toLowerCase() === 'summary') { - // Prevent space from scrolling the page - // and enter from submitting a form - preventDefault(event); - // Click to let the click event do all the necessary action - if (target.click) { - target.click(); - } else { - // except Safari 5.1 and under don't support .click() here - callback(event, target); - } - } - } - }); - - // Prevent keyup to prevent clicking twice in Firefox when using space key - addEvent(node, 'keyup', function (event, target) { - if (charCode(event) === KEY_SPACE$1) { - if (target.nodeName.toLowerCase() === 'summary') { - preventDefault(event); - } - } - }); - - addEvent(node, 'click', function (event, target) { - callback(event, target); - }); -}; - -/** -* Get the nearest ancestor element of a node that matches a given tag name -* @param {object} node element -* @param {string} match tag name (e.g. div) -*/ -Details.prototype.getAncestor = function (node, match) { - do { - if (!node || node.nodeName.toLowerCase() === match) { - break - } - node = node.parentNode; - } while (node) - - return node -}; - -/** -* Initialise the script on a list of details elements in a container -* @param {object} list of details elements -* @param {string} container where to look for details elements -*/ -Details.prototype.initDetails = function (list, container) { - container = container || document.body; - // If this has already happened, just return - // else set the flag so it doesn't happen again - if (this.INITIALISED) { - return - } - this.INITIALISED = true; - // Get the collection of details elements, but if that's empty - // then we don't need to bother with the rest of the scripting - if ((list = container.getElementsByTagName('details')).length === 0) { - return - } - // else iterate through them to apply their initial state - var n = list.length; - var i = 0; - for (i; i < n; i++) { - var details = list[i]; - - // Save shortcuts to the inner summary and content elements - details.__summary = details.getElementsByTagName('summary').item(0); - details.__content = details.getElementsByTagName('div').item(0); - - // If
doesn't have a and a
representing the content - // it means the required HTML structure is not met so the script will stop - if (!details.__summary || !details.__content) { - return - } - - // If the content doesn't have an ID, assign it one now - // which we'll need for the summary's aria-controls assignment - if (!details.__content.id) { - details.__content.id = 'details-content-' + i; - } - - // Add ARIA role="group" to details - details.setAttribute('role', 'group'); - - // Add role=button to summary - details.__summary.setAttribute('role', 'button'); - - // Add aria-controls - details.__summary.setAttribute('aria-controls', details.__content.id); - - // Set tabIndex so the summary is keyboard accessible for non-native elements - // http://www.saliences.com/browserBugs/tabIndex.html - if (!NATIVE_DETAILS) { - details.__summary.tabIndex = 0; - } - - // Detect initial open state - var openAttr = details.getAttribute('open') !== null; - if (openAttr === true) { - details.__summary.setAttribute('aria-expanded', 'true'); - details.__content.setAttribute('aria-hidden', 'false'); - } else { - details.__summary.setAttribute('aria-expanded', 'false'); - details.__content.setAttribute('aria-hidden', 'true'); - if (!NATIVE_DETAILS) { - details.__content.style.display = 'none'; - } - } - - // Create a circular reference from the summary back to its - // parent details element, for convenience in the click handler - details.__summary.__details = details; - } + try { - // Bind an event to handle summary elements - this.handleKeyDown(container, function (event, summary) { - if (!(summary = this.getAncestor(summary, 'summary'))) { - return true - } - return this.stateChange(summary) - }.bind(this)); -}; + // In IE 9-11, the Event object exists but cannot be instantiated + new Event('click'); + return true; + } catch(e) { + return false; + } + }(this)) +); -/** -* Define a statechange function that updates aria-expanded and style.display -* @param {object} summary element -*/ -Details.prototype.stateChange = function (summary) { - var expanded = summary.__details.__summary.getAttribute('aria-expanded') === 'true'; - var hidden = summary.__details.__content.getAttribute('aria-hidden') === 'true'; +if (detect) return - summary.__details.__summary.setAttribute('aria-expanded', (expanded ? 'false' : 'true')); - summary.__details.__content.setAttribute('aria-hidden', (hidden ? 'false' : 'true')); +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always +(function () { + var unlistenableWindowEvents = { + click: 1, + dblclick: 1, + keyup: 1, + keypress: 1, + keydown: 1, + mousedown: 1, + mouseup: 1, + mousemove: 1, + mouseover: 1, + mouseenter: 1, + mouseleave: 1, + mouseout: 1, + storage: 1, + storagecommit: 1, + textinput: 1 + }; - if (!NATIVE_DETAILS) { - summary.__details.__content.style.display = (expanded ? 'none' : ''); + // This polyfill depends on availability of `document` so will not run in a worker + // However, we asssume there are no browsers with worker support that lack proper + // support for `Event` within the worker + if (typeof document === 'undefined' || typeof window === 'undefined') return; - var hasOpenAttr = summary.__details.getAttribute('open') !== null; - if (!hasOpenAttr) { - summary.__details.setAttribute('open', 'open'); - } else { - summary.__details.removeAttribute('open'); - } - } - return true -}; + function indexOf(array, element) { + var + index = -1, + length = array.length; -/** -* Remove the click event from the node element -* @param {object} node element -*/ -Details.prototype.destroy = function (node) { - removeEvent(node, 'click'); -}; + while (++index < length) { + if (index in array && array[index] === element) { + return index; + } + } -/** -* Initialise an event listener for DOMContentLoaded at document level -* and load at window level -* -* If the first one fires it will set a flag to block the second one -* but if it's not supported then the second one will fire -*/ -Details.prototype.init = function () { - addEvent(document, 'DOMContentLoaded', this.initDetails.bind(this)); - addEvent(window, 'load', this.initDetails.bind(this)); -}; + return -1; + } -(function(undefined) { + var existingProto = (window.Event && window.Event.prototype) || null; + window.Event = Window.prototype.Event = function Event(type, eventInitDict) { + if (!type) { + throw new Error('Not enough arguments'); + } -// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js -var detect = ('Window' in this); + var event; + // Shortcut if browser supports createEvent + if ('createEvent' in document) { + event = document.createEvent('Event'); + var bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + var cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; -if (detect) return + event.initEvent(type, bubbles, cancelable); -// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always -if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { - (function (global) { - if (global.constructor) { - global.Window = global.constructor; - } else { - (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this; + return event; } - }(this)); -} -}) -.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + event = document.createEventObject(); -(function(undefined) { + event.type = type; + event.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + event.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; -// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js -var detect = ("Document" in this); + return event; + }; + if (existingProto) { + Object.defineProperty(window.Event, 'prototype', { + configurable: false, + enumerable: false, + writable: true, + value: existingProto + }); + } -if (detect) return + if (!('createEvent' in document)) { + window.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1]; -// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always -if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + if (element === window && type in unlistenableWindowEvents) { + throw new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.'); + } - if (this.HTMLDocument) { // IE8 + if (!element._events) { + element._events = {}; + } - // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. - this.Document = this.HTMLDocument; + if (!element._events[type]) { + element._events[type] = function (event) { + var + list = element._events[event.type].list, + events = list.slice(), + index = -1, + length = events.length, + eventElement; - } else { + event.preventDefault = function preventDefault() { + if (event.cancelable !== false) { + event.returnValue = false; + } + }; - // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. - this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); - this.Document.prototype = document; - } -} + event.stopPropagation = function stopPropagation() { + event.cancelBubble = true; + }; + event.stopImmediatePropagation = function stopImmediatePropagation() { + event.cancelBubble = true; + event.cancelImmediate = true; + }; -}) -.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + event.currentTarget = element; + event.relatedTarget = event.fromElement || null; + event.target = event.target || event.srcElement || element; + event.timeStamp = new Date().getTime(); -(function(undefined) { + if (event.clientX) { + event.pageX = event.clientX + document.documentElement.scrollLeft; + event.pageY = event.clientY + document.documentElement.scrollTop; + } -// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js -var detect = ('Element' in this && 'HTMLElement' in this); + while (++index < length && !event.cancelImmediate) { + if (index in events) { + eventElement = events[index]; -if (detect) return + if (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') { + eventElement.call(element, event); + } + } + } + }; -// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always -(function () { + element._events[type].list = []; - // IE8 - if (window.Element && !window.HTMLElement) { - window.HTMLElement = window.Element; - return; - } + if (element.attachEvent) { + element.attachEvent('on' + type, element._events[type]); + } + } - // create Element constructor - window.Element = window.HTMLElement = new Function('return function Element() {}')(); + element._events[type].list.push(listener); + }; - // generate sandboxed iframe - var vbody = document.appendChild(document.createElement('body')); - var frame = vbody.appendChild(document.createElement('iframe')); + window.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1], + index; - // use sandboxed iframe to replicate Element functionality - var frameDocument = frame.contentWindow.document; - var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); - var cache = {}; + if (element._events && element._events[type] && element._events[type].list) { + index = indexOf(element._events[type].list, listener); - // polyfill Element.prototype on an element - var shiv = function (element, deep) { - var - childNodes = element.childNodes || [], - index = -1, - key, value, childNode; + if (index !== -1) { + element._events[type].list.splice(index, 1); - if (element.nodeType === 1 && element.constructor !== Element) { - element.constructor = Element; + if (!element._events[type].list.length) { + if (element.detachEvent) { + element.detachEvent('on' + type, element._events[type]); + } + delete element._events[type]; + } + } + } + }; - for (key in cache) { - value = cache[key]; - element[key] = value; + window.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) { + if (!arguments.length) { + throw new Error('Not enough arguments'); } - } - while (childNode = deep && childNodes[++index]) { - shiv(childNode, deep); - } + if (!event || typeof event.type !== 'string') { + throw new Error('DOM Events Exception 0'); + } - return element; - }; + var element = this, type = event.type; - var elements = document.getElementsByTagName('*'); - var nativeCreateElement = document.createElement; - var interval; - var loopLimit = 100; + try { + if (!event.bubbles) { + event.cancelBubble = true; - prototype.attachEvent('onpropertychange', function (event) { - var - propertyName = event.propertyName, - nonValue = !cache.hasOwnProperty(propertyName), - newValue = prototype[propertyName], - oldValue = cache[propertyName], - index = -1, - element; + var cancelBubbleEvent = function (event) { + event.cancelBubble = true; + + (element || window).detachEvent('on' + type, cancelBubbleEvent); + }; - while (element = elements[++index]) { - if (element.nodeType === 1) { - if (nonValue || element[propertyName] === oldValue) { - element[propertyName] = newValue; + this.attachEvent('on' + type, cancelBubbleEvent); } - } - } - cache[propertyName] = newValue; - }); + this.fireEvent('on' + type, event); + } catch (error) { + event.target = element; - prototype.constructor = Element; + do { + event.currentTarget = element; - if (!prototype.hasAttribute) { - // .hasAttribute - prototype.hasAttribute = function hasAttribute(name) { - return this.getAttribute(name) !== null; - }; - } + if ('_events' in element && typeof element._events[type] === 'function') { + element._events[type].call(element, event); + } - // Apply Element prototype to the pre-existing DOM as soon as the body element appears. - function bodyCheck() { - if (!(loopLimit--)) clearTimeout(interval); - if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { - shiv(document, true); - if (interval && document.body.prototype) clearTimeout(interval); - return (!!document.body.prototype); - } - return false; - } - if (!bodyCheck()) { - document.onreadystatechange = bodyCheck; - interval = setInterval(bodyCheck, 25); - } + if (typeof element['on' + type] === 'function') { + element['on' + type].call(element, event); + } - // Apply to any new elements created after load - document.createElement = function createElement(nodeName) { - var element = nativeCreateElement(String(nodeName).toLowerCase()); - return shiv(element); - }; + element = element.nodeType === 9 ? element.parentWindow : element.parentNode; + } while (element && !event.cancelBubble); + } - // remove sandboxed iframe - document.removeChild(vbody); + return true; + }; + + // Add the DOMContentLoaded Event + document.attachEvent('onreadystatechange', function() { + if (document.readyState === 'complete') { + document.dispatchEvent(new Event('DOMContentLoaded', { + bubbles: true + })); + } + }); + } }()); }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); -(function(undefined) { - -// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js -var detect = ( - (function(global) { - - if (!('Event' in global)) return false; - if (typeof global.Event === 'function') return true; - - try { +/** + * JavaScript 'shim' to trigger the click event of element(s) when the space key is pressed. + * + * Created since some Assistive Technologies (for example some Screenreaders) + * will tell a user to press space on a 'button', so this functionality needs to be shimmed + * See https://github.com/alphagov/govuk_elements/pull/272#issuecomment-233028270 + * + * Usage instructions: + * the 'shim' will be automatically initialised + */ - // In IE 9-11, the Event object exists but cannot be instantiated - new Event('click'); - return true; - } catch(e) { - return false; - } - }(this)) -); +var KEY_SPACE = 32; -if (detect) return +function Button ($module) { + this.$module = $module; +} -// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always -(function () { - var unlistenableWindowEvents = { - click: 1, - dblclick: 1, - keyup: 1, - keypress: 1, - keydown: 1, - mousedown: 1, - mouseup: 1, - mousemove: 1, - mouseover: 1, - mouseenter: 1, - mouseleave: 1, - mouseout: 1, - storage: 1, - storagecommit: 1, - textinput: 1 - }; +/** +* Add event handler for KeyDown +* if the event target element has a role='button' and the event is key space pressed +* then it prevents the default event and triggers a click event +* @param {object} event event +*/ +Button.prototype.handleKeyDown = function (event) { + // get the target element + var target = event.target; + // if the element has a role='button' and the pressed key is a space, we'll simulate a click + if (target.getAttribute('role') === 'button' && event.keyCode === KEY_SPACE) { + event.preventDefault(); + // trigger the target's click event + target.click(); + } +}; - // This polyfill depends on availability of `document` so will not run in a worker - // However, we asssume there are no browsers with worker support that lack proper - // support for `Event` within the worker - if (typeof document === 'undefined' || typeof window === 'undefined') return; +/** +* Initialise an event listener for keydown at document level +* this will help listening for later inserted elements with a role="button" +*/ +Button.prototype.init = function () { + this.$module.addEventListener('keydown', this.handleKeyDown); +}; - function indexOf(array, element) { - var - index = -1, - length = array.length; +(function(undefined) { + // Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Function/prototype/bind/detect.js + var detect = 'bind' in Function.prototype; - while (++index < length) { - if (index in array && array[index] === element) { - return index; - } - } + if (detect) return - return -1; - } + // Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Function.prototype.bind&flags=always + Object.defineProperty(Function.prototype, 'bind', { + value: function bind(that) { // .length is 1 + // add necessary es5-shim utilities + var $Array = Array; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var ArrayPrototype = $Array.prototype; + var Empty = function Empty() {}; + var to_string = ObjectPrototype.toString; + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; + var array_slice = ArrayPrototype.slice; + var array_concat = ArrayPrototype.concat; + var array_push = ArrayPrototype.push; + var max = Math.max; + // /add necessary es5-shim utilities - var existingProto = (window.Event && window.Event.prototype) || null; - window.Event = Window.prototype.Event = function Event(type, eventInitDict) { - if (!type) { - throw new Error('Not enough arguments'); - } + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { - var event; - // Shortcut if browser supports createEvent - if ('createEvent' in document) { - event = document.createEvent('Event'); - var bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; - var cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. - event.initEvent(type, bubbles, cancelable); + var result = target.apply( + this, + array_concat.call(args, array_slice.call(arguments)) + ); + if ($Object(result) === result) { + return result; + } + return this; - return event; - } + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. - event = document.createEventObject(); + // equiv: target.call(this, ...boundArgs, ...args) + return target.apply( + that, + array_concat.call(args, array_slice.call(arguments)) + ); - event.type = type; - event.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; - event.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + } - return event; - }; - if (existingProto) { - Object.defineProperty(window.Event, 'prototype', { - configurable: false, - enumerable: false, - writable: true, - value: existingProto - }); - } + }; - if (!('createEvent' in document)) { - window.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() { - var - element = this, - type = arguments[0], - listener = arguments[1]; + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. - if (element === window && type in unlistenableWindowEvents) { - throw new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.'); - } + var boundLength = max(0, target.length - args.length); - if (!element._events) { - element._events = {}; - } + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } - if (!element._events[type]) { - element._events[type] = function (event) { - var - list = element._events[event.type].list, - events = list.slice(), - index = -1, - length = events.length, - eventElement; + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder); - event.preventDefault = function preventDefault() { - if (event.cancelable !== false) { - event.returnValue = false; - } - }; + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } - event.stopPropagation = function stopPropagation() { - event.cancelBubble = true; - }; + // TODO + // 18. Set the [[Extensible]] internal property of F to true. - event.stopImmediatePropagation = function stopImmediatePropagation() { - event.cancelBubble = true; - event.cancelImmediate = true; - }; + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. - event.currentTarget = element; - event.relatedTarget = event.fromElement || null; - event.target = event.target || event.srcElement || element; - event.timeStamp = new Date().getTime(); + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. - if (event.clientX) { - event.pageX = event.clientX + document.documentElement.scrollLeft; - event.pageY = event.clientY + document.documentElement.scrollTop; - } + // 22. Return F. + return bound; + } + }); +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); - while (++index < length && !event.cancelImmediate) { - if (index in events) { - eventElement = events[index]; +/** + * JavaScript 'polyfill' for HTML5's
and elements + * and 'shim' to add accessiblity enhancements for all browsers + * + * http://caniuse.com/#feat=details + * + * Usage instructions: + * the 'polyfill' will be automatically initialised + */ - if (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') { - eventElement.call(element, event); - } - } - } - }; +var KEY_ENTER = 13; +var KEY_SPACE$1 = 32; - element._events[type].list = []; +// Create a flag to know if the browser supports navtive details +var NATIVE_DETAILS = typeof document.createElement('details').open === 'boolean'; - if (element.attachEvent) { - element.attachEvent('on' + type, element._events[type]); - } - } +function Details ($module) { + this.$module = $module; +} - element._events[type].list.push(listener); - }; +/** +* Handle cross-modal click events +* @param {object} node element +* @param {function} callback function +*/ +Details.prototype.handleInputs = function (node, callback) { + node.addEventListener('keypress', function (event) { + var target = event.target; + // When the key gets pressed - check if it is enter or space + if (event.keyCode === KEY_ENTER || event.keyCode === KEY_SPACE$1) { + if (target.nodeName.toLowerCase() === 'summary') { + // Prevent space from scrolling the page + // and enter from submitting a form + event.preventDefault(); + // Click to let the click event do all the necessary action + if (target.click) { + target.click(); + } else { + // except Safari 5.1 and under don't support .click() here + callback(event); + } + } + } + }); - window.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() { - var - element = this, - type = arguments[0], - listener = arguments[1], - index; + // Prevent keyup to prevent clicking twice in Firefox when using space key + node.addEventListener('keyup', function (event) { + var target = event.target; + if (event.keyCode === KEY_SPACE$1) { + if (target.nodeName.toLowerCase() === 'summary') { + event.preventDefault(); + } + } + }); - if (element._events && element._events[type] && element._events[type].list) { - index = indexOf(element._events[type].list, listener); + node.addEventListener('click', callback); +}; - if (index !== -1) { - element._events[type].list.splice(index, 1); +Details.prototype.init = function () { + var $module = this.$module; - if (!element._events[type].list.length) { - if (element.detachEvent) { - element.detachEvent('on' + type, element._events[type]); - } - delete element._events[type]; - } - } - } - }; + if (!$module) { + return + } - window.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) { - if (!arguments.length) { - throw new Error('Not enough arguments'); - } + // Save shortcuts to the inner summary and content elements + var $summary = this.$summary = $module.getElementsByTagName('summary').item(0); + var $content = this.$content = $module.getElementsByTagName('div').item(0); - if (!event || typeof event.type !== 'string') { - throw new Error('DOM Events Exception 0'); - } + // If
doesn't have a and a
representing the content + // it means the required HTML structure is not met so the script will stop + if (!$summary || !$content) { + return + } - var element = this, type = event.type; + // If the content doesn't have an ID, assign it one now + // which we'll need for the summary's aria-controls assignment + if (!$content.id) { + $content.id = 'details-content-' + generateUniqueID(); + } - try { - if (!event.bubbles) { - event.cancelBubble = true; + // Add ARIA role="group" to details + $module.setAttribute('role', 'group'); - var cancelBubbleEvent = function (event) { - event.cancelBubble = true; + // Add role=button to summary + $summary.setAttribute('role', 'button'); - (element || window).detachEvent('on' + type, cancelBubbleEvent); - }; + // Add aria-controls + $summary.setAttribute('aria-controls', $content.id); - this.attachEvent('on' + type, cancelBubbleEvent); - } + // Set tabIndex so the summary is keyboard accessible for non-native elements + // http://www.saliences.com/browserBugs/tabIndex.html + if (!NATIVE_DETAILS) { + $summary.tabIndex = 0; + } - this.fireEvent('on' + type, event); - } catch (error) { - event.target = element; + // Detect initial open state + var openAttr = $module.getAttribute('open') !== null; + if (openAttr === true) { + $summary.setAttribute('aria-expanded', 'true'); + $content.setAttribute('aria-hidden', 'false'); + } else { + $summary.setAttribute('aria-expanded', 'false'); + $content.setAttribute('aria-hidden', 'true'); + if (!NATIVE_DETAILS) { + $content.style.display = 'none'; + } + } - do { - event.currentTarget = element; + // Bind an event to handle summary elements + this.handleInputs($module, this.setAttributes.bind(this)); +}; - if ('_events' in element && typeof element._events[type] === 'function') { - element._events[type].call(element, event); - } +/** +* Define a statechange function that updates aria-expanded and style.display +* @param {object} summary element +*/ +Details.prototype.setAttributes = function () { + var $module = this.$module; + var $summary = this.$summary; + var $content = this.$content; - if (typeof element['on' + type] === 'function') { - element['on' + type].call(element, event); - } + var expanded = $summary.getAttribute('aria-expanded') === 'true'; + var hidden = $content.getAttribute('aria-hidden') === 'true'; - element = element.nodeType === 9 ? element.parentWindow : element.parentNode; - } while (element && !event.cancelBubble); - } + $summary.setAttribute('aria-expanded', (expanded ? 'false' : 'true')); + $content.setAttribute('aria-hidden', (hidden ? 'false' : 'true')); - return true; - }; + if (!NATIVE_DETAILS) { + $content.style.display = (expanded ? 'none' : ''); - // Add the DOMContentLoaded Event - document.attachEvent('onreadystatechange', function() { - if (document.readyState === 'complete') { - document.dispatchEvent(new Event('DOMContentLoaded', { - bubbles: true - })); - } - }); - } -}()); + var hasOpenAttr = $module.getAttribute('open') !== null; + if (!hasOpenAttr) { + $module.setAttribute('open', 'open'); + } else { + $module.removeAttribute('open'); + } + } + return true +}; -}) -.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); +/** +* Remove the click event from the node element +* @param {object} node element +*/ +Details.prototype.destroy = function (node) { + node.removeEventListener('keypress'); + node.removeEventListener('keyup'); + node.removeEventListener('click'); +}; function Checkboxes ($module) { this.$module = $module; @@ -1151,8 +1053,12 @@ Radios.prototype.handleClick = function (event) { }; function initAll () { - new Button().init(); - new Details().init(); + new Button(document).init(); + + var $details = document.querySelectorAll('details'); + nodeListForEach($details, function ($detail) { + new Details($detail).init(); + }); var $checkboxes = document.querySelectorAll('[data-module="checkboxes"]'); nodeListForEach($checkboxes, function ($checkbox) { @@ -1173,8 +1079,12 @@ function initAll () { }); } -(initAll()); - exports.initAll = initAll; +exports.Button = Button; +exports.Details = Details; +exports.Checkboxes = Checkboxes; +exports.ErrorSummary = ErrorSummary; +exports.Header = Header; +exports.Radios = Radios; }))); diff --git a/package/assets/images/README.md b/package/assets/images/README.md index 4967404967..cb3c28a2bc 100644 --- a/package/assets/images/README.md +++ b/package/assets/images/README.md @@ -8,10 +8,10 @@ the npm package install path to `/assets` Example: ``` -app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) +app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ``` For static use, the path is set to `/assets/images`. You need to copy assets -from `/node_modules/@govuk-frontend/frontend/assets` to the root of your folder. +from `/node_modules/govuk-frontend/assets` to the root of your folder. See `dist` folder for an example. diff --git a/package/common.js b/package/common.js index 203eb3b7b9..ed478f1f15 100644 --- a/package/common.js +++ b/package/common.js @@ -1,73 +1,9 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define('all', ['exports'], factory) : - (factory((global.all = {}))); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', ['exports'], factory) : + (factory((global.GOVUKFrontend = {}))); }(this, (function (exports) { 'use strict'; -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function addEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.addEventListener) { - node.addEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.attachEvent) { - node.attachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} - -/** -* Remove event utility for modern browsers or IE8 -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function removeEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.removeEventListener) { - node.removeEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.detachEvent) { - node.detachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} - -/** -* Cross-browser character code / key pressed -* @param {object} event event -* @returns {number} character code -*/ -function charCode (event) { - return (typeof event.which === 'number') ? event.which : event.keyCode -} - -/** -* Cross-browser preventing default action -* @param {object} event event -*/ -function preventDefault (event) { - // Support: IE9+ and other browsers - if (event.preventDefault) { - event.preventDefault(); - // Support: IE8 - } else { - event.returnValue = false; - } -} - /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill * This seems to fail in IE8, requires more investigation. @@ -82,10 +18,22 @@ function nodeListForEach (nodes, callback) { } } -exports.addEvent = addEvent; -exports.removeEvent = removeEvent; -exports.charCode = charCode; -exports.preventDefault = preventDefault; +// Used to generate a unique string, allows multiple instances of the component without +// Them conflicting with each other. +// https://stackoverflow.com/a/8809472 +function generateUniqueID () { + var d = new Date().getTime(); + if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') { + d += window.performance.now(); // use high-precision timer if available + } + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16) + }) +} + exports.nodeListForEach = nodeListForEach; +exports.generateUniqueID = generateUniqueID; }))); diff --git a/package/components/back-link/README.md b/package/components/back-link/README.md index ef14280e7a..39553cce38 100644 --- a/package/components/back-link/README.md +++ b/package/components/back-link/README.md @@ -41,7 +41,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -69,49 +69,37 @@ If you are using Nunjucks,then macros take the following arguments -classes +text (or) html string -No +Yes -Optional additional classes for the back-link component. +Text or HTML to use within the back link component. If `html` is provided, the `text` argument will be ignored. -text +href string -No +Yes -Text to use within the back link component. +The value of the link href attribute -html +classes string No -HTML to use within the back link. If this is provided, the text argument will be ignored. - - - - - -href - -string - -Yes - -The value of the link href attribute +Optional additional classes to add to the anchor tag. @@ -135,7 +123,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/back-link/_back-link.scss b/package/components/back-link/_back-link.scss index 704e9ac9fd..5cfe3a0681 100644 --- a/package/components/back-link/_back-link.scss +++ b/package/components/back-link/_back-link.scss @@ -5,22 +5,22 @@ @include govuk-exports("govuk/component/back-link") { .govuk-back-link { - @include govuk-typography-responsive($govuk-font-16); + @include govuk-typography-responsive($size: 16); @include govuk-link-common; @include govuk-link-style-text; display: inline-block; position: relative; - margin-top: $govuk-spacing-scale-3; - margin-bottom: $govuk-spacing-scale-3; + margin-top: govuk-spacing(3); + margin-bottom: govuk-spacing(3); // Allow space for the arrow padding-left: 14px; // Use border-bottom rather than text-decoration so that the arrow is // underlined as well. - border-bottom: 1px solid $govuk-black; + border-bottom: 1px solid govuk-colour("black"); // Underline is provided by a bottom border text-decoration: none; diff --git a/package/components/breadcrumbs/README.md b/package/components/breadcrumbs/README.md index 73250e783f..b555876ae5 100644 --- a/package/components/breadcrumbs/README.md +++ b/package/components/breadcrumbs/README.md @@ -222,7 +222,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -250,61 +250,49 @@ If you are using Nunjucks,then macros take the following arguments -classes - -string - -No - -Optional additional classes - - - - - items array Yes -Array of breadcrumbs items +Array of breadcrumbs item objects. -text +items.{}.text (or) items.{}.html string -No +Yes -Text to use within the breadcrumbs item +Text or HTML to use within the breadcrumbs item. If `html` is provided, the `text` argument will be ignored. -html +items.{}.href string -No +no -HTML to use within the breadcrumbs item. If this is provided, the text argument will be ignored. +Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item -href +classes string -no +No -Link for the breadcrumbs item. If not specified, breadcrumbs item is a normal list item +Optional additional classes to add to the breadcrumbs container. @@ -328,7 +316,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/breadcrumbs/_breadcrumbs.scss b/package/components/breadcrumbs/_breadcrumbs.scss index 105efa48a8..56e5106c7b 100644 --- a/package/components/breadcrumbs/_breadcrumbs.scss +++ b/package/components/breadcrumbs/_breadcrumbs.scss @@ -20,11 +20,11 @@ $chevron-altitude-calculated: 5.655px; .govuk-breadcrumbs { - @include govuk-font-regular-16; + @include govuk-font($size: 16); @include govuk-text-colour; - margin-top: $govuk-spacing-scale-3; - margin-bottom: $govuk-spacing-scale-2; + margin-top: govuk-spacing(3); + margin-bottom: govuk-spacing(2); } .govuk-breadcrumbs__list { @@ -40,12 +40,12 @@ display: inline-block; position: relative; - margin-bottom: $govuk-spacing-scale-1; + margin-bottom: govuk-spacing(1); // Add both margin and padding such that the chevron appears centrally // between each breadcrumb item - margin-left: $govuk-spacing-scale-2; - padding-left: $govuk-spacing-scale-2 + $chevron-altitude-calculated; + margin-left: govuk-spacing(2); + padding-left: govuk-spacing(2) + $chevron-altitude-calculated; float: left; diff --git a/package/components/button/README.md b/package/components/button/README.md index ef638d404d..3fde95897e 100644 --- a/package/components/button/README.md +++ b/package/components/button/README.md @@ -158,7 +158,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -190,7 +190,7 @@ If you are using Nunjucks,then macros take the following arguments string -Yes +No Whether to use an `input`, `button` or `a` element to create the button. In most cases you will not need to set this as it will be configured automatically if you use `href` or `html`. @@ -198,25 +198,13 @@ If you are using Nunjucks,then macros take the following arguments -text - -string - -Yes - -Text for the button - - - - - -html +text (or) html string Yes -HTML for the button or link. If this is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`. +Text or HTML for the button or link. If `html` is provided, the `text` argument will be ignored and `element` will be automatically set to `button` unless `href` is also set, or it has already been defined. This argument has no effect if `element` is set to `input`. @@ -300,7 +288,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example data attributes) to add to the error message span tag +Any extra HTML attributes (for example data attributes) to add to the button component. @@ -312,7 +300,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/button/_button.scss b/package/components/button/_button.scss index 8570fec3f2..a592151524 100644 --- a/package/components/button/_button.scss +++ b/package/components/button/_button.scss @@ -4,17 +4,18 @@ @include govuk-exports("govuk/component/button") { + $govuk-button-colour: #00823b; + $govuk-button-hover-colour: darken($govuk-button-colour, 5%); + $govuk-button-shadow-colour: darken($govuk-button-colour, 15%); + $govuk-button-text-colour: govuk-colour("white"); + // Because the shadow (s0) is visually 'part of' the button, we need to reduce // the height of the button to compensate by adjusting its padding (s1) and // increase the bottom margin to include it (s2). $button-shadow-size: $govuk-border-width-form-element; .govuk-button { - @include govuk-font-regular; - @include govuk-typography-responsive( - $govuk-font-19, - $override-line-height: 19px - ); + @include govuk-font($size: 19, $line-height: 19px); @include govuk-focusable; -webkit-box-sizing: border-box; @@ -24,8 +25,8 @@ position: relative; width: 100%; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom", $adjustment: $button-shadow-size); // s2 - padding: ($govuk-spacing-scale-2 - $govuk-border-width-form-element - ($button-shadow-size / 2)) $govuk-spacing-scale-2; // s1 + @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2 + padding: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)) govuk-spacing(2); // s1 border: $govuk-border-width-form-element solid transparent; border-radius: 0; color: $govuk-button-text-colour; @@ -41,7 +42,7 @@ border-bottom: $button-shadow-size solid $govuk-button-shadow-colour; } - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: auto; } @@ -147,16 +148,13 @@ .govuk-button--start { @include govuk-typography-weight-bold; - @include govuk-typography-responsive( - $govuk-font-24, - $override-line-height: 1 - ); + @include govuk-typography-responsive($size: 24, $override-line-height: 1); min-height: auto; - padding-top: $govuk-spacing-scale-2 - $govuk-border-width-form-element; - padding-right: $govuk-spacing-scale-7; - padding-bottom: $govuk-spacing-scale-2 - $govuk-border-width-form-element; - padding-left: $govuk-spacing-scale-3; + padding-top: govuk-spacing(2) - $govuk-border-width-form-element; + padding-right: govuk-spacing(7); + padding-bottom: govuk-spacing(2) - $govuk-border-width-form-element; + padding-left: govuk-spacing(3); background-image: govuk-image-url("icon-pointer.png"); background-repeat: no-repeat; @@ -175,13 +173,13 @@ $offset: 2; .govuk-button { - padding-top: ($govuk-spacing-scale-2 - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1 - padding-bottom: ($govuk-spacing-scale-2 - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1 + padding-top: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1 + padding-bottom: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1 } .govuk-button--start { - padding-top: ($govuk-spacing-scale-2 - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1 - padding-bottom: ($govuk-spacing-scale-2 - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1 + padding-top: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1 + padding-bottom: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1 } } diff --git a/package/components/button/button.js b/package/components/button/button.js index 0699a4de67..2fcec71511 100644 --- a/package/components/button/button.js +++ b/package/components/button/button.js @@ -1,53 +1,506 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function addEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.addEventListener) { - node.addEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.attachEvent) { - node.attachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} +(function(undefined) { -/** -* Cross-browser character code / key pressed -* @param {object} event event -* @returns {number} character code -*/ -function charCode (event) { - return (typeof event.which === 'number') ? event.which : event.keyCode +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js +var detect = ('Window' in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + (function (global) { + if (global.constructor) { + global.Window = global.constructor; + } else { + (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this; + } + }(this)); } -/** -* Cross-browser preventing default action -* @param {object} event event -*/ -function preventDefault (event) { - // Support: IE9+ and other browsers - if (event.preventDefault) { - event.preventDefault(); - // Support: IE8 - } else { - event.returnValue = false; - } +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js +var detect = ("Document" in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + + if (this.HTMLDocument) { // IE8 + + // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. + this.Document = this.HTMLDocument; + + } else { + + // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. + this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); + this.Document.prototype = document; + } } + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js +var detect = ('Element' in this && 'HTMLElement' in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always +(function () { + + // IE8 + if (window.Element && !window.HTMLElement) { + window.HTMLElement = window.Element; + return; + } + + // create Element constructor + window.Element = window.HTMLElement = new Function('return function Element() {}')(); + + // generate sandboxed iframe + var vbody = document.appendChild(document.createElement('body')); + var frame = vbody.appendChild(document.createElement('iframe')); + + // use sandboxed iframe to replicate Element functionality + var frameDocument = frame.contentWindow.document; + var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); + var cache = {}; + + // polyfill Element.prototype on an element + var shiv = function (element, deep) { + var + childNodes = element.childNodes || [], + index = -1, + key, value, childNode; + + if (element.nodeType === 1 && element.constructor !== Element) { + element.constructor = Element; + + for (key in cache) { + value = cache[key]; + element[key] = value; + } + } + + while (childNode = deep && childNodes[++index]) { + shiv(childNode, deep); + } + + return element; + }; + + var elements = document.getElementsByTagName('*'); + var nativeCreateElement = document.createElement; + var interval; + var loopLimit = 100; + + prototype.attachEvent('onpropertychange', function (event) { + var + propertyName = event.propertyName, + nonValue = !cache.hasOwnProperty(propertyName), + newValue = prototype[propertyName], + oldValue = cache[propertyName], + index = -1, + element; + + while (element = elements[++index]) { + if (element.nodeType === 1) { + if (nonValue || element[propertyName] === oldValue) { + element[propertyName] = newValue; + } + } + } + + cache[propertyName] = newValue; + }); + + prototype.constructor = Element; + + if (!prototype.hasAttribute) { + // .hasAttribute + prototype.hasAttribute = function hasAttribute(name) { + return this.getAttribute(name) !== null; + }; + } + + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck() { + if (!(loopLimit--)) clearTimeout(interval); + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck()) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 25); + } + + // Apply to any new elements created after load + document.createElement = function createElement(nodeName) { + var element = nativeCreateElement(String(nodeName).toLowerCase()); + return shiv(element); + }; + + // remove sandboxed iframe + document.removeChild(vbody); +}()); + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Object/defineProperty/detect.js +var detect = ( + // In IE8, defineProperty could only act on DOM elements, so full support + // for the feature requires the ability to set a property on an arbitrary object + 'defineProperty' in Object && (function() { + try { + var a = {}; + Object.defineProperty(a, 'test', {value:42}); + return true; + } catch(e) { + return false + } + }()) +); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Object.defineProperty&flags=always +(function (nativeDefineProperty) { + + var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__'); + var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine'; + var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value'; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + + // Where native support exists, assume it + if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) { + return nativeDefineProperty(object, property, descriptor); + } + + if (object === null || !(object instanceof Object || typeof object === 'object')) { + throw new TypeError('Object.defineProperty called on non-object'); + } + + if (!(descriptor instanceof Object)) { + throw new TypeError('Property description must be an object'); + } + + var propertyString = String(property); + var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor; + var getterType = 'get' in descriptor && typeof descriptor.get; + var setterType = 'set' in descriptor && typeof descriptor.set; + + // handle descriptor.get + if (getterType) { + if (getterType !== 'function') { + throw new TypeError('Getter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineGetter__.call(object, propertyString, descriptor.get); + } else { + object[propertyString] = descriptor.value; + } + + // handle descriptor.set + if (setterType) { + if (setterType !== 'function') { + throw new TypeError('Setter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineSetter__.call(object, propertyString, descriptor.set); + } + + // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above + if ('value' in descriptor) { + object[propertyString] = descriptor.value; + } + + return object; + }; +}(Object.defineProperty)); +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js +var detect = ( + (function(global) { + + if (!('Event' in global)) return false; + if (typeof global.Event === 'function') return true; + + try { + + // In IE 9-11, the Event object exists but cannot be instantiated + new Event('click'); + return true; + } catch(e) { + return false; + } + }(this)) +); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always +(function () { + var unlistenableWindowEvents = { + click: 1, + dblclick: 1, + keyup: 1, + keypress: 1, + keydown: 1, + mousedown: 1, + mouseup: 1, + mousemove: 1, + mouseover: 1, + mouseenter: 1, + mouseleave: 1, + mouseout: 1, + storage: 1, + storagecommit: 1, + textinput: 1 + }; + + // This polyfill depends on availability of `document` so will not run in a worker + // However, we asssume there are no browsers with worker support that lack proper + // support for `Event` within the worker + if (typeof document === 'undefined' || typeof window === 'undefined') return; + + function indexOf(array, element) { + var + index = -1, + length = array.length; + + while (++index < length) { + if (index in array && array[index] === element) { + return index; + } + } + + return -1; + } + + var existingProto = (window.Event && window.Event.prototype) || null; + window.Event = Window.prototype.Event = function Event(type, eventInitDict) { + if (!type) { + throw new Error('Not enough arguments'); + } + + var event; + // Shortcut if browser supports createEvent + if ('createEvent' in document) { + event = document.createEvent('Event'); + var bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + var cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + event.initEvent(type, bubbles, cancelable); + + return event; + } + + event = document.createEventObject(); + + event.type = type; + event.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + event.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + return event; + }; + if (existingProto) { + Object.defineProperty(window.Event, 'prototype', { + configurable: false, + enumerable: false, + writable: true, + value: existingProto + }); + } + + if (!('createEvent' in document)) { + window.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1]; + + if (element === window && type in unlistenableWindowEvents) { + throw new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.'); + } + + if (!element._events) { + element._events = {}; + } + + if (!element._events[type]) { + element._events[type] = function (event) { + var + list = element._events[event.type].list, + events = list.slice(), + index = -1, + length = events.length, + eventElement; + + event.preventDefault = function preventDefault() { + if (event.cancelable !== false) { + event.returnValue = false; + } + }; + + event.stopPropagation = function stopPropagation() { + event.cancelBubble = true; + }; + + event.stopImmediatePropagation = function stopImmediatePropagation() { + event.cancelBubble = true; + event.cancelImmediate = true; + }; + + event.currentTarget = element; + event.relatedTarget = event.fromElement || null; + event.target = event.target || event.srcElement || element; + event.timeStamp = new Date().getTime(); + + if (event.clientX) { + event.pageX = event.clientX + document.documentElement.scrollLeft; + event.pageY = event.clientY + document.documentElement.scrollTop; + } + + while (++index < length && !event.cancelImmediate) { + if (index in events) { + eventElement = events[index]; + + if (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') { + eventElement.call(element, event); + } + } + } + }; + + element._events[type].list = []; + + if (element.attachEvent) { + element.attachEvent('on' + type, element._events[type]); + } + } + + element._events[type].list.push(listener); + }; + + window.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1], + index; + + if (element._events && element._events[type] && element._events[type].list) { + index = indexOf(element._events[type].list, listener); + + if (index !== -1) { + element._events[type].list.splice(index, 1); + + if (!element._events[type].list.length) { + if (element.detachEvent) { + element.detachEvent('on' + type, element._events[type]); + } + delete element._events[type]; + } + } + } + }; + + window.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) { + if (!arguments.length) { + throw new Error('Not enough arguments'); + } + + if (!event || typeof event.type !== 'string') { + throw new Error('DOM Events Exception 0'); + } + + var element = this, type = event.type; + + try { + if (!event.bubbles) { + event.cancelBubble = true; + + var cancelBubbleEvent = function (event) { + event.cancelBubble = true; + + (element || window).detachEvent('on' + type, cancelBubbleEvent); + }; + + this.attachEvent('on' + type, cancelBubbleEvent); + } + + this.fireEvent('on' + type, event); + } catch (error) { + event.target = element; + + do { + event.currentTarget = element; + + if ('_events' in element && typeof element._events[type] === 'function') { + element._events[type].call(element, event); + } + + if (typeof element['on' + type] === 'function') { + element['on' + type].call(element, event); + } + + element = element.nodeType === 9 ? element.parentWindow : element.parentNode; + } while (element && !event.cancelBubble); + } + + return true; + }; + + // Add the DOMContentLoaded Event + document.attachEvent('onreadystatechange', function() { + if (document.readyState === 'complete') { + document.dispatchEvent(new Event('DOMContentLoaded', { + bubbles: true + })); + } + }); + } +}()); + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + /** * JavaScript 'shim' to trigger the click event of element(s) when the space key is pressed. * @@ -61,7 +514,9 @@ function preventDefault (event) { var KEY_SPACE = 32; -function Button () { } +function Button ($module) { + this.$module = $module; +} /** * Add event handler for KeyDown @@ -71,10 +526,10 @@ function Button () { } */ Button.prototype.handleKeyDown = function (event) { // get the target element - var target = event.target || event.srcElement; + var target = event.target; // if the element has a role='button' and the pressed key is a space, we'll simulate a click - if (target.getAttribute('role') === 'button' && charCode(event) === KEY_SPACE) { - preventDefault(event); + if (target.getAttribute('role') === 'button' && event.keyCode === KEY_SPACE) { + event.preventDefault(); // trigger the target's click event target.click(); } @@ -85,7 +540,7 @@ Button.prototype.handleKeyDown = function (event) { * this will help listening for later inserted elements with a role="button" */ Button.prototype.init = function () { - addEvent(document, 'keydown', this.handleKeyDown); + this.$module.addEventListener('keydown', this.handleKeyDown); }; return Button; diff --git a/package/components/checkboxes/README.md b/package/components/checkboxes/README.md index c1bc4b9241..e90c6384e5 100644 --- a/package/components/checkboxes/README.md +++ b/package/components/checkboxes/README.md @@ -525,7 +525,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -589,109 +589,157 @@ If you are using Nunjucks,then macros take the following arguments -classes +idPrefix string No -Optional additional classes +String to prefix id for each checkbox item if no id is specified on each item. If`idPrefix` is not passed, fallback to using the name attribute instead. -idPrefix +name string -No +Yes -String to prefix id for each checkbox item if no id is specified on each item. +Name attribute for each checkbox item. -name +items -string +array Yes -Name attribute for each checkbox item. +Array of checkbox items objects. -items +items.{}.text (or) items.{}.html -array +string Yes -Array of checkbox items. +Text or HTML to use within each checkbox item label. If `html` is provided, the `text` argument will be ignored. -text +items.{}.id string No -Text to use within each checkbox item label. +Specific id attribute for the checkbox item. If ommited, then `idPrefix` string will be applied. -html +items.{}.name string -No +Yes + +Specific name for the checkbox item. If ommited, then component global `name` string will be applied. + + + + -HTML to use within each checkbox item label. If this is provided, the text argument will be ignored. +items.{}.value + +string + +Yes + +Value for the checkbox input. -label +items.{}.label object No -Provide additional attributes to each checkbox item label. +Provide additional attributes to each checkbox item label. See `label` component for more details. + + + + + +items.{}.checked + +boolean + +No + +If true, checkbox will be checked. -checked +items.{}.conditional boolean No -If true, checkbox will be checked +If true, content provided will be revealed when the item is checked. -disabled +items.{}.conditional.html boolean No -If true, checkbox will be disabled +Provide content for the conditional reveal. + + + + + +items.{}.disabled + +boolean + +No + +If true, checkbox will be disabled. + + + + + +classes + +string + +No + +Optional additional classes to add to the checkboxes container. @@ -715,7 +763,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/checkboxes/_checkboxes.scss b/package/components/checkboxes/_checkboxes.scss index 35e4925a13..8c09dbc2ac 100644 --- a/package/components/checkboxes/_checkboxes.scss +++ b/package/components/checkboxes/_checkboxes.scss @@ -8,18 +8,18 @@ @import "../label/label"; @include govuk-exports("govuk/component/checkboxes") { - $govuk-checkboxes-size: $govuk-spacing-scale-7; - $govuk-checkboxes-label-padding-left-right: $govuk-spacing-scale-3; + $govuk-checkboxes-size: govuk-spacing(7); + $govuk-checkboxes-label-padding-left-right: govuk-spacing(3); .govuk-checkboxes__item { - @include govuk-font-regular-19; + @include govuk-font($size: 19); display: block; position: relative; min-height: $govuk-checkboxes-size; - margin-bottom: $govuk-spacing-scale-2; + margin-bottom: govuk-spacing(2); padding: 0 0 0 $govuk-checkboxes-size; clear: left; @@ -58,7 +58,7 @@ .govuk-checkboxes__label { display: block; - padding: 8px $govuk-checkboxes-label-padding-left-right $govuk-spacing-scale-1; + padding: 8px $govuk-checkboxes-label-padding-left-right govuk-spacing(1); cursor: pointer; // remove 300ms pause on mobile -ms-touch-action: manipulation; @@ -135,7 +135,7 @@ $conditional-padding-left: $conditional-border-padding + $govuk-checkboxes-label-padding-left-right; .govuk-checkboxes__conditional { - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); margin-left: $conditional-margin-left; padding-left: $conditional-padding-left; border-left: $conditional-border-width solid $govuk-border-colour; diff --git a/package/components/checkboxes/checkboxes.js b/package/components/checkboxes/checkboxes.js index 5ca69ba47d..cb08e6a6b3 100644 --- a/package/components/checkboxes/checkboxes.js +++ b/package/components/checkboxes/checkboxes.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; (function(undefined) { @@ -659,14 +659,6 @@ if (detect) return }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ - /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill * This seems to fail in IE8, requires more investigation. diff --git a/package/components/checkboxes/template.njk b/package/components/checkboxes/template.njk index ceb491ef89..e8288ebe98 100644 --- a/package/components/checkboxes/template.njk +++ b/package/components/checkboxes/template.njk @@ -1,7 +1,7 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "fieldset/macro.njk" import govukFieldset %} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../fieldset/macro.njk" import govukFieldset %} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- If an id 'prefix' is not passed, fall back to using the name attribute instead. We need this for error messages and hints as well -#} diff --git a/package/components/date-input/README.md b/package/components/date-input/README.md index b409573bf0..2edc97e2f2 100644 --- a/package/components/date-input/README.md +++ b/package/components/date-input/README.md @@ -467,7 +467,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -495,61 +495,73 @@ If you are using Nunjucks,then macros take the following arguments -classes +id string No -Optional additional classes +Optional id. This is used for the main component and to compose id attribute for each item. -id +name string No -Optional id. This is used for the main component and to compose the items' ids. +Optional name. This is used to compose the name attribute for each item. -name +items -string +array -No +Yes -Optional name. This is used to compose the items' names. +An array of input objects with name, value and optional classes -attributes +items.{}.id -object +string No -Any extra HTML attributes (for example data attributes) to add to the date div tag. +Optional item-specific id. If provided, it will be used instead of the generated. -items +items.{}.name array Yes -An array of input objects with name, value and optional classes +Optional item-specific name attribute. If provided, it will be used instead of the generated name. + + + + + +hint + +object + +No + +Optional hint. See hint component. @@ -577,6 +589,30 @@ If you are using Nunjucks,then macros take the following arguments + + +classes + +string + +No + +Optional additional classes to add to the date-input container. + + + + + +attributes + +object + +No + +Any extra HTML attributes (for example data attributes) to add to the date-input container. + + + @@ -585,7 +621,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/date-input/_date-input.scss b/package/components/date-input/_date-input.scss index 3a2f3e2360..26a87b5e3d 100644 --- a/package/components/date-input/_date-input.scss +++ b/package/components/date-input/_date-input.scss @@ -14,7 +14,7 @@ .govuk-date-input__item { width: 50px; - margin-right: $govuk-spacing-scale-4; + margin-right: govuk-spacing(4); margin-bottom: 0; float: left; clear: none; diff --git a/package/components/date-input/template.njk b/package/components/date-input/template.njk index c1d03fad05..ec1df73e8c 100644 --- a/package/components/date-input/template.njk +++ b/package/components/date-input/template.njk @@ -1,7 +1,7 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "fieldset/macro.njk" import govukFieldset %} -{% from "hint/macro.njk" import govukHint %} -{% from "input/macro.njk" import govukInput %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../fieldset/macro.njk" import govukFieldset %} +{% from "../hint/macro.njk" import govukHint %} +{% from "../input/macro.njk" import govukInput %} {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} diff --git a/package/components/details/README.md b/package/components/details/README.md index b90ae9eba1..facfec9f66 100644 --- a/package/components/details/README.md +++ b/package/components/details/README.md @@ -112,7 +112,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -140,49 +140,25 @@ If you are using Nunjucks,then macros take the following arguments -summaryText +summaryText (or) summaryHtml string Yes -Text to use within the summary element (the visible part of the details element) +Text or HTML to use within the summary element (the visible part of the details element). If `summaryHtml` is provided, the `summaryText` argument will be ignored. -summaryHtml +text (or) html string Yes -HTML to use within the summary element (the visible part of the details element). If this is provided, the summaryText argument will be ignored. - - - - - -text - -string - -Yes - -Text to use within the disclosed part of the details element. - - - - - -html - -string - -Yes - -HTML to use within the disclosed part of the details element. If this is provided, the text argument will be ignored. +Text or HTML to use within the disclosed part of the details element. If `html` is provided, the `text` argument will be ignored. @@ -194,31 +170,31 @@ If you are using Nunjucks,then macros take the following arguments No -Optional id +Optional id to add to the details element. -classes +open -string +boolean No -Optional additional classes +If true, details element will be expanded. -open +classes -boolean +string No -If true, details will be expanded. +Optional additional classes to add to the details element. @@ -230,7 +206,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example data attributes) to add to the details element +Any extra HTML attributes (for example data attributes) to add to the details element. @@ -242,7 +218,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/details/_details.scss b/package/components/details/_details.scss index 8203150b90..f21604647f 100644 --- a/package/components/details/_details.scss +++ b/package/components/details/_details.scss @@ -5,9 +5,9 @@ @include govuk-exports("govuk/component/details") { .govuk-details { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "bottom"); display: block; } @@ -19,10 +19,10 @@ // Absolutely position the marker against this element position: relative; - margin-bottom: $govuk-spacing-scale-1; + margin-bottom: govuk-spacing(1); // Allow for absolutely positioned marker and align with disclosed text - padding-left: $govuk-spacing-scale-4 + $govuk-border-width; + padding-left: govuk-spacing(4) + $govuk-border-width; // Style the summary to look like a link... color: $govuk-link-colour; @@ -70,14 +70,14 @@ } .govuk-details__text { - padding: $govuk-spacing-scale-3; - padding-left: $govuk-spacing-scale-4; + padding: govuk-spacing(3); + padding-left: govuk-spacing(4); border-left: $govuk-border-width solid $govuk-border-colour; } .govuk-details__text p { margin-top: 0; - margin-bottom: $govuk-spacing-scale-4; + margin-bottom: govuk-spacing(4); } .govuk-details__text p:last-child { diff --git a/package/components/details/details.js b/package/components/details/details.js index 98924f3982..8762ff44ec 100644 --- a/package/components/details/details.js +++ b/package/components/details/details.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; (function(undefined) { @@ -249,68 +249,435 @@ if (detect) return }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function addEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.addEventListener) { - node.addEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.attachEvent) { - node.attachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } -} +(function(undefined) { -/** -* Remove event utility for modern browsers or IE8 -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ -function removeEvent (node, type, callback) { - // Support: IE9+ and other browsers - if (node.removeEventListener) { - node.removeEventListener(type, function (event) { - callback(event, event.target); - }, false); - // Support: IE8 - } else if (node.detachEvent) { - node.detachEvent('on' + type, function (event) { - callback(event, event.srcElement); - }); - } +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Window/detect.js +var detect = ('Window' in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Window&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + (function (global) { + if (global.constructor) { + global.Window = global.constructor; + } else { + (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = this; + } + }(this)); } -/** -* Cross-browser character code / key pressed -* @param {object} event event -* @returns {number} character code -*/ -function charCode (event) { - return (typeof event.which === 'number') ? event.which : event.keyCode +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js +var detect = ("Document" in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + + if (this.HTMLDocument) { // IE8 + + // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. + this.Document = this.HTMLDocument; + + } else { + + // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. + this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); + this.Document.prototype = document; + } } + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Element/detect.js +var detect = ('Element' in this && 'HTMLElement' in this); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Element&flags=always +(function () { + + // IE8 + if (window.Element && !window.HTMLElement) { + window.HTMLElement = window.Element; + return; + } + + // create Element constructor + window.Element = window.HTMLElement = new Function('return function Element() {}')(); + + // generate sandboxed iframe + var vbody = document.appendChild(document.createElement('body')); + var frame = vbody.appendChild(document.createElement('iframe')); + + // use sandboxed iframe to replicate Element functionality + var frameDocument = frame.contentWindow.document; + var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); + var cache = {}; + + // polyfill Element.prototype on an element + var shiv = function (element, deep) { + var + childNodes = element.childNodes || [], + index = -1, + key, value, childNode; + + if (element.nodeType === 1 && element.constructor !== Element) { + element.constructor = Element; + + for (key in cache) { + value = cache[key]; + element[key] = value; + } + } + + while (childNode = deep && childNodes[++index]) { + shiv(childNode, deep); + } + + return element; + }; + + var elements = document.getElementsByTagName('*'); + var nativeCreateElement = document.createElement; + var interval; + var loopLimit = 100; + + prototype.attachEvent('onpropertychange', function (event) { + var + propertyName = event.propertyName, + nonValue = !cache.hasOwnProperty(propertyName), + newValue = prototype[propertyName], + oldValue = cache[propertyName], + index = -1, + element; + + while (element = elements[++index]) { + if (element.nodeType === 1) { + if (nonValue || element[propertyName] === oldValue) { + element[propertyName] = newValue; + } + } + } + + cache[propertyName] = newValue; + }); + + prototype.constructor = Element; + + if (!prototype.hasAttribute) { + // .hasAttribute + prototype.hasAttribute = function hasAttribute(name) { + return this.getAttribute(name) !== null; + }; + } + + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck() { + if (!(loopLimit--)) clearTimeout(interval); + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck()) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 25); + } + + // Apply to any new elements created after load + document.createElement = function createElement(nodeName) { + var element = nativeCreateElement(String(nodeName).toLowerCase()); + return shiv(element); + }; + + // remove sandboxed iframe + document.removeChild(vbody); +}()); + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + +(function(undefined) { + +// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Event/detect.js +var detect = ( + (function(global) { + + if (!('Event' in global)) return false; + if (typeof global.Event === 'function') return true; + + try { + + // In IE 9-11, the Event object exists but cannot be instantiated + new Event('click'); + return true; + } catch(e) { + return false; + } + }(this)) +); + +if (detect) return + +// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Event&flags=always +(function () { + var unlistenableWindowEvents = { + click: 1, + dblclick: 1, + keyup: 1, + keypress: 1, + keydown: 1, + mousedown: 1, + mouseup: 1, + mousemove: 1, + mouseover: 1, + mouseenter: 1, + mouseleave: 1, + mouseout: 1, + storage: 1, + storagecommit: 1, + textinput: 1 + }; + + // This polyfill depends on availability of `document` so will not run in a worker + // However, we asssume there are no browsers with worker support that lack proper + // support for `Event` within the worker + if (typeof document === 'undefined' || typeof window === 'undefined') return; + + function indexOf(array, element) { + var + index = -1, + length = array.length; + + while (++index < length) { + if (index in array && array[index] === element) { + return index; + } + } + + return -1; + } + + var existingProto = (window.Event && window.Event.prototype) || null; + window.Event = Window.prototype.Event = function Event(type, eventInitDict) { + if (!type) { + throw new Error('Not enough arguments'); + } + + var event; + // Shortcut if browser supports createEvent + if ('createEvent' in document) { + event = document.createEvent('Event'); + var bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + var cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + event.initEvent(type, bubbles, cancelable); + + return event; + } + + event = document.createEventObject(); + + event.type = type; + event.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + event.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + return event; + }; + if (existingProto) { + Object.defineProperty(window.Event, 'prototype', { + configurable: false, + enumerable: false, + writable: true, + value: existingProto + }); + } + + if (!('createEvent' in document)) { + window.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1]; + + if (element === window && type in unlistenableWindowEvents) { + throw new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.'); + } + + if (!element._events) { + element._events = {}; + } + + if (!element._events[type]) { + element._events[type] = function (event) { + var + list = element._events[event.type].list, + events = list.slice(), + index = -1, + length = events.length, + eventElement; + + event.preventDefault = function preventDefault() { + if (event.cancelable !== false) { + event.returnValue = false; + } + }; + + event.stopPropagation = function stopPropagation() { + event.cancelBubble = true; + }; + + event.stopImmediatePropagation = function stopImmediatePropagation() { + event.cancelBubble = true; + event.cancelImmediate = true; + }; + + event.currentTarget = element; + event.relatedTarget = event.fromElement || null; + event.target = event.target || event.srcElement || element; + event.timeStamp = new Date().getTime(); + + if (event.clientX) { + event.pageX = event.clientX + document.documentElement.scrollLeft; + event.pageY = event.clientY + document.documentElement.scrollTop; + } + + while (++index < length && !event.cancelImmediate) { + if (index in events) { + eventElement = events[index]; + + if (indexOf(list, eventElement) !== -1 && typeof eventElement === 'function') { + eventElement.call(element, event); + } + } + } + }; + + element._events[type].list = []; + + if (element.attachEvent) { + element.attachEvent('on' + type, element._events[type]); + } + } + + element._events[type].list.push(listener); + }; + + window.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1], + index; + + if (element._events && element._events[type] && element._events[type].list) { + index = indexOf(element._events[type].list, listener); + + if (index !== -1) { + element._events[type].list.splice(index, 1); + + if (!element._events[type].list.length) { + if (element.detachEvent) { + element.detachEvent('on' + type, element._events[type]); + } + delete element._events[type]; + } + } + } + }; + + window.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) { + if (!arguments.length) { + throw new Error('Not enough arguments'); + } + + if (!event || typeof event.type !== 'string') { + throw new Error('DOM Events Exception 0'); + } + + var element = this, type = event.type; + + try { + if (!event.bubbles) { + event.cancelBubble = true; + + var cancelBubbleEvent = function (event) { + event.cancelBubble = true; + + (element || window).detachEvent('on' + type, cancelBubbleEvent); + }; + + this.attachEvent('on' + type, cancelBubbleEvent); + } + + this.fireEvent('on' + type, event); + } catch (error) { + event.target = element; + + do { + event.currentTarget = element; + + if ('_events' in element && typeof element._events[type] === 'function') { + element._events[type].call(element, event); + } + + if (typeof element['on' + type] === 'function') { + element['on' + type].call(element, event); + } + + element = element.nodeType === 9 ? element.parentWindow : element.parentNode; + } while (element && !event.cancelBubble); + } + + return true; + }; + + // Add the DOMContentLoaded Event + document.attachEvent('onreadystatechange', function() { + if (document.readyState === 'complete') { + document.dispatchEvent(new Event('DOMContentLoaded', { + bubbles: true + })); + } + }); + } +}()); + +}) +.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + /** -* Cross-browser preventing default action -* @param {object} event event -*/ -function preventDefault (event) { - // Support: IE9+ and other browsers - if (event.preventDefault) { - event.preventDefault(); - // Support: IE8 - } else { - event.returnValue = false; + * TODO: Ideally this would be a NodeList.prototype.forEach polyfill + * This seems to fail in IE8, requires more investigation. + * See: https://github.com/imagitama/nodelist-foreach-polyfill + */ + +// Used to generate a unique string, allows multiple instances of the component without +// Them conflicting with each other. +// https://stackoverflow.com/a/8809472 +function generateUniqueID () { + var d = new Date().getTime(); + if (typeof window.performance !== 'undefined' && typeof window.performance.now === 'function') { + d += window.performance.now(); // use high-precision timer if available } + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = (d + Math.random() * 16) % 16 | 0; + d = Math.floor(d / 16); + return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16) + }) } /** @@ -329,10 +696,8 @@ var KEY_SPACE = 32; // Create a flag to know if the browser supports navtive details var NATIVE_DETAILS = typeof document.createElement('details').open === 'boolean'; -function Details () { - // Create a flag so we can prevent the initialisation - // function firing from both DOMContentLoaded and window.onload - this.INITIALISED = false; +function Details ($module) { + this.$module = $module; } /** @@ -340,156 +705,117 @@ function Details () { * @param {object} node element * @param {function} callback function */ -Details.prototype.handleKeyDown = function (node, callback) { - addEvent(node, 'keypress', function (event, target) { +Details.prototype.handleInputs = function (node, callback) { + node.addEventListener('keypress', function (event) { + var target = event.target; // When the key gets pressed - check if it is enter or space - if (charCode(event) === KEY_ENTER || charCode(event) === KEY_SPACE) { + if (event.keyCode === KEY_ENTER || event.keyCode === KEY_SPACE) { if (target.nodeName.toLowerCase() === 'summary') { // Prevent space from scrolling the page // and enter from submitting a form - preventDefault(event); + event.preventDefault(); // Click to let the click event do all the necessary action if (target.click) { target.click(); } else { // except Safari 5.1 and under don't support .click() here - callback(event, target); + callback(event); } } } }); // Prevent keyup to prevent clicking twice in Firefox when using space key - addEvent(node, 'keyup', function (event, target) { - if (charCode(event) === KEY_SPACE) { + node.addEventListener('keyup', function (event) { + var target = event.target; + if (event.keyCode === KEY_SPACE) { if (target.nodeName.toLowerCase() === 'summary') { - preventDefault(event); + event.preventDefault(); } } }); - addEvent(node, 'click', function (event, target) { - callback(event, target); - }); + node.addEventListener('click', callback); }; -/** -* Get the nearest ancestor element of a node that matches a given tag name -* @param {object} node element -* @param {string} match tag name (e.g. div) -*/ -Details.prototype.getAncestor = function (node, match) { - do { - if (!node || node.nodeName.toLowerCase() === match) { - break - } - node = node.parentNode; - } while (node) - - return node -}; +Details.prototype.init = function () { + var $module = this.$module; -/** -* Initialise the script on a list of details elements in a container -* @param {object} list of details elements -* @param {string} container where to look for details elements -*/ -Details.prototype.initDetails = function (list, container) { - container = container || document.body; - // If this has already happened, just return - // else set the flag so it doesn't happen again - if (this.INITIALISED) { + if (!$module) { return } - this.INITIALISED = true; - // Get the collection of details elements, but if that's empty - // then we don't need to bother with the rest of the scripting - if ((list = container.getElementsByTagName('details')).length === 0) { + + // Save shortcuts to the inner summary and content elements + var $summary = this.$summary = $module.getElementsByTagName('summary').item(0); + var $content = this.$content = $module.getElementsByTagName('div').item(0); + + // If
doesn't have a and a
representing the content + // it means the required HTML structure is not met so the script will stop + if (!$summary || !$content) { return } - // else iterate through them to apply their initial state - var n = list.length; - var i = 0; - for (i; i < n; i++) { - var details = list[i]; - - // Save shortcuts to the inner summary and content elements - details.__summary = details.getElementsByTagName('summary').item(0); - details.__content = details.getElementsByTagName('div').item(0); - - // If
doesn't have a and a
representing the content - // it means the required HTML structure is not met so the script will stop - if (!details.__summary || !details.__content) { - return - } - // If the content doesn't have an ID, assign it one now - // which we'll need for the summary's aria-controls assignment - if (!details.__content.id) { - details.__content.id = 'details-content-' + i; - } + // If the content doesn't have an ID, assign it one now + // which we'll need for the summary's aria-controls assignment + if (!$content.id) { + $content.id = 'details-content-' + generateUniqueID(); + } - // Add ARIA role="group" to details - details.setAttribute('role', 'group'); + // Add ARIA role="group" to details + $module.setAttribute('role', 'group'); - // Add role=button to summary - details.__summary.setAttribute('role', 'button'); + // Add role=button to summary + $summary.setAttribute('role', 'button'); - // Add aria-controls - details.__summary.setAttribute('aria-controls', details.__content.id); + // Add aria-controls + $summary.setAttribute('aria-controls', $content.id); - // Set tabIndex so the summary is keyboard accessible for non-native elements - // http://www.saliences.com/browserBugs/tabIndex.html - if (!NATIVE_DETAILS) { - details.__summary.tabIndex = 0; - } + // Set tabIndex so the summary is keyboard accessible for non-native elements + // http://www.saliences.com/browserBugs/tabIndex.html + if (!NATIVE_DETAILS) { + $summary.tabIndex = 0; + } - // Detect initial open state - var openAttr = details.getAttribute('open') !== null; - if (openAttr === true) { - details.__summary.setAttribute('aria-expanded', 'true'); - details.__content.setAttribute('aria-hidden', 'false'); - } else { - details.__summary.setAttribute('aria-expanded', 'false'); - details.__content.setAttribute('aria-hidden', 'true'); - if (!NATIVE_DETAILS) { - details.__content.style.display = 'none'; - } + // Detect initial open state + var openAttr = $module.getAttribute('open') !== null; + if (openAttr === true) { + $summary.setAttribute('aria-expanded', 'true'); + $content.setAttribute('aria-hidden', 'false'); + } else { + $summary.setAttribute('aria-expanded', 'false'); + $content.setAttribute('aria-hidden', 'true'); + if (!NATIVE_DETAILS) { + $content.style.display = 'none'; } - - // Create a circular reference from the summary back to its - // parent details element, for convenience in the click handler - details.__summary.__details = details; } // Bind an event to handle summary elements - this.handleKeyDown(container, function (event, summary) { - if (!(summary = this.getAncestor(summary, 'summary'))) { - return true - } - return this.stateChange(summary) - }.bind(this)); + this.handleInputs($module, this.setAttributes.bind(this)); }; /** * Define a statechange function that updates aria-expanded and style.display * @param {object} summary element */ -Details.prototype.stateChange = function (summary) { - var expanded = summary.__details.__summary.getAttribute('aria-expanded') === 'true'; - var hidden = summary.__details.__content.getAttribute('aria-hidden') === 'true'; +Details.prototype.setAttributes = function () { + var $module = this.$module; + var $summary = this.$summary; + var $content = this.$content; - summary.__details.__summary.setAttribute('aria-expanded', (expanded ? 'false' : 'true')); - summary.__details.__content.setAttribute('aria-hidden', (hidden ? 'false' : 'true')); + var expanded = $summary.getAttribute('aria-expanded') === 'true'; + var hidden = $content.getAttribute('aria-hidden') === 'true'; + + $summary.setAttribute('aria-expanded', (expanded ? 'false' : 'true')); + $content.setAttribute('aria-hidden', (hidden ? 'false' : 'true')); if (!NATIVE_DETAILS) { - summary.__details.__content.style.display = (expanded ? 'none' : ''); + $content.style.display = (expanded ? 'none' : ''); - var hasOpenAttr = summary.__details.getAttribute('open') !== null; + var hasOpenAttr = $module.getAttribute('open') !== null; if (!hasOpenAttr) { - summary.__details.setAttribute('open', 'open'); + $module.setAttribute('open', 'open'); } else { - summary.__details.removeAttribute('open'); + $module.removeAttribute('open'); } } return true @@ -500,19 +826,9 @@ Details.prototype.stateChange = function (summary) { * @param {object} node element */ Details.prototype.destroy = function (node) { - removeEvent(node, 'click'); -}; - -/** -* Initialise an event listener for DOMContentLoaded at document level -* and load at window level -* -* If the first one fires it will set a flag to block the second one -* but if it's not supported then the second one will fire -*/ -Details.prototype.init = function () { - addEvent(document, 'DOMContentLoaded', this.initDetails.bind(this)); - addEvent(window, 'load', this.initDetails.bind(this)); + node.removeEventListener('keypress'); + node.removeEventListener('keyup'); + node.removeEventListener('click'); }; return Details; diff --git a/package/components/error-message/README.md b/package/components/error-message/README.md index 1bc689f990..81f8052a4b 100644 --- a/package/components/error-message/README.md +++ b/package/components/error-message/README.md @@ -42,7 +42,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -70,37 +70,37 @@ If you are using Nunjucks,then macros take the following arguments -classes +text (or) html string No -Optional additional classes +Text to use within the error message. If `html` is provided, the `text` argument will be ignored. -text +id string No -Text to use within the error message +Optional id attribute to add to the error message span tag. -html +classes string No -HTML to use within the error message. If this is provided, the text argument will be ignored. +Optional additional classes to add to the error message span tag. @@ -124,7 +124,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/error-message/_error-message.scss b/package/components/error-message/_error-message.scss index 3706b9a6e1..b97298c3ac 100644 --- a/package/components/error-message/_error-message.scss +++ b/package/components/error-message/_error-message.scss @@ -4,10 +4,10 @@ @include govuk-exports("govuk/component/error-message") { .govuk-error-message { - @include govuk-font-bold-19; + @include govuk-font($size: 19, $weight: bold); display: block; - margin-bottom: $govuk-spacing-scale-3; + margin-bottom: govuk-spacing(3); clear: both; color: $govuk-error-colour; diff --git a/package/components/error-summary/README.md b/package/components/error-summary/README.md index 06f1cfe8d4..9bfb10f46f 100644 --- a/package/components/error-summary/README.md +++ b/package/components/error-summary/README.md @@ -78,7 +78,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -106,73 +106,73 @@ If you are using Nunjucks,then macros take the following arguments -classes +titleText (or) titleHtml string -No +Yes -Optional additional classes +Text or HTML to use for the heading of the error summary block. If `titleHtml` is provided, the `titleText` argument will be ignored. -titleText +descriptionText (or) descriptionHtml string No -Text to use for the heading of the error summary block. +Optional text or HTML description of the errors. If `descriptionhtml` is provided, the `descriptionText` argument will be ignored. -titleHtml +errorList -string +object -No +Yes -HTML to use for the heading of the error summary block. If this is provided, the titleText argument will be ignored. +Contains an array of error link items and all their available arguments. -descriptionText +errorList.{}.href string No -Optional text description of the errors. +Href attribute for the error link item. If provided item will be an anchor. -descriptionHtml +errorList.{}.text (or) errorList.{}.html string -No +Yes -Optional HTML description of the errors. If this is provided, the descriptionText argument will be ignored. +Text or HTML for the error link item. If `html` is provided, the `text` argument will be ignored. -errorList +classes -object +string -Yes +No -Contains an array of error link items and all their available arguments. +Optional additional classes to add to the error-summary container. @@ -196,7 +196,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/error-summary/_error-summary.scss b/package/components/error-summary/_error-summary.scss index 2991bb844c..0f7fe54b14 100644 --- a/package/components/error-summary/_error-summary.scss +++ b/package/components/error-summary/_error-summary.scss @@ -8,30 +8,30 @@ .govuk-error-summary { @include govuk-text-colour; - @include govuk-responsive-padding($govuk-spacing-responsive-4); - @include govuk-responsive-margin($govuk-spacing-responsive-8, "bottom"); + @include govuk-responsive-padding(4); + @include govuk-responsive-margin(8, "bottom"); @include govuk-focusable; border: $govuk-border-width-mobile solid $govuk-error-colour; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { border: $govuk-border-width solid $govuk-error-colour; } } .govuk-error-summary__title { - @include govuk-font-bold-24; + @include govuk-font($size: 24, $weight: bold); margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-error-summary__body { - @include govuk-font-regular-19; + @include govuk-font($size: 19); p { margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } } diff --git a/package/components/error-summary/error-summary.js b/package/components/error-summary/error-summary.js index 104dec7f23..0231993bf2 100644 --- a/package/components/error-summary/error-summary.js +++ b/package/components/error-summary/error-summary.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; (function(undefined) { diff --git a/package/components/fieldset/README.md b/package/components/fieldset/README.md index cde1dc4590..078d313a51 100644 --- a/package/components/fieldset/README.md +++ b/package/components/fieldset/README.md @@ -76,7 +76,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -104,13 +104,13 @@ If you are using Nunjucks,then macros take the following arguments -classes +describedBy string No -Optional additional classes +Text or element id to add to the `aria-describedby` attribute to provide description of the group of fields for screenreader users. @@ -128,31 +128,31 @@ If you are using Nunjucks,then macros take the following arguments -legend.text +legend.{}.text (or) legend.{}.html string No -Legend text +Legend text or HTML. If `html` is provided, the `text` argument will be ignored. -legend.html +legend.{}.classes string No -Legend text +Optional additional classes to add to the legend container. -legend.isPageHeading +legend.{}.isPageHeading boolean @@ -164,6 +164,18 @@ If you are using Nunjucks,then macros take the following arguments +classes + +string + +No + +Optional additional classes to add to the fieldset container. + + + + + attributes object @@ -182,7 +194,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/fieldset/_fieldset.scss b/package/components/fieldset/_fieldset.scss index a80d6dc96d..7cd67eb944 100644 --- a/package/components/fieldset/_fieldset.scss +++ b/package/components/fieldset/_fieldset.scss @@ -11,7 +11,7 @@ } .govuk-fieldset__legend { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; // Fix legend text wrapping in Edge and IE @@ -21,7 +21,7 @@ box-sizing: border-box; // 1 display: table; // 2 max-width: 100%; // 1 - margin-bottom: $govuk-spacing-scale-3; + margin-bottom: govuk-spacing(3); padding: 0; // Hack to let legends or elements within legends have margins in webkit browsers overflow: hidden; @@ -32,19 +32,19 @@ // Modifiers that make legends look more like their equivalent headings .govuk-fieldset__legend--xl { - @include govuk-font-bold-48; + @include govuk-font($size: 48, $weight: bold); } .govuk-fieldset__legend--l { - @include govuk-font-bold-36; + @include govuk-font($size: 36, $weight: bold); } .govuk-fieldset__legend--m { - @include govuk-font-bold-24; + @include govuk-font($size: 24, $weight: bold); } .govuk-fieldset__legend--s { - @include govuk-font-bold-19; + @include govuk-font($size: 19, $weight: bold); } // When the legend contains an H1, we want the H1 to inherit all styles from diff --git a/package/components/file-upload/README.md b/package/components/file-upload/README.md index 4a0336e786..177a43ab79 100644 --- a/package/components/file-upload/README.md +++ b/package/components/file-upload/README.md @@ -183,7 +183,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -211,25 +211,25 @@ If you are using Nunjucks,then macros take the following arguments -id +name string Yes -The id of the input +The name of the input, which is submitted with the form data. -name +id string Yes -The name of the input, which is submitted with the form data +The id of the input @@ -253,7 +253,7 @@ If you are using Nunjucks,then macros take the following arguments Yes -Arguments for the label component +Arguments for the label component. See label component. @@ -289,7 +289,7 @@ If you are using Nunjucks,then macros take the following arguments No -Optional additional classes +Optional additional classes to add to the input tag. @@ -301,7 +301,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example accept or data attributes) to add to the input tag +Any extra HTML attributes (for example accept or data attributes) to add to the input tag. @@ -313,7 +313,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/file-upload/_file-upload.scss b/package/components/file-upload/_file-upload.scss index 194d18aba1..d8a1c65666 100644 --- a/package/components/file-upload/_file-upload.scss +++ b/package/components/file-upload/_file-upload.scss @@ -8,7 +8,7 @@ @include govuk-exports("govuk/component/file-upload") { .govuk-file-upload { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; @include govuk-focusable; } diff --git a/package/components/file-upload/template.njk b/package/components/file-upload/template.njk index 3f7e91f95d..4ba62826f9 100644 --- a/package/components/file-upload/template.njk +++ b/package/components/file-upload/template.njk @@ -1,6 +1,6 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} diff --git a/package/components/footer/README.md b/package/components/footer/README.md index e612c7e113..f437db84d4 100644 --- a/package/components/footer/README.md +++ b/package/components/footer/README.md @@ -24,6 +24,7 @@ Find out when to use the Footer component in your service in the [GOV.UK Design
` default margins - @include govuk-responsive-margin($govuk-spacing-responsive-8, "bottom"); + @include govuk-responsive-margin(8, "bottom"); border: 0; // Reset `
` default borders border-bottom: 1px solid $govuk-footer-border; } @@ -84,7 +83,7 @@ .govuk-footer__meta-item { margin-right: $govuk-gutter-half; - margin-bottom: $govuk-spacing-scale-5; + margin-bottom: govuk-spacing(5); margin-left: $govuk-gutter-half; } @@ -100,9 +99,9 @@ .govuk-footer__licence-logo { display: inline-block; - margin-right: $govuk-spacing-scale-2; + margin-right: govuk-spacing(2); @include mq ($until: desktop) { - margin-bottom: $govuk-spacing-scale-3; + margin-bottom: govuk-spacing(3); } vertical-align: top; } @@ -114,7 +113,7 @@ .govuk-footer__copyright-logo { display: inline-block; min-width: $govuk-footer-crest-image-width; - padding-top: ($govuk-footer-crest-image-height + $govuk-spacing-scale-2); + padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2)); background-image: govuk-image-url("govuk-crest.png"); @include govuk-device-pixel-ratio { background-image: govuk-image-url("govuk-crest-2x.png"); @@ -129,21 +128,21 @@ .govuk-footer__inline-list { margin-top: 0; - margin-bottom: $govuk-spacing-scale-3; + margin-bottom: govuk-spacing(3); padding: 0; } .govuk-footer__inline-list-item { display: inline-block; - margin-right: $govuk-spacing-scale-3; - margin-bottom: $govuk-spacing-scale-1; + margin-right: govuk-spacing(3); + margin-bottom: govuk-spacing(1); } .govuk-footer__heading { - @include govuk-responsive-margin($govuk-spacing-responsive-7, "bottom"); - padding-bottom: $govuk-spacing-scale-4; + @include govuk-responsive-margin(7, "bottom"); + padding-bottom: govuk-spacing(4); @include mq ($until: tablet) { - padding-bottom: $govuk-spacing-scale-2; + padding-bottom: govuk-spacing(2); } border-bottom: 1px solid $govuk-footer-border; } @@ -208,7 +207,7 @@ } .govuk-footer__list-item { - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-footer__list-item:last-child { diff --git a/package/components/footer/template.njk b/package/components/footer/template.njk index 36e691b5d9..b9f5b0b2c1 100644 --- a/package/components/footer/template.njk +++ b/package/components/footer/template.njk @@ -43,8 +43,12 @@ {% endfor %} {% endif %} + {#- The SVG needs `focusable="false"` so that Internet Explorer does not + treat it as an interactive element - without this it will be + 'focusable' when using the keyboard to navigate. #} + + +#### Macro + + {% from 'header/macro.njk' import govukHeader %} + + {{ govukHeader({ + "homepageUrl": "/", + "serviceName": "Service Name", + "serviceUrl": "/components/header", + "containerClasses": "govuk-width-container", + "navigation": [ + { + "href": "#1", + "text": "Navigation item 1", + "active": true + }, + { + "href": "#2", + "text": "Navigation item 2" + }, + { + "href": "#3", + "text": "Navigation item 3" + }, + { + "href": "#4", + "text": "Navigation item 4" + } + ] + }) }} + ## Requirements ### Build tool configuration @@ -227,7 +336,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -255,97 +364,97 @@ If you are using Nunjucks,then macros take the following arguments -classes +homepageUrl string No -Will add classes to the header component root +The url of the homepage. Defaults to / -containerClasses +assetsPath string No -Classes that can be added to the container, useful if you want to make the header fixed width. +The public path for the assets folder. If not provided it defaults to /assets/images -attributes +productName -object +string No -Will add attributes to the footer component root +Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify) -homepageUrl +serviceName string -Yes +No -The url of the hompeage. Defaults to / +Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify) -assetsPath +serviceUrl string -Yes +No -The public path for the assets folder. If not provided it defaults to /assets/images +Url for the service name anchor. -title +navigation -string +array No -Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify) +An array of navigation item objects. -serviceName +navigation.{}.text string No -Header title that is placed next to GOV.UK. Used for product names (i.e. Pay, Verify) +Text of the navigation item. -navigation +navigation.{}.href -array +string No -Navigation items +Url of the navigation item anchor. Both `href` and `text` attributes for navigation items need to be provided to create an item. @@ -357,7 +466,43 @@ If you are using Nunjucks,then macros take the following arguments No -Classes that can be added to the navigation. +Optional classes that can be added to the navigation section of the header. + + + + + +containerClasses + +string + +No + +Optional classes that can be added to the container, useful if you want to make the header fixed width. + + + + + +classes + +string + +No + +Optional additional classes to add to the header container. + + + + + +attributes + +object + +No + +Any extra HTML attributes (for example data attributes) to add to the header container. @@ -369,7 +514,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/header/_header.scss b/package/components/header/_header.scss index ea1a35f801..52737723dc 100644 --- a/package/components/header/_header.scss +++ b/package/components/header/_header.scss @@ -6,38 +6,38 @@ @include govuk-exports("govuk/component/header") { - $govuk-header-background: $govuk-black; - $govuk-header-border-color: $govuk-blue; - $govuk-header-border-width: $govuk-spacing-scale-2; - $govuk-header-text: $govuk-white; - $govuk-header-link: $govuk-white; - $govuk-header-link-hover: $govuk-white; + $govuk-header-background: govuk-colour("black"); + $govuk-header-border-color: $govuk-brand-colour; + $govuk-header-border-width: govuk-spacing(2); + $govuk-header-text: govuk-colour("white"); + $govuk-header-link: govuk-colour("white"); + $govuk-header-link-hover: govuk-colour("white"); $govuk-header-link-active: #1d8feb; $govuk-header-nav-item-border-color: #2e3133; .govuk-header { - @include govuk-font-regular-16; + @include govuk-font($size: 16); - border-bottom: $govuk-spacing-scale-2 solid $govuk-white; + border-bottom: govuk-spacing(2) solid govuk-colour("white"); color: $govuk-header-text; background: $govuk-header-background; } .govuk-header--full-width { - padding: 0 $govuk-spacing-scale-3; + padding: 0 govuk-spacing(3); border-color: $govuk-header-border-color; } .govuk-header__container { position: relative; margin-bottom: -$govuk-header-border-width; - padding-top: $govuk-spacing-scale-2; + padding-top: govuk-spacing(2); border-bottom: $govuk-header-border-width solid $govuk-header-border-color; } .govuk-header__logotype { - margin-right: $govuk-spacing-scale-1; + margin-right: govuk-spacing(1); } .govuk-header__logotype-crown { @@ -54,7 +54,7 @@ } .govuk-header__product-name { - @include govuk-font-regular-24; + @include govuk-font($size: 24); } .govuk-header__link { @@ -72,7 +72,7 @@ } &:focus { - color: $govuk-black; + color: govuk-colour("black"); } // alphagov/govuk_template includes a specific a:link:focus selector @@ -88,8 +88,7 @@ .govuk-header__link--homepage { // Font size needs to be set on the link so that the box sizing is correct // in Firefox - @include govuk-typography-common; - @include govuk-typography-weight-bold; + @include govuk-font($size: false, $weight: bold); display: inline-block; font-size: 30px; // We don't have a mixin that produces 30px font size @@ -110,13 +109,13 @@ .govuk-header__link--service-name { display: inline-block; - margin-bottom: $govuk-spacing-scale-2; - @include govuk-font-bold-24; + margin-bottom: govuk-spacing(2); + @include govuk-font($size: 24, $weight: bold); } .govuk-header__logo { - @include govuk-responsive-margin($govuk-spacing-responsive-2, "bottom"); - padding-right: $govuk-spacing-scale-8; + @include govuk-responsive-margin(2, "bottom"); + padding-right: govuk-spacing(8); @include mq ($from: desktop) { display: inline-block; @@ -134,10 +133,10 @@ } .govuk-header__menu-button { - @include govuk-font-regular-16; + @include govuk-font($size: 16); display: none; position: absolute; - top: $govuk-spacing-scale-4; + top: govuk-spacing(4); right: 0; margin: 0; padding: 0; @@ -152,13 +151,13 @@ &::after { @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block); content: ""; - margin-left: $govuk-spacing-scale-1; + margin-left: govuk-spacing(1); } @include govuk-focusable; @include mq ($from: tablet) { - top: $govuk-spacing-scale-3; + top: govuk-spacing(3); } } @@ -169,7 +168,7 @@ } .govuk-header__navigation { - @include govuk-responsive-margin($govuk-spacing-responsive-2, "bottom"); + @include govuk-responsive-margin(2, "bottom"); display: block; margin: 0; padding: 0; @@ -197,28 +196,28 @@ .govuk-header__navigation--end { @include mq ($from: desktop) { margin: 0; - padding: $govuk-spacing-scale-1 0; + padding: govuk-spacing(1) 0; text-align: right; } } .govuk-header__navigation--no-service-name { - padding-top: $govuk-spacing-scale-7; + padding-top: govuk-spacing(7); } .govuk-header__navigation-item { - padding: $govuk-spacing-scale-2 0; + padding: govuk-spacing(2) 0; border-bottom: 1px solid $govuk-header-nav-item-border-color; @include mq ($from: desktop) { display: inline-block; - margin-right: $govuk-spacing-scale-3; - padding: $govuk-spacing-scale-1 0; + margin-right: govuk-spacing(3); + padding: govuk-spacing(1) 0; border: 0; } a { - @include govuk-font-bold-16; + @include govuk-font($size: 16, $weight: bold); white-space: nowrap; } } @@ -237,10 +236,10 @@ margin-right: 0; } - @include mq($media-type: print) { + @include govuk-media-query($media-type: print) { .govuk-header { border-bottom-width: 0; - color: $govuk-black; + color: govuk-colour("black"); background: transparent; } @@ -252,7 +251,7 @@ .govuk-header__link { &:link, &:visited { - color: $govuk-black; + color: govuk-colour("black"); } // Do not append link href to GOV.UK link when printing (e.g. '(/)') diff --git a/package/components/header/header.js b/package/components/header/header.js index bc0ee0fd56..777baae3f3 100644 --- a/package/components/header/header.js +++ b/package/components/header/header.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; (function(undefined) { diff --git a/package/components/header/template.njk b/package/components/header/template.njk index cb4c462aba..52e7908325 100644 --- a/package/components/header/template.njk +++ b/package/components/header/template.njk @@ -12,9 +12,14 @@ We use currentColour so that we can easily invert it when printing and when the focus state is applied. This also benefits users who override - colours in their browser as they will still see the crown. #} + colours in their browser as they will still see the crown. + + The SVG needs `focusable="false"` so that Internet Explorer does not + treat it as an interactive element - without this it will be + 'focusable' when using the keyboard to navigate. #} -classes +text or (html) html string -No +Yes -Optional additional classes +Text or HTML to use within the hint. If `html` is provided, the `text` argument will be ignored. @@ -102,31 +102,19 @@ If you are using Nunjucks,then macros take the following arguments Yes -The id of the hint - - - -
- -text - -string - -No - -Text to use within the hint +Optional id attribute o add to the hint span tag.
-html +classes string No -HTML to use within the hint. If this is provided, the text argument will be ignored. +Optional additional classes to add to the hint span tag.
@@ -150,7 +138,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/hint/_hint.scss b/package/components/hint/_hint.scss index eb51e5d61c..6dbfa5293b 100644 --- a/package/components/hint/_hint.scss +++ b/package/components/hint/_hint.scss @@ -4,11 +4,11 @@ @include govuk-exports("govuk/component/hint") { .govuk-hint { - @include govuk-font-regular-19; + @include govuk-font($size: 19); display: block; - margin-bottom: $govuk-spacing-scale-3; + margin-bottom: govuk-spacing(3); color: $govuk-secondary-text-colour; } diff --git a/package/components/input/README.md b/package/components/input/README.md index 5b8b6939e2..73f1b4f422 100644 --- a/package/components/input/README.md +++ b/package/components/input/README.md @@ -255,7 +255,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -283,49 +283,49 @@ If you are using Nunjucks,then macros take the following arguments
-classes +id string -No +Yes -Optional additional classes +The id of the input.
-id +name string Yes -The id of the input +The name of the input, which is submitted with the form data.
-name +type string -Yes +No -The name of the input, which is submitted with the form data +Type of input control to render. Defaults to "text".
-type +value string No -Type of input control to render. Defaults to "text" +Optional initial value of the input.
@@ -367,25 +367,25 @@ If you are using Nunjucks,then macros take the following arguments
-attributes +classes -object +string No -Any extra HTML attributes (for example data attributes) to add to the input component. +Optional additional classes add to the input component.
-value +attributes -string +object No -Optional initial value of the input +Any extra HTML attributes (for example data attributes) to add to the input component.
@@ -397,7 +397,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/input/_input.scss b/package/components/input/_input.scss index 400b0efac0..a21fb03f01 100644 --- a/package/components/input/_input.scss +++ b/package/components/input/_input.scss @@ -8,7 +8,7 @@ @include govuk-exports("govuk/component/input") { .govuk-input { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-focusable; -webkit-box-sizing: border-box; @@ -18,7 +18,7 @@ height: 40px; margin-top: 0; - padding: $govuk-spacing-scale-1; + padding: govuk-spacing(1); // setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476) // as background-color and color need to always be set together, color should not be set either border: $govuk-border-width-form-element solid $govuk-input-border-colour; diff --git a/package/components/input/template.njk b/package/components/input/template.njk index cd4c7b5d65..1b7c6d9377 100644 --- a/package/components/input/template.njk +++ b/package/components/input/template.njk @@ -1,6 +1,6 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} diff --git a/package/components/inset-text/README.md b/package/components/inset-text/README.md index f5347a5f01..cdc6d62839 100644 --- a/package/components/inset-text/README.md +++ b/package/components/inset-text/README.md @@ -56,7 +56,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -84,49 +84,37 @@ If you are using Nunjucks,then macros take the following arguments
-classes - -string - -No - -Optional additional classes - -
- -
- -id +text (or) html string Yes -The id of the inset text +Text or HTML to use within the inset text. If `html` is provided, the `text` argument will be ignored.
-text +id string No -Text to use within the inset text +Optional id attribute to add to the inset text container.
-html +classes string No -HTML to use within the inset text. If this is provided, the text argument will be ignored. +Optional additional classes to add to the inset text container.
@@ -138,7 +126,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example data attributes) to add to the inset text div tag. +Any extra HTML attributes (for example data attributes) to add to the inset text container. @@ -150,7 +138,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/inset-text/_inset-text.scss b/package/components/inset-text/_inset-text.scss index 0fa81420e8..820d6762c6 100644 --- a/package/components/inset-text/_inset-text.scss +++ b/package/components/inset-text/_inset-text.scss @@ -4,13 +4,13 @@ @include govuk-exports("govuk/component/inset-text") { .govuk-inset-text { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; - padding: $govuk-spacing-scale-3; + padding: govuk-spacing(3); // Margin top intended to collapse // This adds an additional 10px to the paragraph above - @include govuk-responsive-margin($govuk-spacing-responsive-6, "top"); - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "top"); + @include govuk-responsive-margin(6, "bottom"); clear: both; diff --git a/package/components/label/README.md b/package/components/label/README.md index 2661e28c14..fcc0c02340 100644 --- a/package/components/label/README.md +++ b/package/components/label/README.md @@ -30,7 +30,7 @@ Use labels for all form fields. #### Markup -
diff --git a/package/components/radios/README.md b/package/components/radios/README.md index b70db1cffd..5d19cb9efe 100644 --- a/package/components/radios/README.md +++ b/package/components/radios/README.md @@ -236,14 +236,14 @@ Find out when to use the Radios component in your service in the [GOV.UK Design
@@ -270,11 +270,11 @@ Find out when to use the Radios component in your service in the [GOV.UK Design "items": [ { "value": "part-2", - "html": "Part 2 of the Housing Act 2004 For properties that are 3 or more stories high and occupied by 5 or more people" + "html": "Part 2 of the Housing Act 2004 For properties that are 3 or more stories high and occupied by 5 or more people" }, { "value": "part-3", - "html": "Part 3 of the Housing Act 2004 For properties that are within a geographical area defined by a local council" + "html": "Part 3 of the Housing Act 2004 For properties that are within a geographical area defined by a local council" } ] }) }} @@ -429,7 +429,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -493,91 +493,103 @@ If you are using Nunjucks,then macros take the following arguments -classes +idPrefix string No -Optional additional classes +String to prefix id for each radio item if no id is specified on each item. If`idPrefix` is not passed, fallback to using the name attribute instead. -idPrefix +name string -No +Yes -String to prefix id for each radio item if no id is specified on each item. +Name attribute for each radio item. -name +items -string +array Yes -Name attribute for each radio item. +Array of checkbox items objects. -items +items.{}.text (or) items.{}.html -array +string Yes -Array of radio items. +Text or HTML to use within each radio item label. If `html` is provided, the `text` argument will be ignored. -text +items.{}.id string No -Text to use within the radio label. +Specific id attribute for the radio item. If ommited, then `idPrefix` string will be applied. -html +items.{}.name string -No +Yes + +Specific name for the radio item. If ommited, then component global `name` string will be applied. + + + + -HTML to use within the radio label. If this is provided, the text argument will be ignored. +items.{}.value + +string + +Yes + +Value for the radio input. -label +items.{}.label object No -Provide additional attributes to the radio label. +Provide additional attributes to each radio item label. See `label` component for more details. -checked +items.{}.checked boolean @@ -589,7 +601,31 @@ If you are using Nunjucks,then macros take the following arguments -disabled +items.{}.conditional + +boolean + +No + +If true, content provided will be revealed when the item is checked. + + + + + +items.{}.conditional.html + +boolean + +No + +Provide content for the conditional reveal. + + + + + +items.{}.disabled boolean @@ -601,13 +637,25 @@ If you are using Nunjucks,then macros take the following arguments +classes + +string + +No + +Optional additional classes to add to the radios container. + + + + + attributes object No -Any extra HTML attributes (for example data attributes) to add to the radio container. +Any extra HTML attributes (for example data attributes) to add to the radios container. @@ -619,7 +667,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/radios/_radios.scss b/package/components/radios/_radios.scss index 6ea24453a6..ed8032e91f 100644 --- a/package/components/radios/_radios.scss +++ b/package/components/radios/_radios.scss @@ -8,11 +8,11 @@ @import "../label/label"; @include govuk-exports("govuk/component/radios") { - $govuk-radios-size: $govuk-spacing-scale-7; - $govuk-radios-label-padding-left-right: $govuk-spacing-scale-3; + $govuk-radios-size: govuk-spacing(7); + $govuk-radios-label-padding-left-right: govuk-spacing(3); .govuk-radios__item { - @include govuk-font-regular-19; + @include govuk-font($size: 19); display: block; @@ -20,7 +20,7 @@ min-height: $govuk-radios-size; - margin-bottom: $govuk-spacing-scale-2; + margin-bottom: govuk-spacing(2); padding: 0 0 0 $govuk-radios-size; clear: left; @@ -59,7 +59,7 @@ .govuk-radios__label { display: block; - padding: 8px $govuk-radios-label-padding-left-right $govuk-spacing-scale-1; + padding: 8px $govuk-radios-label-padding-left-right govuk-spacing(1); cursor: pointer; // remove 300ms pause on mobile -ms-touch-action: manipulation; @@ -86,13 +86,13 @@ content: ""; position: absolute; - top: $govuk-spacing-scale-2; - left: $govuk-spacing-scale-2; + top: govuk-spacing(2); + left: govuk-spacing(2); width: 0; height: 0; - border: $govuk-spacing-scale-2 solid currentColor; + border: govuk-spacing(2) solid currentColor; border-radius: 50%; opacity: 0; background: currentColor; @@ -125,7 +125,7 @@ @include govuk-clearfix; .govuk-radios__item { - margin-right: $govuk-spacing-scale-4; + margin-right: govuk-spacing(4); float: left; clear: none; } @@ -141,7 +141,7 @@ $conditional-padding-left: $conditional-border-padding + $govuk-radios-label-padding-left-right; .govuk-radios__conditional { - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); margin-left: $conditional-margin-left; padding-left: $conditional-padding-left; border-left: $conditional-border-width solid $govuk-border-colour; diff --git a/package/components/radios/radios.js b/package/components/radios/radios.js index c672c6de74..e292b842be 100644 --- a/package/components/radios/radios.js +++ b/package/components/radios/radios.js @@ -1,7 +1,7 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('all', factory) : - (global.all = factory()); + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : + (global.GOVUKFrontend = factory()); }(this, (function () { 'use strict'; (function(undefined) { @@ -659,14 +659,6 @@ if (detect) return }) .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); -/** -* Add event construct for modern browsers or IE8 -* which fires the callback with a pre-converted target reference -* @param {object} node element -* @param {string} type event type (e.g. click, load, or error) -* @param {function} callback function -*/ - /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill * This seems to fail in IE8, requires more investigation. diff --git a/package/components/radios/template.njk b/package/components/radios/template.njk index 59c7ba30ce..fe2f24dd1d 100644 --- a/package/components/radios/template.njk +++ b/package/components/radios/template.njk @@ -1,7 +1,7 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "fieldset/macro.njk" import govukFieldset %} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../fieldset/macro.njk" import govukFieldset %} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- If an id 'prefix' is not passed, fall back to using the name attribute instead. We need this for error messages and hints as well -#} diff --git a/package/components/select/README.md b/package/components/select/README.md index 8610b1dab2..d9924e2f6a 100644 --- a/package/components/select/README.md +++ b/package/components/select/README.md @@ -190,7 +190,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -218,18 +218,6 @@ If you are using Nunjucks,then macros take the following arguments -classes - -string - -No - -Optional additional classes. - - - - - id string @@ -266,7 +254,7 @@ If you are using Nunjucks,then macros take the following arguments -value +item.value string @@ -278,7 +266,7 @@ If you are using Nunjucks,then macros take the following arguments -text +item.text string @@ -290,7 +278,7 @@ If you are using Nunjucks,then macros take the following arguments -selected +item.selected boolean @@ -302,7 +290,7 @@ If you are using Nunjucks,then macros take the following arguments -disabled +item.disabled boolean @@ -350,6 +338,18 @@ If you are using Nunjucks,then macros take the following arguments +classes + +string + +No + +Optional additional classes to add to the select component. + + + + + attributes object @@ -368,7 +368,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/select/_select.scss b/package/components/select/_select.scss index 5ef5e224f8..0fc49d7502 100644 --- a/package/components/select/_select.scss +++ b/package/components/select/_select.scss @@ -8,11 +8,7 @@ @include govuk-exports("govuk/component/select") { .govuk-select { - @include govuk-font-regular; - @include govuk-typography-responsive( - $govuk-font-19, - $override-line-height: 1.25 - ); + @include govuk-font($size: 19, $line-height: 1.25); @include govuk-focusable; -webkit-box-sizing: border-box; @@ -21,15 +17,15 @@ width: 100%; height: 40px; - padding: $govuk-spacing-scale-1; // was 5px 4px 4px - size of it should be adjusted to match other form elements + padding: govuk-spacing(1); // was 5px 4px 4px - size of it should be adjusted to match other form elements border: $govuk-border-width-form-element solid $govuk-input-border-colour; } .govuk-select option:active, .govuk-select option:checked, .govuk-select:focus::-ms-value { - color: $govuk-white; - background-color: $govuk-blue; + color: govuk-colour("white"); + background-color: govuk-colour("blue"); } .govuk-select--error { diff --git a/package/components/select/template.njk b/package/components/select/template.njk index 23d3c45495..844176e484 100644 --- a/package/components/select/template.njk +++ b/package/components/select/template.njk @@ -1,6 +1,6 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} diff --git a/package/components/skip-link/README.md b/package/components/skip-link/README.md index a078033a79..dfe5711af7 100644 --- a/package/components/skip-link/README.md +++ b/package/components/skip-link/README.md @@ -41,7 +41,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -69,37 +69,25 @@ If you are using Nunjucks,then macros take the following arguments -href - -string - -Yes - -The value of the skip link href attribute. Defaults to #content - - - - - -text +text (or) html string No -Text to use within the skip link. +Text or HTML to use within the skip link. If `html` is provided, the `text` argument will be ignored. -html +href string -No +Yes -HTML to use within the skip link. If this is provided, the text argument will be ignored. +The value of the skip link href attribute. Defaults to #content @@ -111,7 +99,7 @@ If you are using Nunjucks,then macros take the following arguments No -Optional additional classes for the skip link. +Optional additional classes to add to the skip link. @@ -135,7 +123,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/skip-link/_skip-link.scss b/package/components/skip-link/_skip-link.scss index 764958ae52..db4b3dc8ac 100644 --- a/package/components/skip-link/_skip-link.scss +++ b/package/components/skip-link/_skip-link.scss @@ -7,9 +7,9 @@ @include govuk-visually-hidden-focusable; @include govuk-link-common; @include govuk-link-style-text; - @include govuk-typography-responsive($govuk-font-16); + @include govuk-typography-responsive($size: 16); display: block; - padding: $govuk-spacing-scale-2 $govuk-spacing-scale-3; + padding: govuk-spacing(2) govuk-spacing(3); } } diff --git a/package/components/table/README.md b/package/components/table/README.md index 91487b506e..c707ee4aca 100644 --- a/package/components/table/README.md +++ b/package/components/table/README.md @@ -352,7 +352,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -380,49 +380,61 @@ If you are using Nunjucks,then macros take the following arguments -classes +rows + +array + +Yes + +Array of table rows and cells. + + + + + +rows.[].text (or) rows.[].html string -No +Yes -Optional additional classes. +Text or HTML for cells in table rows. If `html` is specified, the `text` argument will be ignored. -caption +rows.[].format string No -Optional caption text. +Specify format of a cell. Currently we only use "numeric". -captionClasses +rows.[].colspan -string +number No -Optional classes for caption text size. Class should correspond to the available typography heading classes. +Specify how many columns a cell extends. -firstCellIsHeader +rows.[].rowspan -boolean +number No -If set to true, first cell in table row will be a TH instead of a TD. +Specify how many rows a cell extends. @@ -434,79 +446,103 @@ If you are using Nunjucks,then macros take the following arguments No -Optional array of table head cells +Optional array of table head cells. -rows +head.[].text or head.[].html array -Yes +No -Array of table rows and cells. +Optional array of table head cells. If `html` is specified, the `text` argument will be ignored. + + + + + +head.[].colspan + +number + +No + +Specify how many columns a cell extends. + + + + + +head.[].rowspan + +number + +No + +Specify how many rows a cell extends. -text +head.[].format string No -Text for cells in table head and rows. +Specify format of a cell. Currently we only use "numeric". -html +caption string No -HTML for cells in table head and rows. If this is specified, the text argument will be ignored. +Optional caption text. -format +captionClasses string No -Specify format of any cell. Currently we only use "numeric". +Optional classes for caption text size. Class should correspond to the available typography heading classes. -colspan +firstCellIsHeader -number +boolean No -Specify how many columns the cell extends. +If set to true, first cell in table row will be a TH instead of a TD. -rowspan +classes -number +string No -Specify how many rows the cell extends. +Optional additional classes to add to the table container. @@ -530,7 +566,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/table/_table.scss b/package/components/table/_table.scss index 45d7e820f7..acfa89db07 100644 --- a/package/components/table/_table.scss +++ b/package/components/table/_table.scss @@ -4,10 +4,10 @@ @include govuk-exports("govuk/component/table") { .govuk-table { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; width: 100%; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "bottom"); border-spacing: 0; border-collapse: collapse; @@ -16,19 +16,19 @@ .govuk-table__header { @include govuk-typography-weight-bold; - padding: govuk-em($govuk-spacing-scale-2, 19px) govuk-em($govuk-spacing-scale-4, 19px) govuk-em($govuk-spacing-scale-2, 19px) 0; + padding: govuk-em(govuk-spacing(2), 19px) govuk-em(govuk-spacing(4), 19px) govuk-em(govuk-spacing(2), 19px) 0; border-bottom: 1px solid $govuk-border-colour; text-align: left; } .govuk-table__cell { - padding: govuk-em($govuk-spacing-scale-2, 19px) govuk-em($govuk-spacing-scale-4, 19px) govuk-em($govuk-spacing-scale-2, 19px) 0; + padding: govuk-em(govuk-spacing(2), 19px) govuk-em(govuk-spacing(4), 19px) govuk-em(govuk-spacing(2), 19px) 0; border-bottom: 1px solid $govuk-border-colour; text-align: left; } .govuk-table__cell--numeric { - @include govuk-font-regular-tabular; + @include govuk-font($size: false, $tabular: true); } .govuk-table__header--numeric, diff --git a/package/components/tag/README.md b/package/components/tag/README.md index e641d5117a..c61c27b774 100644 --- a/package/components/tag/README.md +++ b/package/components/tag/README.md @@ -61,7 +61,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -89,37 +89,25 @@ If you are using Nunjucks,then macros take the following arguments -classes - -string - -No - -Optional additional classes - - - - - -text +text (or) html string No -Text for the tag component. +Text or HTML to use within for the tag component. If `html` is provided, the `text` argument will be ignored. -html +classes string No -HTML to use within for the tag component. If this is provided, the text argument will be ignored. +Optional additional classes to add to the tag container. @@ -143,7 +131,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/tag/_tag.scss b/package/components/tag/_tag.scss index 8ee4256b74..30674160e4 100644 --- a/package/components/tag/_tag.scss +++ b/package/components/tag/_tag.scss @@ -4,17 +4,13 @@ @include govuk-exports("govuk/component/tag") { .govuk-tag { - @include govuk-font-bold; - @include govuk-typography-responsive( - $govuk-font-16, - $override-line-height: 1.25 - ); + @include govuk-font($size: 16, $weight: bold, $line-height: 1.25); display: inline-block; - padding: $govuk-spacing-scale-1 8px 0; + padding: govuk-spacing(1) 8px 0; - color: $govuk-white; - background-color: $govuk-blue; + color: govuk-colour("white"); + background-color: govuk-colour("blue"); letter-spacing: 1px; text-decoration: none; @@ -22,6 +18,6 @@ } .govuk-tag--inactive { - background-color: $govuk-grey-1; + background-color: govuk-colour("grey-1"); } } diff --git a/package/components/textarea/README.md b/package/components/textarea/README.md index 6cc83048c7..fdda7620c9 100644 --- a/package/components/textarea/README.md +++ b/package/components/textarea/README.md @@ -177,7 +177,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -205,25 +205,25 @@ If you are using Nunjucks,then macros take the following arguments -classes +id string -No +Yes -Optional additional classes +The id of the textarea -id +describedBy string -Yes +No -The id of the textarea +Text or element id to add to the `aria-describedby` attribute to provide description for screenreader users. @@ -235,7 +235,7 @@ If you are using Nunjucks,then macros take the following arguments Yes -The name of the textarea, which is submitted with the form data +The name of the textarea, which is submitted with the form data. @@ -247,7 +247,7 @@ If you are using Nunjucks,then macros take the following arguments No -Optional number of textarea rows (default is 5 rows) +Optional number of textarea rows (default is 5 rows). @@ -259,7 +259,7 @@ If you are using Nunjucks,then macros take the following arguments No -Optional initial value of the textarea +Optional initial value of the textarea. @@ -271,7 +271,7 @@ If you are using Nunjucks,then macros take the following arguments Yes -Arguments for the label component +Arguments for the label component. See label component. @@ -301,13 +301,25 @@ If you are using Nunjucks,then macros take the following arguments +classes + +string + +No + +Optional additional classes to add to the textarea tag. + + + + + attributes object No -Any extra HTML attributes (for example data attributes) to add to the textarea tag +Any extra HTML attributes (for example data attributes) to add to the textarea tag. @@ -319,7 +331,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/textarea/_textarea.scss b/package/components/textarea/_textarea.scss index cab7901928..76cc4e1d4a 100644 --- a/package/components/textarea/_textarea.scss +++ b/package/components/textarea/_textarea.scss @@ -8,11 +8,7 @@ @include govuk-exports("govuk/component/textarea") { .govuk-textarea { - @include govuk-font-regular; - @include govuk-typography-responsive( - $govuk-font-19, - $override-line-height: 1.25 - ); + @include govuk-font($size: 19, $line-height: 1.25); @include govuk-focusable; -webkit-box-sizing: border-box; @@ -20,8 +16,8 @@ box-sizing: border-box; // should this be global? display: block; width: 100%; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); - padding: $govuk-spacing-scale-1; + @include govuk-responsive-margin(6, "bottom"); + padding: govuk-spacing(1); border: $govuk-border-width-form-element solid $govuk-input-border-colour; border-radius: 0; diff --git a/package/components/textarea/template.njk b/package/components/textarea/template.njk index 5372d51417..9f6b5c54fc 100644 --- a/package/components/textarea/template.njk +++ b/package/components/textarea/template.njk @@ -1,6 +1,6 @@ -{% from "error-message/macro.njk" import govukErrorMessage -%} -{% from "hint/macro.njk" import govukHint %} -{% from "label/macro.njk" import govukLabel %} +{% from "../error-message/macro.njk" import govukErrorMessage -%} +{% from "../hint/macro.njk" import govukHint %} +{% from "../label/macro.njk" import govukLabel %} {#- a record of other elements that we need to associate with the input using aria-describedby – for example hints or error messages -#} diff --git a/package/components/warning-text/README.md b/package/components/warning-text/README.md index c84dde611d..a335713b39 100644 --- a/package/components/warning-text/README.md +++ b/package/components/warning-text/README.md @@ -17,7 +17,7 @@ Find out when to use the Warning text component in your service in the [GOV.UK D #### Markup
- + Warning You can be fined up to £5,000 if you don’t register. @@ -47,7 +47,7 @@ When compiling the Sass files you'll need to define includePaths to reference th In order to include the images used in the components, you need to configure your app to show these assets. Below is a sample configuration using Express js: - app.use('/assets', express.static(path.join(__dirname, '/node_modules/@govuk-frontend/frontend/assets'))) + app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/assets'))) ## Component arguments @@ -75,13 +75,13 @@ If you are using Nunjucks,then macros take the following arguments -classes +text (or) html string -No +Yes -Optional additional classes +Text or HTML for the warning text content. If `html` is provided, the `text` argument is ignored. @@ -99,25 +99,13 @@ If you are using Nunjucks,then macros take the following arguments -text - -string - -Yes - -The text next to the icon - - - - - -html +classes string -Yes +No -HTML for the warning text content. If this is provided, the text argument is ignored. +Optional additional classes to add to the warning-text container. @@ -129,7 +117,7 @@ If you are using Nunjucks,then macros take the following arguments No -Any extra HTML attributes (for example data attributes) to add to the textarea tag +Any extra HTML attributes (for example data attributes) to add to the warning-text container. @@ -141,7 +129,7 @@ If you are using Nunjucks,then macros take the following arguments Below is an example setup using express configure views: - nunjucks.configure('node_modules/@govuk-frontend/frontend/components', { + nunjucks.configure('node_modules/govuk-frontend/components', { autoescape: true, cache: false, express: app diff --git a/package/components/warning-text/_warning-text.scss b/package/components/warning-text/_warning-text.scss index 73bbb60879..b36d1bcf61 100644 --- a/package/components/warning-text/_warning-text.scss +++ b/package/components/warning-text/_warning-text.scss @@ -2,17 +2,15 @@ @import "../../tools/all"; @import "../../helpers/all"; -@import "../../objects/shapes"; - @include govuk-exports("govuk/component/warning-text") { .govuk-warning-text { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; position: relative; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); - padding: $govuk-spacing-scale-2 0; + @include govuk-responsive-margin(6, "bottom"); + padding: govuk-spacing(2) 0; } .govuk-warning-text__assistive { @@ -20,7 +18,7 @@ } .govuk-warning-text__icon { - @include govuk-font-bold; + @include govuk-font($size: false, $weight: bold); display: inline-block; @@ -33,8 +31,15 @@ margin-top: -20px; // Half the height of the 38px circle (adjusted for NTA) padding-top: 3px; + border-radius: 50%; + + color: govuk-colour("white"); + background: govuk-colour("black"); + font-size: 1.6em; line-height: 35px; + + text-align: center; } .govuk-warning-text__text { diff --git a/package/components/warning-text/template.njk b/package/components/warning-text/template.njk index d962ec8e9c..38e6c5c841 100644 --- a/package/components/warning-text/template.njk +++ b/package/components/warning-text/template.njk @@ -1,9 +1,7 @@ -{% from "warning-text/macro.njk" import govukWarningText -%} -
- + {{ params.iconFallbackText }} {{ params.html | safe if params.html else params.text }} diff --git a/package/core/_all.scss b/package/core/_all.scss index dd39164fde..6acbb5fae9 100644 --- a/package/core/_all.scss +++ b/package/core/_all.scss @@ -2,6 +2,5 @@ @import "lists"; @import "template"; @import "typography"; -@import "prose-scope"; @import "section-break"; @import "global-styles"; diff --git a/package/core/_links.scss b/package/core/_links.scss index d4de885188..8307dc0c96 100644 --- a/package/core/_links.scss +++ b/package/core/_links.scss @@ -1,9 +1,5 @@ @include govuk-exports("govuk/core/links") { - // We use a placeholder class here so that we can @extend from the prose scope - // without also applying every other occurrence of the .govuk-link selector to - // the prose scope. - %govuk-link { @include govuk-link-common; @include govuk-link-style-default; diff --git a/package/core/_lists.scss b/package/core/_lists.scss index 8c3a1b7675..3cd3c24ff9 100644 --- a/package/core/_lists.scss +++ b/package/core/_lists.scss @@ -1,26 +1,22 @@ @include govuk-exports("govuk/core/lists") { - // We use a placeholder class here so that we can @extend from the prose scope - // without also applying every other occurrence of the .govuk-list selector to - // the prose scope. - %govuk-list { - @include govuk-font-regular-19; + @include govuk-font($size: 19); @include govuk-text-colour; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); padding-left: 0; list-style-type: none; // Add a top margin for nested lists %govuk-list { - margin-top: $govuk-spacing-scale-2; + margin-top: govuk-spacing(2); } } %govuk-list > li { - @include mq($from: tablet) { - margin-bottom: $govuk-spacing-scale-1; + @include govuk-media-query($from: tablet) { + margin-bottom: govuk-spacing(1); } } @@ -47,7 +43,7 @@ } %govuk-list--bullet { - padding-left: $govuk-spacing-scale-4; + padding-left: govuk-spacing(4); list-style-type: disc; } @@ -57,7 +53,7 @@ } %govuk-list--number { - padding-left: $govuk-spacing-scale-4; + padding-left: govuk-spacing(4); list-style-type: decimal; } diff --git a/package/core/_prose-scope.scss b/package/core/_prose-scope.scss deleted file mode 100644 index d706f4e02e..0000000000 --- a/package/core/_prose-scope.scss +++ /dev/null @@ -1,57 +0,0 @@ -@include govuk-exports("govuk/core/prose-scope") { - .govuk-prose-scope { - - // @extend inheritance - - // Contextual heading and paragraph combinations are inherited - // through the use of @extend - - h1 { - @extend %govuk-heading-xl; - } - - h2 { - @extend %govuk-heading-l; - } - - h3 { - @extend %govuk-heading-m; - } - - h4 { - @extend %govuk-heading-s; - } - - p { - @extend %govuk-body-m; - } - - strong, - b { - @include govuk-typography-weight-bold; - } - - ul, - ol { - @extend %govuk-list; - } - - ol { - @extend %govuk-list--number; - } - - ul { - @extend %govuk-list--bullet; - } - - a { - @extend %govuk-link; - } - - hr { - @extend %govuk-section-break; - @extend %govuk-section-break--visible; - @extend %govuk-section-break--xl; - } - } -} diff --git a/package/core/_section-break.scss b/package/core/_section-break.scss index 41de577797..a316d31bf7 100644 --- a/package/core/_section-break.scss +++ b/package/core/_section-break.scss @@ -1,7 +1,5 @@ @include govuk-exports("govuk/core/section-break") { - // We use placeholder classes here so that we can @extend from the prose scope - %govuk-section-break { margin: 0; border: 0; @@ -20,8 +18,8 @@ // Sizes %govuk-section-break--xl { - @include govuk-responsive-margin($govuk-spacing-responsive-8, "top"); - @include govuk-responsive-margin($govuk-spacing-responsive-8, "bottom"); + @include govuk-responsive-margin(8, "top"); + @include govuk-responsive-margin(8, "bottom"); } .govuk-section-break--xl { @@ -29,8 +27,8 @@ } %govuk-section-break--l { - @include govuk-responsive-margin($govuk-spacing-responsive-6, "top"); - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "top"); + @include govuk-responsive-margin(6, "bottom"); } .govuk-section-break--l { @@ -38,8 +36,8 @@ } %govuk-section-break--m { - @include govuk-responsive-margin($govuk-spacing-responsive-4, "top"); - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "top"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-section-break--m { diff --git a/package/core/_typography.scss b/package/core/_typography.scss index 1073970b5f..db5bf99559 100644 --- a/package/core/_typography.scss +++ b/package/core/_typography.scss @@ -1,19 +1,15 @@ @include govuk-exports("govuk/core/typography") { - // We use placeholder classes here so that we can @extend from the prose scope - // without also applying every other occurrence of the typography selectors to - // the prose scope. - // Headings %govuk-heading-xl { @include govuk-text-colour; - @include govuk-font-bold-48; + @include govuk-font($size: 48, $weight: bold); display: block; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-8, "bottom"); + @include govuk-responsive-margin(8, "bottom"); } .govuk-heading-xl { @@ -22,12 +18,12 @@ %govuk-heading-l { @include govuk-text-colour; - @include govuk-font-bold-36; + @include govuk-font($size: 36, $weight: bold); display: block; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "bottom"); } .govuk-heading-l { @@ -36,12 +32,12 @@ %govuk-heading-m { @include govuk-text-colour; - @include govuk-font-bold-24; + @include govuk-font($size: 24, $weight: bold); display: block; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-heading-m { @@ -50,12 +46,12 @@ %govuk-heading-s { @include govuk-text-colour; - @include govuk-font-bold-19; + @include govuk-font($size: 19, $weight: bold); display: block; margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-heading-s { @@ -63,35 +59,32 @@ } // Captions to be used inside headings - // - // As these are not used in the prose scope, there is no need to use - // placeholder classes. .govuk-caption-xl { - @include govuk-font-regular-27; + @include govuk-font($size: 27); display: block; - margin-bottom: $govuk-spacing-scale-1; + margin-bottom: govuk-spacing(1); color: $govuk-secondary-text-colour; } .govuk-caption-l { - @include govuk-font-regular-24; + @include govuk-font($size: 24); display: block; - margin-bottom: $govuk-spacing-scale-1; + margin-bottom: govuk-spacing(1); color: $govuk-secondary-text-colour; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { margin-bottom: 0; } } .govuk-caption-m { - @include govuk-font-regular-19; + @include govuk-font($size: 19); display: block; @@ -102,10 +95,10 @@ %govuk-body-l { @include govuk-text-colour; - @include govuk-font-regular-24; + @include govuk-font($size: 24); margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "bottom"); } .govuk-body-l { @@ -114,10 +107,10 @@ %govuk-body-m { @include govuk-text-colour; - @include govuk-font-regular-19; + @include govuk-font($size: 19); margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-body-m { @@ -126,10 +119,10 @@ %govuk-body-s { @include govuk-text-colour; - @include govuk-font-regular-16; + @include govuk-font($size: 16); margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-body-s { @@ -138,10 +131,10 @@ %govuk-body-xs { @include govuk-text-colour; - @include govuk-font-regular-14; + @include govuk-font($size: 14); margin-top: 0; - @include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom"); + @include govuk-responsive-margin(4, "bottom"); } .govuk-body-xs { @@ -162,24 +155,20 @@ } // Contextual adjustments - // - // Because these adjustments are made to the placeholder classes, they will - // be inherited by the prose scope as well. - // Add top padding to headings that appear directly after paragraphs. %govuk-body-l + %govuk-heading-l { - padding-top: $govuk-spacing-scale-1; + padding-top: govuk-spacing(1); - @include mq($from: tablet) { - padding-top: $govuk-spacing-scale-2; + @include govuk-media-query($from: tablet) { + padding-top: govuk-spacing(2); } } %govuk-body-m + %govuk-heading-l, %govuk-body-s + %govuk-heading-l, %govuk-list + %govuk-heading-l { - @include govuk-responsive-padding($govuk-spacing-responsive-4, "top"); + @include govuk-responsive-padding(4, "top"); } %govuk-body-m + %govuk-heading-m, @@ -188,10 +177,10 @@ %govuk-body-m + %govuk-heading-s, %govuk-body-s + %govuk-heading-s, %govuk-list + %govuk-heading-s { - padding-top: $govuk-spacing-scale-1; + padding-top: govuk-spacing(1); - @include mq($from: tablet) { - padding-top: $govuk-spacing-scale-2; + @include govuk-media-query($from: tablet) { + padding-top: govuk-spacing(2); } } } diff --git a/package/helpers/_all.scss b/package/helpers/_all.scss index 60730395a8..4eb1c0c34e 100644 --- a/package/helpers/_all.scss +++ b/package/helpers/_all.scss @@ -1,4 +1,5 @@ @import "clearfix"; +@import "colour"; @import "device-pixels"; @import "focusable"; @import "font-faces"; diff --git a/package/helpers/_clearfix.scss b/package/helpers/_clearfix.scss index 91e26bae79..b5c2e14419 100644 --- a/package/helpers/_clearfix.scss +++ b/package/helpers/_clearfix.scss @@ -1,6 +1,11 @@ -@import "../tools/exports"; +//// +/// @group helpers +//// + +/// Clear floated content within a container using a pseudo element +/// +/// @access public -// Mixin to clear floats @mixin govuk-clearfix { &:after { content: ""; @@ -8,4 +13,3 @@ clear: both; } } - diff --git a/package/helpers/_colour.scss b/package/helpers/_colour.scss new file mode 100644 index 0000000000..8c9e58a7ea --- /dev/null +++ b/package/helpers/_colour.scss @@ -0,0 +1,51 @@ +@import "../settings/colours-palette"; +@import "../settings/colours-organisations"; + +//// +/// @group helpers/colour +//// + +/// Get colour +/// +/// @param {String} $colour - Name of colour from the colour palette +/// (`$govuk-colours`) +/// @return {Colour} Representation of named colour +/// @throw if `$colour` is not a colour from the colour palette +/// @access public + +@function govuk-colour($colour) { + $colour: quote($colour); + + @if not map-has-key($govuk-colours, $colour) { + @error "Unknown colour `#{$colour}`"; + } + + @return map-get($govuk-colours, $colour); +} + +/// Get the colour for a government organisation +/// +/// @param {String} $organisation - Organisation name, lowercase, hyphenated +/// @param {Boolean} $websafe [true] - By default a 'websafe' version of the +/// colour will be returned which meets contrast requirements . If you want to +/// use the non-websafe version you can set this to `false` but your should +/// ensure that you still meets contrast requirements for accessibility - for +/// example, don't use the non-websafe version for text. +/// +/// @return {Colour} Representation of colour for organisation +/// @throw if `$organisation` is not a known organisation +/// @access public + +@function govuk-organisation-colour($organisation, $websafe: true) { + @if not map-has-key($govuk-colours-organisations, $organisation) { + @error "Unknown organisation `#{$organisation}`"; + } + + $org-colour: map-get($govuk-colours-organisations, $organisation); + + @if ($websafe and map-has-key($org-colour, colour-websafe)) { + @return map-get($org-colour, colour-websafe); + } @else { + @return map-get($org-colour, colour); + } +} diff --git a/package/helpers/_device-pixels.scss b/package/helpers/_device-pixels.scss index 4e017f4058..e8202b55cd 100644 --- a/package/helpers/_device-pixels.scss +++ b/package/helpers/_device-pixels.scss @@ -1,4 +1,32 @@ -// Utse retina image +//// +/// @group helpers +//// + +/// Media query for retina images (device-pixel-ratio) +/// +/// @param {Number} $ratio [2] - Device pixel ratio +/// @content Passed content will be outputted within the media query +/// +/// @example scss - Providing a @2x image for screens that support it +/// background-image: govuk-image-url("my-image.png"); +/// +/// @include govuk-device-pixel-ratio { +/// background-image: govuk-image-url("my-image-2x.png"); +/// } +/// +/// @example scss - Using a custom ratio +/// background-image: govuk-image-url("my-image.png"); +/// +/// @include govuk-device-pixel-ratio { +/// background-image: govuk-image-url("my-image-2x.png"); +/// } +/// +/// @include govuk-device-pixel-ratio(3) { +/// background-image: govuk-image-url("my-image-3x.png"); +/// } +/// +/// @access public + @mixin govuk-device-pixel-ratio($ratio: 2) { @media only screen and (-webkit-min-device-pixel-ratio: $ratio), only screen and (min--moz-device-pixel-ratio: $ratio), diff --git a/package/helpers/_focusable.scss b/package/helpers/_focusable.scss index 357dd1aa73..4b80de08cd 100644 --- a/package/helpers/_focusable.scss +++ b/package/helpers/_focusable.scss @@ -1,8 +1,15 @@ -// Focusable helper -// -// Provides an additional outline to clearly indicate when the target element is -// focussed. Used for interactive elements which themselves have some background -// or border, such as most form elements. +//// +/// @group helpers +//// + +/// Focusable helper +/// +/// Provides an additional outline to clearly indicate when the target element is +/// focussed. Used for interactive elements which themselves have some background +/// or border, such as most form elements. +/// +/// @access public + @mixin govuk-focusable { &:focus { outline: $govuk-focus-width solid $govuk-focus-colour; @@ -10,11 +17,14 @@ } } -// Focusable with fill helper -// -// Provides an additional outline and background colour to clearly indicate when -// the target element is focussed. Used for interactive text-based elements such -// as links. +/// Focusable with fill helper +/// +/// Provides an additional outline and background colour to clearly indicate when +/// the target element is focussed. Used for interactive text-based elements such +/// as links. +/// +/// @access public + @mixin govuk-focusable-fill { &:focus { outline: $govuk-focus-width solid $govuk-focus-colour; diff --git a/package/helpers/_font-faces.scss b/package/helpers/_font-faces.scss index 1e77fb46cf..794c0a7bdf 100644 --- a/package/helpers/_font-faces.scss +++ b/package/helpers/_font-faces.scss @@ -1,9 +1,20 @@ -@import "../tools/exports"; +//// +/// @group helpers +//// // Disables linting for this file only // sass-lint:disable no-css-comments, no-duplicate-properties, property-sort-order, indentation -@mixin govuk-font-face-nta { +@import "../tools/exports"; + +/// Font Face - NTA +/// +/// Outputs the font-face declaration for NTA at the root of the CSS document +/// the first time it is called. +/// +/// @access private + +@mixin _govuk-font-face-nta { @include govuk-exports("govuk/helpers/font-face") { @at-root { /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ diff --git a/package/helpers/_grid.scss b/package/helpers/_grid.scss index 8e5204c16b..1cfeff043e 100644 --- a/package/helpers/_grid.scss +++ b/package/helpers/_grid.scss @@ -1,5 +1,13 @@ -// default map of available grid column widths -$grid-widths: ( +//// +/// @group helpers +//// + +/// Map of grid column widths +/// +/// @type Map +/// @access private + +$_govuk-grid-widths: ( one-quarter: 25%, one-third: 33.3333%, one-half: 50%, @@ -8,27 +16,36 @@ $grid-widths: ( full: 100% ) !default; -// helper funtion to get the value from map +/// Grid width percentage +/// +/// @param {String} $key - Name of grid width (e.g. two-thirds) +/// @return {Number} Percentage width +/// @throw if `$key` is not a valid grid width +/// @access public + @function grid-width($key) { - @if map-has-key($grid-widths, $key) { - @return map-get($grid-widths, $key); + @if map-has-key($_govuk-grid-widths, $key) { + @return map-get($_govuk-grid-widths, $key); } - @error "Unknown `#{$key}` in $grid-width."; + @error "Unknown grid width `#{$key}`"; } -// Mixin to generate grid row styles -// Creates a grid row class with a standardised margin. -// Usage: -// Default: -// @include govuk-grid-row; -// -// Optional: Provide a custom grid row class: -// @include govuk-grid-row("app-grid"); - -@mixin govuk-grid-row($class: null) { - $class: "govuk-grid-row" !default; +/// Generate grid row styles +/// +/// Creates a grid row class with a standardised margin. +/// +/// @param {String} $class [govuk-grid-row] CSS class name +/// +/// @example scss - Default +/// @include govuk-grid-row; +/// +/// @example scss - Customising the class name +/// @include govuk-grid-row("app-grid"); +/// +/// @access public +@mixin govuk-grid-row($class: "govuk-grid-row") { .#{$class} { @include govuk-clearfix; margin-right: - ($govuk-gutter-half); @@ -36,44 +53,37 @@ $grid-widths: ( } } -// A mixin to generate grid column styles -// Creates a cross browser grid column with a class of '.govuk-grid-column' by default -// and a standardised gutter between the columns. -// Common widths are predefined above as keywords in the `$grid-widths` map. -// By default their width chnages from 100% to specified width at 'tablet' breakpoint, -// but that can be configured to be any other breapoint by using the `$at` argument. -// -// Arguments: -// @param $class: "govuk-grid-column" (default) -// @param $width: one-quarter | one-third | one-half | two-third | three-quarters | full (default) -// @param $float: left (default) | right -// @param $at: mobile | tablet (default) | desktop | any custom breapoint in px or em -// -// Usage: -// Default: -// @include govuk-grid-column(two-thirds) -// -// Custom class: -// @include govuk-grid-column(one-half, $class: "test-column"); -// -// Change breakpoint where width percentage is applied: -// @include govuk-grid-column(one-half, $at: desktop); -// -// Change float direction: -// @include govuk-grid-column(one-half, $float: right); - -@mixin govuk-grid-column( - $width: null, - $float: null, - $at: null, - $class: null) { - - $class: "govuk-grid-column" !default; - - $width: if($width != null, $width, full); - $float: if($float != null, $float, left) !default; - $at: if($at != null, $at, tablet) !default; +/// Generate grid column styles +/// +/// Creates a cross browser grid column with a class of '.govuk-grid-column' by +/// default, and a standardised gutter between the columns. +/// +/// Common widths are predefined above as keywords in the `$grid-widths` map. +/// +/// By default their width changes from 100% to specified width at the 'tablet' +/// breakpoint, but that can be configured to be any other breakpoint by using +/// the `$at` parameter. +/// +/// @param {String} $class [govuk-grid-column] CSS class name +/// @param {String} $width [full] one-quarter | one-third | one-half | two-third | three-quarters | full +/// @param {String} $float [left] left | right +/// @param {String} $at [tablet] - mobile | tablet | desktop | any custom breakpoint in px or em +/// +/// @example scss - Default +/// @include govuk-grid-column(two-thirds) +/// +/// @example scss - Customising the class name +/// @include govuk-grid-column(one-half, $class: "test-column"); +/// +/// @example scss - Customising the breakpoint where width percentage is applied +/// @include govuk-grid-column(one-half, $at: desktop); +/// +/// @example scss - Customising the float direction +/// @include govuk-grid-column(one-half, $float: right); +/// +/// @access public +@mixin govuk-grid-column($width: full, $float: left, $at: tablet, $class: "govuk-grid-column") { .#{$class}-#{$width} { -webkit-box-sizing: border-box; @@ -82,7 +92,7 @@ $grid-widths: ( width: 100%; } padding: 0 $govuk-gutter-half; - @include mq($from: $at) { + @include govuk-media-query($from: $at) { width: grid-width($width); float: $float; } diff --git a/package/helpers/_links.scss b/package/helpers/_links.scss index d2eadedbb1..073b4df0aa 100644 --- a/package/helpers/_links.scss +++ b/package/helpers/_links.scss @@ -1,6 +1,13 @@ +//// +/// @group helpers +//// + /// Common link mixin /// /// Provides the typography and focus state, regardless of link style. +/// +/// @access public + @mixin govuk-link-common { @include govuk-typography-common; @include govuk-focusable-fill; @@ -18,6 +25,9 @@ /// @include govuk-link-common; /// @include govuk-link-style-muted; /// } +/// +/// @access public + @mixin govuk-link-style-default { &:link { color: $govuk-link-colour; @@ -49,12 +59,15 @@ /// @include govuk-link-common; /// @include govuk-link-style-muted; /// } +/// +/// @access public + @mixin govuk-link-style-muted { &:link, &:visited, &:hover, &:active { - color: $govuk-grey-1; + color: $govuk-secondary-text-colour; } // When focussed, the text colour needs to be darker to ensure that colour @@ -86,7 +99,10 @@ /// @include govuk-link-common; /// @include govuk-link-style-text; /// } -@mixin govuk-link-style-text($include-common-styles: true) { +/// +/// @access public + +@mixin govuk-link-style-text { // Override link colour to use text colour &:link, &:visited, @@ -110,8 +126,11 @@ /// /// When printing, append the the destination URL to the link text, as long /// as the URL starts with either `/`, `http://` or `https://`. +/// +/// @access public + @mixin govuk-link-print-friendly { - @include mq($media-type: print) { + @include govuk-media-query($media-type: print) { &[href^="/"], &[href^="http://"], diff --git a/package/helpers/_media-queries.scss b/package/helpers/_media-queries.scss index 90bff65ad1..00ea0ae6c2 100644 --- a/package/helpers/_media-queries.scss +++ b/package/helpers/_media-queries.scss @@ -1,4 +1,30 @@ -// We use sass-mq module for media queries +//// +/// @group helpers +//// + + + +// ========================================================= +// Wrangle sass-mq config... +// ========================================================= + +// Pass our breakpoints and static breakpoint definitions through to sass-mq. +$mq-breakpoints: if(variable-exists(govuk-breakpoints), $govuk-breakpoints, ()); +$mq-static-breakpoint: if(variable-exists(govuk-ie8-breakpoint), $govuk-ie8-breakpoint, desktop); + +$mq-show-breakpoints: (); + +@if (variable-exists(govuk-show-breakpoints) and $govuk-show-breakpoints) { + $mq-show-breakpoints: map-keys($govuk-breakpoints); +} + +// When building a stylesheet for IE8, set $mq-responsive to false in order to +// 'rasterize' any media queries. + +$mq-responsive: true; +@if (variable-exists(govuk-is-ie8) and $govuk-is-ie8) { + $mq-responsive: false; +} // This is a horrible, horrible hack to prevent the 'dev mode' CSS to display // the current breakpoint from being included multiple times. @@ -14,3 +40,56 @@ $sass-mq-already-included: false !default; @import "../vendor/sass-mq"; $sass-mq-already-included: true; + + + +// ========================================================= +// Helpers +// ========================================================= + +/// Media Query +/// +/// This is a currently a wrapper for sass-mq - abstracted so that we can +/// replace it in the future if we so choose. +/// +/// @param {String | Boolean} $from [false] - One of $govuk-breakpoints +/// @param {String | Boolean} $until [false] - One of $govuk-breakpoints +/// @param {String | Boolean} $and [false] - Additional media query parameters +/// @param {String} $media-type [all] - Media type: screen, print… +/// +/// @ignore Undocumented mq API, for advanced use only: +/// @ignore @param {Map} $breakpoints [$govuk-breakpoints] +/// @ignore @param {String} $static-breakpoint [$govuk-ie8-breakpoint] +/// @ignore @param {Boolean} $responsive [$govuk-is-ie8] +/// +/// @content styling rules, wrapped into a @media query when $responsive is true +/// +/// @example scss +/// .element { +/// @include govuk-media-query($from: mobile) { +/// color: red; +/// } +/// @include govuk-media-query($until: tablet) { +/// color: blue; +/// } +/// @include govuk-media-query(mobile, tablet) { +/// color: green; +/// } +/// @include govuk-media-query($from: tablet, $and: '(orientation: landscape)') { +/// color: teal; +/// } +/// @include govuk-media-query(950px) { +/// color: hotpink; +/// } +/// @include govuk-media-query(tablet, $media-type: screen) { +/// color: hotpink; +/// } +/// } +/// +/// @access public + +@mixin govuk-media-query($args...) { + @include mq($args...) { + @content; + }; +} diff --git a/package/helpers/_shape-arrow.scss b/package/helpers/_shape-arrow.scss index 6ae93c652b..962184b149 100644 --- a/package/helpers/_shape-arrow.scss +++ b/package/helpers/_shape-arrow.scss @@ -1,28 +1,40 @@ -// Calculate the height of an equilateral triangle -// -// Multiplying half the length of the base of an equilateral triangle by the -// square root of three gives us its height. We use 1.732 as an approximation. -@function govuk-equilateral-height($base) { +//// +/// @group helpers +//// + +/// Calculate the height of an equilateral triangle +/// +/// Multiplying half the length of the base of an equilateral triangle by the +/// square root of three gives us its height. We use 1.732 as an approximation. +/// +/// @param {Number} $base - Length of the base of the triangle +/// @return {Number} Calculated height of the triangle +/// @access private + +@function _govuk-equilateral-height($base) { $square-root-of-three: 1.732; @return ($base / 2) * $square-root-of-three; } -// Arrow mixin -// -// Generate Arrows (triangles) by using a mix of transparent (1) and coloured -// borders. The coloured borders inherit the text colour of the element (2). -// -// Ensure the arrow is rendered correctly if browser colours are overridden by -// providing a clip path (3). Without this the transparent borders are -// overridden to become visible which results in a square. -// -// We need both because older browsers do not support clip-path. -// -// @param {Direction} $direction - Direction for arrow: up, right, down, left. -// @param {Base} $base - Length of the triangle 'base' side -// @param {Height} $height - Height of triangle. Omit for equilateral. -// @param {Display} $display - CSS display property of the arrow: block as default +/// Arrow mixin +/// +/// Generate Arrows (triangles) by using a mix of transparent (1) and coloured +/// borders. The coloured borders inherit the text colour of the element (2). +/// +/// Ensure the arrow is rendered correctly if browser colours are overridden by +/// providing a clip path (3). Without this the transparent borders are +/// overridden to become visible which results in a square. +/// +/// We need both because older browsers do not support clip-path. +/// +/// @param {String} $direction - Direction for arrow: up, right, down, left. +/// @param {Number} $base - Length of the triangle 'base' side +/// @param {Number} $height [null] - Height of triangle. Omit for equilateral. +/// @param {String} $display [block] - CSS display property of the arrow +/// +/// @access public + @mixin govuk-shape-arrow($direction, $base, $height: null, $display: block) { display: $display; @@ -35,7 +47,7 @@ $perpendicular: $base / 2; @if ($height == null) { - $height: govuk-equilateral-height($base); + $height: _govuk-equilateral-height($base); } @if $direction == "up" { diff --git a/package/helpers/_spacing.scss b/package/helpers/_spacing.scss index 35273533fe..343ec8175c 100644 --- a/package/helpers/_spacing.scss +++ b/package/helpers/_spacing.scss @@ -1,34 +1,77 @@ -// Create responsive spacing, with media query for each breakpoint as set -// in settings/spacing, - -// Create responsive margins -// Arguments: -// $value = top \ right \ bottom \ left \ all -@mixin govuk-responsive-margin($scale-map, $value: "all", $important: false, $adjustment: false) { - @include govuk-responsive-spacing($scale-map, "margin", $value, $important, $adjustment); -} +//// +/// @group helpers +//// + +/// Single point spacing +/// +/// Returns measurement corresponding to the spacing point requested. +/// +/// @param {Number} $spacing-point - Point on the spacing scale (set in `settings/_spacing.sccs`) +/// +/// @returns {String} Spacing Measurement eg. 10px +/// +/// @example scss +/// .element { +/// padding: govuk-spacing(5); +/// top: govuk-spacing(2) !important; // if `!important` is required +/// } +/// @access public + +@function govuk-spacing($spacing-point) { + + $actual-input-type: type-of($spacing-point); + @if $actual-input-type != "number" { + @error "Expected a number (integer), but got a " + + "#{$actual-input-type}."; + } -// // Create responsive padding -// // Arguments: -// // $value = top \ right \ bottom \ left \ all -@mixin govuk-responsive-padding($scale-map, $value: "all", $important: false, $adjustment: false) { - @include govuk-responsive-spacing($scale-map, "padding", $value, $important, $adjustment); + @if not map-has-key($govuk-spacing-points, $spacing-point) { + @error "Unknown spacing variable `#{$spacing-point}`. Make sure you are using a point from the spacing scale in `_settings/spacing.scss`."; + } + + @return map-get($govuk-spacing-points, $spacing-point); } -// Base mixin, also used by 'generate-spacing-overrides' mixin -@mixin govuk-responsive-spacing($scale-map, $property, $value: "all", $important: false, $adjustment: false) { - - // Ensure that $scale-map is actually a map - it's really easy to accidentally - // pass in a point from the non-responsive scale, in which case this mixin - // would otherwise no-op silently. - $actual-input-type: type-of($scale-map); - @if $actual-input-type != "map" { - @error "Expected a map of breakpoints from the responsive scale, but got a " - + "#{$actual-input-type}. Make sure you are using a point from the " - + "responsive spacing scale."; +/// Responsive spacing +/// +/// Adds responsive spacing (either padding or margin, depending on `$property`) +/// by fetching a 'spacing map' from the responsive spacing scale, which defines +/// different spacing values at different breakpoints. +/// +/// To generate responsive spacing, use 'govuk-responsive-margin' or +/// 'govuk-responsive-padding' mixins +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $property - Property to add spacing to (e.g. 'margin') +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing by +/// +/// @access private + +@mixin _govuk-responsive-spacing($responsive-spacing-point, $property, $direction: "all", $important: false, $adjustment: false) { + + $actual-input-type: type-of($responsive-spacing-point); + @if $actual-input-type != "number" { + @error "Expected a number (integer), but got a " + "#{$actual-input-type}."; + } + + @if not map-has-key($govuk-spacing-responsive-scale, $responsive-spacing-point) { + @error "Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the " + + "responsive spacing scale in `_settings/spacing.scss`."; + } + + // Make sure that the return value from `_settings/spacing.scss` is a map. + $scale-map: map-get($govuk-spacing-responsive-scale, $responsive-spacing-point); + $actual-map-type: type-of($scale-map); + @if $actual-map-type != "map" { + @error "Expected a number (integer), but got a " + + "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)"; } - // Loop through each breakpoint + // Loop through each breakpoint in the map @each $breakpoint, $breakpoint-value in $scale-map { @if ($adjustment) { @@ -38,19 +81,72 @@ // The 'null' breakpoint is for mobile. @if $breakpoint == null { - @if $value == all { + @if $direction == all { #{$property}: $breakpoint-value iff($important, !important); } @else { - #{$property}-#{$value}: $breakpoint-value iff($important, !important); + #{$property}-#{$direction}: $breakpoint-value iff($important, !important); } } @else { - @include mq($from: $breakpoint) { - @if $value == all { + @include govuk-media-query($from: $breakpoint) { + @if $direction == all { #{$property}: $breakpoint-value iff($important, !important); } @else { - #{$property}-#{$value}: $breakpoint-value iff($important, !important); + #{$property}-#{$direction}: $breakpoint-value iff($important, !important); } } } } } + +/// Responsive margin +/// +/// Adds responsive margin by fetching a 'spacing map' from the responsive +/// spacing scale, which defines different spacing values at different +/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin. +/// +/// @see {mixin} _govuk-responsive-spacing +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing by +/// +/// @example scss +/// .element { +/// @include govuk-responsive-margin(6, "left", $adjustment: 1px); +/// } +/// +/// @access public + +@mixin govuk-responsive-margin($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) { + @include _govuk-responsive-spacing($responsive-spacing-point, "margin", $direction, $important, $adjustment); +} + +/// Responsive padding +/// +/// Adds responsive padding by fetching a 'spacing map' from the responsive +/// spacing scale, which defines different spacing values at different +/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin. +/// +/// @see {mixin} _govuk-responsive-spacing +/// +/// @param {Number} $responsive-spacing-point - Point on the responsive spacing +/// scale, corresponds to a map of breakpoints and spacing values +/// @param {String} $direction [all] - Direction to add spacing to +/// (`top`, `right`, `bottom`, `left`, `all`) +/// @param {Boolean} $important [false] - Whether to mark as `!important` +/// @param {Number} $adjustment [false] - Offset to adjust spacing +/// +/// @example scss +/// .element { +/// @include govuk-responsive-padding(6, "left", $adjustment: 1px); +/// } +/// +/// @access public + + +@mixin govuk-responsive-padding($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) { + @include _govuk-responsive-spacing($responsive-spacing-point, "padding", $direction, $important, $adjustment); +} diff --git a/package/helpers/_typography.scss b/package/helpers/_typography.scss index ad02c2e1c9..1b0ba20ef2 100644 --- a/package/helpers/_typography.scss +++ b/package/helpers/_typography.scss @@ -1,90 +1,102 @@ -// 'Common typography' helper -// -// Sets the font family and associated properties, such as font smoothing. Also -// overrides the font for print. - -@mixin govuk-typography-common($font-family: $govuk-font-stack) { +//// +/// @group helpers +//// + +/// 'Common typography' helper +/// +/// Sets the font family and associated properties, such as font smoothing. Also +/// overrides the font for print. +/// +/// @param {List} $font-family [$govuk-font-family] Font family to use +/// @access public + +@mixin govuk-typography-common($font-family: $govuk-font-family) { font-family: $font-family; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; // If using NTA, include the font-face definition - @if ($govuk-font-stack == $govuk-nta-light) { - @include govuk-font-face-nta; + @if ($govuk-font-family == $govuk-font-family-nta) { + @include _govuk-font-face-nta; } - @include mq($media-type: print) { - font-family: $govuk-font-stack-print; + @include govuk-media-query($media-type: print) { + font-family: $govuk-font-family-print; } } -// Text colour helper -// -// Sets the text colour, including a suitable override for print. +/// Text colour helper +/// +/// Sets the text colour, including a suitable override for print. +/// +/// @access public @mixin govuk-text-colour { color: $govuk-text-colour; - @include mq($media-type: print) { + @include govuk-media-query($media-type: print) { color: $govuk-print-text-colour; } } -// Regular font weight helper -// -// @param {Boolean} $important - Whether to mark declarations as important. -// Generally Used to create override classes. +/// Regular font weight helper +/// +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. Generally Used to create override classes. +/// @access public @mixin govuk-typography-weight-regular($important: false) { font-weight: $govuk-font-weight-regular iff($important, !important); } -// Bold font weight helper -// -// @param {Boolean} $important - Whether to mark declarations as important. -// Generally Used to create override classes. +/// Bold font weight helper +/// +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. Generally Used to create override classes. +/// @access public @mixin govuk-typography-weight-bold($important: false) { font-weight: $govuk-font-weight-bold iff($important, !important); } -// Responsive typography helper -// -// Takes a 'font map' as an argument and uses it to create font-size and -// line-height declarations for different breakpoints, and for print. -// -// Example font map: -// -// $my-font-map: ( -// null: ( -// font-size: 16px, -// line-height: 20px -// ), -// tablet: ( -// font-size: 19px, -// line-height: 25px -// ), -// print: ( -// font-size: 14pt, -// line-height: 1.15 -// ) -// ); -// -// @param {Map} $font-map - Font map -// @param {Number} $override-line-height - Non responsive custom line height. -// Omit to use the line height from the font map. -// @param {Boolean} $important - Whether to mark declarations as important. -// Generally Used to create override classes. - -@mixin govuk-typography-responsive($font-map, $override-line-height: false, $important: false) { - - // Ensure that $font-map is actually a map - $actual-input-type: type-of($font-map); - @if $actual-input-type != "map" { - @error "Expected a map of breakpoints and font sizes, but got a " - + "#{$actual-input-type}. Make sure you are passing a font map."; +/// Responsive typography helper +/// +/// Takes a 'font map' as an argument and uses it to create font-size and +/// line-height declarations for different breakpoints, and for print. +/// +/// Example font map: +/// +/// $my-font-map: ( +/// null: ( +/// font-size: 16px, +/// line-height: 20px +/// ), +/// tablet: ( +/// font-size: 19px, +/// line-height: 25px +/// ), +/// print: ( +/// font-size: 14pt, +/// line-height: 1.15 +/// ) +/// ); +/// +/// @param {Map} $font-map - Font map +/// @param {Number} $override-line-height [false] - Non responsive custom line +/// height. Omit to use the line height from the font map. +/// @param {Boolean} $important [false] - Whether to mark declarations as +/// `!important`. +/// +/// @access public + +@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) { + + @if not map-has-key($govuk-typography-scale, $size) { + @error "Unknown font size `#{$size}` - expected a point from the typography scale."; } + $font-map: map-get($govuk-typography-scale, $size); + @each $breakpoint, $breakpoint-map in $font-map { $font-size: map-get($breakpoint-map, "font-size") iff($important, !important); $line-height: map-get($breakpoint-map, "line-height") iff($important, !important); @@ -99,12 +111,12 @@ font-size: $font-size; line-height: $line-height; } @elseif $breakpoint == "print" { - @include mq($media-type: print) { + @include govuk-media-query($media-type: print) { font-size: $font-size; line-height: $line-height; } } @else { - @include mq($from: $breakpoint) { + @include govuk-media-query($from: $breakpoint) { font-size: $font-size; line-height: $line-height; } @@ -112,196 +124,30 @@ } } -// The following helpers are 'syntactic sugar' for common typography -// combinations and are not documented individually. -// -// Frustratingly, you can't generate mixins programmatically so we have to -// define these 'by hand'. - -// Regular weights - -@mixin govuk-font-regular { - @include govuk-typography-common; - @include govuk-typography-weight-regular; -} - -@mixin govuk-font-regular-80 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-80); -} - -@mixin govuk-font-regular-48 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-48); -} - -@mixin govuk-font-regular-36 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-36); -} - -@mixin govuk-font-regular-27 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-27); -} - -@mixin govuk-font-regular-24 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-24); -} - -@mixin govuk-font-regular-19 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-19); -} - -@mixin govuk-font-regular-16 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-16); -} - -@mixin govuk-font-regular-14 { - @include govuk-font-regular; - @include govuk-typography-responsive($govuk-font-14); -} - -// Bold weights - -@mixin govuk-font-bold { - @include govuk-typography-common; - @include govuk-typography-weight-bold; -} - -@mixin govuk-font-bold-80 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-80); -} - -@mixin govuk-font-bold-48 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-48); -} - -@mixin govuk-font-bold-36 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-36); -} - -@mixin govuk-font-bold-27 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-27); -} - -@mixin govuk-font-bold-24 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-24); -} - -@mixin govuk-font-bold-19 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-19); -} - -@mixin govuk-font-bold-16 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-16); -} - -@mixin govuk-font-bold-14 { - @include govuk-font-bold; - @include govuk-typography-responsive($govuk-font-14); -} - -// Regular weights, tabular numbers - -@mixin govuk-font-regular-tabular { - @include govuk-typography-common($font-family: $govuk-nta-light-tabular); - @include govuk-typography-weight-regular; -} - -@mixin govuk-font-regular-tabular-80 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-80); -} - -@mixin govuk-font-regular-tabular-48 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-48); -} - -@mixin govuk-font-regular-tabular-36 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-36); -} - -@mixin govuk-font-regular-tabular-27 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-27); -} - -@mixin govuk-font-regular-tabular-24 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-24); -} - -@mixin govuk-font-regular-tabular-19 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-19); -} - -@mixin govuk-font-regular-tabular-16 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-16); -} - -@mixin govuk-font-regular-tabular-14 { - @include govuk-font-regular-tabular; - @include govuk-typography-responsive($govuk-font-14); -} - -// Bold weights, tabular numbers - -@mixin govuk-font-bold-tabular { - @include govuk-typography-common($font-family: $govuk-nta-light-tabular); - @include govuk-typography-weight-bold; -} - -@mixin govuk-font-bold-tabular-80 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-80); -} - -@mixin govuk-font-bold-tabular-48 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-48); -} - -@mixin govuk-font-bold-tabular-36 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-36); -} - -@mixin govuk-font-bold-tabular-27 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-27); -} - -@mixin govuk-font-bold-tabular-24 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-24); -} - -@mixin govuk-font-bold-tabular-19 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-19); -} +/// Font helper +/// +/// @param {Number} $size - Size of the font as it would appear on desktop - +/// uses the responsive font size map +/// @param {String} $weight [regular] - Weight: `bold` or `regular` +/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not +/// @param {Number} $line-height [false] - Line-height, if overriding the default +/// +/// @access public + +@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) { + @if $tabular { + @include govuk-typography-common($font-family: $govuk-font-family-tabular); + } @else { + @include govuk-typography-common; + } -@mixin govuk-font-bold-tabular-16 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-16); -} + @if $weight == regular { + @include govuk-typography-weight-regular; + } @else if $weight == bold { + @include govuk-typography-weight-bold; + } -@mixin govuk-font-bold-tabular-14 { - @include govuk-font-bold-tabular; - @include govuk-typography-responsive($govuk-font-14); + @if $size { + @include govuk-typography-responsive($size, $override-line-height: $line-height); + } } diff --git a/package/helpers/_visually-hidden.scss b/package/helpers/_visually-hidden.scss index 01fdee408e..084789997e 100644 --- a/package/helpers/_visually-hidden.scss +++ b/package/helpers/_visually-hidden.scss @@ -1,11 +1,15 @@ -// Thanks, h5bp/html5-boilerplate +//// +/// @group helpers +//// -// Hide only visually, but have it available for screen readers: -// https://snook.ca/archives/html_and_css/hiding-content-for-accessibility -// -// 1. For long content, line feeds are not interpreted as spaces and small width -// causes content to wrap 1 word per line: -// https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe +/// Hide an element visually, but have it available for screen readers +/// +/// @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility +/// - Hiding Content for Accessibility, Jonathan Snook, February 2011 +/// @link https://github.com/h5bp/html5-boilerplate/blob/9f13695d21ff92c55c78dfa9f16bb02a1b6e911f/src/css/main.css#L121-L158 +/// - h5bp/html5-boilerplate - Thanks! +/// +/// @access public @mixin govuk-visually-hidden { position: absolute; @@ -22,14 +26,20 @@ border: 0; - white-space: nowrap; // 1 + // For long content, line feeds are not interpreted as spaces and small width + // causes content to wrap 1 word per line: + // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe + white-space: nowrap; } -// Allow the element to be focusable when navigated to via the keyboard (e.g. -// for the skip link) -// -// Slightly less opinionated about borders and padding to make it easier to -// style the focussable element. +/// Hide an element visually, but have it available for screen readers whilst +/// allowing the element to be focused when navigated to via the keyboard (e.g. +/// for the skip link) +/// +/// This is slightly less opinionated about borders and padding to make it +/// easier to style the focussed element. +/// +/// @access public @mixin govuk-visually-hidden-focusable { position: absolute; @@ -43,7 +53,10 @@ -webkit-clip-path: inset(50%); clip-path: inset(50%); - white-space: nowrap; // 1 + // For long content, line feeds are not interpreted as spaces and small width + // causes content to wrap 1 word per line: + // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe + white-space: nowrap; &:active, &:focus { diff --git a/package/objects/_all.scss b/package/objects/_all.scss index 2ef2d88429..bd079d1516 100644 --- a/package/objects/_all.scss +++ b/package/objects/_all.scss @@ -1,5 +1,4 @@ @import "form-group"; @import "grid"; @import "main-wrapper"; -@import "shapes"; @import "width-container"; diff --git a/package/objects/_form-group.scss b/package/objects/_form-group.scss index 6471f68f98..cfe388d0e2 100644 --- a/package/objects/_form-group.scss +++ b/package/objects/_form-group.scss @@ -1,7 +1,7 @@ @include govuk-exports("govuk/objects/form-group") { .govuk-form-group { - @include govuk-responsive-margin($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-margin(6, "bottom"); .govuk-form-group:last-of-type { margin-bottom: 0; // Remove margin from last item in nested groups @@ -9,7 +9,7 @@ } .govuk-form-group--error { - padding-left: $govuk-spacing-scale-3; + padding-left: govuk-spacing(3); border-left: $govuk-border-width-form-group-error solid $govuk-error-colour; .govuk-form-group { diff --git a/package/objects/_main-wrapper.scss b/package/objects/_main-wrapper.scss index dbb33862d2..81ae191620 100644 --- a/package/objects/_main-wrapper.scss +++ b/package/objects/_main-wrapper.scss @@ -17,13 +17,13 @@ @mixin govuk-main-wrapper { - @include govuk-responsive-padding($govuk-spacing-responsive-6, "top"); - @include govuk-responsive-padding($govuk-spacing-responsive-6, "bottom"); + @include govuk-responsive-padding(6, "top"); + @include govuk-responsive-padding(6, "bottom"); } // Use govuk-main-wrapper--l when you page does not have Breadcrumbs, phase banners or back links @mixin govuk-main-wrapper--l { - @include govuk-responsive-padding($govuk-spacing-responsive-8, "top"); + @include govuk-responsive-padding(8, "top"); } @include govuk-exports("govuk/objects/main-wrapper") { diff --git a/package/objects/_shapes.scss b/package/objects/_shapes.scss deleted file mode 100644 index 1da7fa1e74..0000000000 --- a/package/objects/_shapes.scss +++ /dev/null @@ -1,9 +0,0 @@ -@include govuk-exports("govuk/objects/shapes") { - .govuk-circle { - display: inline-block; - border-radius: 50%; - color: $govuk-white; - background: $govuk-black; - text-align: center; - } -} diff --git a/package/objects/_width-container.scss b/package/objects/_width-container.scss index 1160915570..f97d8e798d 100644 --- a/package/objects/_width-container.scss +++ b/package/objects/_width-container.scss @@ -10,13 +10,13 @@ margin: 0 $govuk-gutter-half; // On tablet, add full width gutters - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { margin: 0 $govuk-gutter; } // As soon as the viewport is greater than the width of the page plus the // gutters, just centre the content instead of adding gutters. - @include mq($and: "(min-width: #{($govuk-page-width + $govuk-gutter * 2)})") { + @include govuk-media-query($and: "(min-width: #{($govuk-page-width + $govuk-gutter * 2)})") { margin: 0 auto; } } diff --git a/package/overrides/_spacing.scss b/package/overrides/_spacing.scss index 7ba51f6542..7c21fa64d8 100644 --- a/package/overrides/_spacing.scss +++ b/package/overrides/_spacing.scss @@ -1,50 +1,58 @@ -// Spacing directions -$spacing-directions: ( - "top": "t", - "right": "r", - "bottom": "b", - "left": "l" +//// +/// @group overrides +//// + +/// Directions for spacing +/// +/// @type Map +/// @access private + +$_spacing-directions: ( + "top", + "right", + "bottom", + "left" ) !default; -// Generate spacing override classes for the given property (e.g. margin) -// for each point in the spacing scale. - -// These override classes are responsive - the 'r' before the scale point -// indicates that. We might want to add non-responsive ones later. -// -// Example output: -// -// .govuk-\!-m-r0 { -// margin: 0; -// } -// -// [..] -// -// .govuk-\!-mt-r1 { -// margin-top: [whatever spacing point 1 is...] -// } - -@mixin generate-spacing-overrides($property, $property-shorthand) { +/// Spacing override classes +/// +/// Generate spacing override classes for the given property (e.g. margin) +/// for each point in the spacing scale. +/// +/// @param {String} $property - Property to add spacing to (e.g. 'margin') +/// +/// @example scss +/// .govuk-\!-margin-0 { +/// margin: 0; +/// } +/// +/// .govuk-\!-margin-top-1 { +/// margin-top: [whatever spacing point 1 is...] +/// } +/// +/// @access private + +@mixin _govuk-generate-spacing-overrides($property) { // For each point in the spacing scale (defined in settings), create an // override that affects all directions... @each $scale-point, $scale-map in $govuk-spacing-responsive-scale { - .govuk-\!-#{$property-shorthand}-r#{$scale-point} { + .govuk-\!-#{$property}-#{$scale-point} { - @include govuk-responsive-spacing($scale-map, $property, "all", true); + @include _govuk-responsive-spacing($scale-point, $property, "all", true); } // ... and then an override for each individual direction - @each $direction-name, $direction-shorthand in $spacing-directions { + @each $direction in $_spacing-directions { - .govuk-\!-#{$property-shorthand}#{$direction-shorthand}-r#{$scale-point} { - @include govuk-responsive-spacing($scale-map, $property, $direction-name, true); + .govuk-\!-#{$property}-#{$direction}-#{$scale-point} { + @include _govuk-responsive-spacing($scale-point, $property, $direction, true); } } } } @include govuk-exports("govuk/overrides/spacing") { - @include generate-spacing-overrides("margin", "m"); - @include generate-spacing-overrides("padding", "p"); + @include _govuk-generate-spacing-overrides("margin"); + @include _govuk-generate-spacing-overrides("padding"); } diff --git a/package/overrides/_typography.scss b/package/overrides/_typography.scss index 0430439130..56069ec1ab 100644 --- a/package/overrides/_typography.scss +++ b/package/overrides/_typography.scss @@ -2,20 +2,20 @@ // Font size and line height // Generate typography override classes for each responsive font map in the - // typography scale eg .govuk-\!-f-80 - @each $size, $font-map in $govuk-typography-scale { - .govuk-\!-f-#{$size} { - @include govuk-typography-responsive($font-map, $important: true); + // typography scale eg .govuk-\!-font-size-80 + @each $size in map-keys($govuk-typography-scale) { + .govuk-\!-font-size-#{$size} { + @include govuk-typography-responsive($size, $important: true); } } // Weights - .govuk-\!-w-regular { + .govuk-\!-font-weight-regular { @include govuk-typography-weight-regular($important: true); } - .govuk-\!-w-bold { + .govuk-\!-font-weight-bold { @include govuk-typography-weight-bold($important: true); } } diff --git a/package/overrides/_width.scss b/package/overrides/_width.scss index 28f49acb78..37c2a9fd1c 100644 --- a/package/overrides/_width.scss +++ b/package/overrides/_width.scss @@ -2,7 +2,7 @@ .govuk-\!-width-three-quarters { width: 100% !important; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: 75% !important; } } @@ -10,7 +10,7 @@ .govuk-\!-width-two-thirds { width: 100% !important; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: 66.66% !important; } } @@ -18,7 +18,7 @@ .govuk-\!-width-one-half { width: 100% !important; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: 50% !important; } } @@ -26,7 +26,7 @@ .govuk-\!-width-one-third { width: 100% !important; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: 33.33% !important; } } @@ -34,7 +34,7 @@ .govuk-\!-width-one-quarter { width: 100% !important; - @include mq($from: tablet) { + @include govuk-media-query($from: tablet) { width: 25% !important; } } diff --git a/package/package.json b/package/package.json index d578b248da..cf51faf1b7 100644 --- a/package/package.json +++ b/package/package.json @@ -1,7 +1,7 @@ { - "name": "@govuk-frontend/frontend", + "name": "govuk-frontend", "description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.", - "version": "0.0.31-alpha", + "version": "0.0.32-alpha", "main": "all.js", "engines": { "node": ">=6.0" diff --git a/package/settings/_all.scss b/package/settings/_all.scss index 71170754d9..8bde28e9ed 100644 --- a/package/settings/_all.scss +++ b/package/settings/_all.scss @@ -16,6 +16,6 @@ @import "spacing"; @import "measurements"; -@import "typography-font-stacks"; +@import "typography-font-families"; @import "typography-font"; @import "typography-responsive"; diff --git a/package/settings/_assets.scss b/package/settings/_assets.scss index c937f7a36b..43a5b139f0 100644 --- a/package/settings/_assets.scss +++ b/package/settings/_assets.scss @@ -1,3 +1,7 @@ +//// +/// @group settings/assets +//// + /// Path to the assets directory, with trailing slash. /// /// This is the directory where the images and fonts subdirectories live. You @@ -5,18 +9,21 @@ /// README for details. /// /// @type String +/// @access public $govuk-assets-path: "/assets/" !default; /// Path to the images folder, with trailing slash. /// /// @type String +/// @access public $govuk-images-path: "#{$govuk-assets-path}images/" !default; /// Path to the fonts folder, with trailing slash. /// /// @type String +/// @access public $govuk-fonts-path: "#{$govuk-assets-path}fonts/" !default; @@ -37,10 +44,13 @@ $govuk-fonts-path: "#{$govuk-assets-path}fonts/" !default; /// @example scss - Custom asset handling /// /// @function my-url-handler($filename) { -/// @return ''; // Some custom URL handling +/// // Some custom URL handling +/// @return url('example.jpg'); /// } /// /// $govuk-image-url-function: 'my-url-handler'; +/// +/// @access public $govuk-image-url-function: false !default; @@ -61,9 +71,12 @@ $govuk-image-url-function: false !default; /// @example scss - Custom asset handling /// /// @function my-url-handler($filename) { -/// @return ''; // Some custom URL handling +/// // Some custom URL handling +/// @return url('example.woff'); /// } /// /// $govuk-font-url-function: 'my-url-handler'; +/// +/// @access public $govuk-font-url-function: false !default; diff --git a/package/settings/_colours-applied.scss b/package/settings/_colours-applied.scss index ccedb0a286..59eea79fea 100644 --- a/package/settings/_colours-applied.scss +++ b/package/settings/_colours-applied.scss @@ -1,59 +1,130 @@ -// Text colour +//// +/// @group settings/colours +//// -$govuk-text-colour: $govuk-black; +@import "../helpers/colour"; -// Canvas background colour -// Used by the footer component and template to give the illusion of a long footer. -$govuk-canvas-background-colour: $govuk-grey-3; -// Body background colour -$govuk-body-background-colour: $govuk-white; -// Text colour for print media -// -// Use 'true black' to avoid printers using colour ink to print body text +// ========================================================= +// Generic +// ========================================================= -$govuk-print-text-colour: #000000; +/// Brand colour +/// +/// @type Colour +/// @access public -// Secondary text colour -// -// Used for 'muted' text, help text, etc. +$govuk-brand-colour: govuk-colour("blue") !default; -$govuk-secondary-text-colour: $govuk-grey-1; +/// Text colour +/// +/// @type Colour +/// @access public -// Links +$govuk-text-colour: govuk-colour("black") !default; + +/// Canvas background colour +/// +/// Used by the footer component and template to give the illusion of a long footer. +/// +/// @type Colour +/// @access public + +$govuk-canvas-background-colour: govuk-colour("grey-3") !default; + +/// Body background colour +/// +/// @type Colour +/// @access public + +$govuk-body-background-colour: govuk-colour("white") !default; + +/// Text colour for print media +/// +/// Use 'true black' to avoid printers using colour ink to print body text +/// +/// @type Colour +/// @access public + +$govuk-print-text-colour: #000000 !default; + +/// Secondary text colour +/// +/// Used for 'muted' text, help text, etc. +/// +/// @type Colour +/// @access public + +$govuk-secondary-text-colour: govuk-colour("grey-1") !default; -$govuk-link-colour: $govuk-blue; -$govuk-link-visited-colour: #4c2c92; -$govuk-link-hover-colour: $govuk-light-blue; -$govuk-link-active-colour: $govuk-light-blue; +/// Focus colour +/// +/// Used for outline (and background, where appropriate) when interactive +/// elements (links, form controls) have keyboard focus. +/// +/// @type Colour +/// @access public -// Focus colour -// -// Used for outline (and background, where appropriate) when interactive -// elements (links, form controls) have keyboard focus. +$govuk-focus-colour: govuk-colour("yellow") !default; -$govuk-focus-colour: $govuk-yellow; +/// Error colour +/// +/// Used to highlight error messages and form controls in an error state +/// +/// @type Colour +/// @access public + +$govuk-error-colour: govuk-colour("red") !default; + +/// Border colour +/// +/// Used for borders, separators, rules, keylines etc. +/// +/// @type Colour +/// @access public + +$govuk-border-colour: govuk-colour("grey-2") !default; + +/// Input border colour +/// +/// Used for form inputs and controls +/// +/// @type Colour +/// @access public + +$govuk-input-border-colour: govuk-colour("black") !default; + + + +// ============================================================================= +// Links +// ============================================================================= -// Error colour -// -// Used to highlight error messages and form controls in an error state +/// Link colour +/// +/// @type Colour +/// @access public -$govuk-error-colour: $govuk-red; +$govuk-link-colour: govuk-colour("blue") !default; -// Border colour -// -// Used for borders, separators, rules, keylines etc. +/// Visited link colour +/// +/// @type Colour +/// @access public -$govuk-border-colour: $govuk-grey-2; +$govuk-link-visited-colour: #4c2c92 !default; -// Used for form inputs and controls +/// Link hover colour +/// +/// @type Colour +/// @access public -$govuk-input-border-colour: $govuk-black; +$govuk-link-hover-colour: govuk-colour("light-blue") !default; -// Buttons +/// Active link colour +/// +/// @type Colour +/// @access public -$govuk-button-colour: #00823b; -$govuk-button-hover-colour: darken($govuk-button-colour, 5%); -$govuk-button-shadow-colour: darken($govuk-button-colour, 15%); -$govuk-button-text-colour: $govuk-white; +$govuk-link-active-colour: govuk-colour("light-blue") !default; diff --git a/package/settings/_colours-organisations.scss b/package/settings/_colours-organisations.scss index 5a7849c151..4207be6b65 100644 --- a/package/settings/_colours-organisations.scss +++ b/package/settings/_colours-organisations.scss @@ -1,103 +1,136 @@ -// https://github.com/alphagov/govuk_frontend_toolkit/blob/master/stylesheets/colours/_organisation.scss +//// +/// @group settings/colours +//// -// We use `websafe` to mean strong enough contrast against white to -// be used for copy and meet the AAA (large text) and AA (smaller -// copy) WCAG guidelines. +/// Organisation colours +/// +/// @type Map +/// +/// @prop $organisation.colour - Colour for the given `$organisation` +/// @prop $organisation.colour-websafe - Websafe colour for the given +/// `$organisation`. We use `websafe` to mean strong enough contrast against +/// white to be used for copy and meet the AAA (large text) and AA (smaller +/// copy) WCAG guidelines. +/// +/// @access public -$govuk-attorney-generals-office: #9f1888; -$govuk-attorney-generals-office-websafe: #a03a88; -$govuk-cabinet-office: #005abb; -$govuk-cabinet-office-websafe: #347da4; -$govuk-civil-service: #af292e; -$govuk-department-for-business-innovation-skills: #003479; -$govuk-department-for-business-innovation-skills-websafe: #347da4; -$govuk-department-for-communities-and-local-government: #00857e; -$govuk-department-for-communities-and-local-government-websafe: #37836e; -$govuk-department-for-culture-media-sport: #d40072; -$govuk-department-for-culture-media-sport-websafe: #a03155; -$govuk-department-for-education: #003a69; -$govuk-department-for-education-websafe: #347ca9; -$govuk-department-for-environment-food-rural-affairs: #00a33b; -$govuk-department-for-international-development: #002878; -$govuk-department-for-international-development-websafe: #405e9a; -$govuk-department-for-transport: #006c56; -$govuk-department-for-transport-websafe: #398373; -$govuk-department-for-work-pensions: #00beb7; -$govuk-department-for-work-pensions-websafe: #37807b; -$govuk-department-of-energy-climate-change: #009ddb; -$govuk-department-of-energy-climate-change-websafe: #2b7cac; -$govuk-department-of-health: #00ad93; -$govuk-department-of-health-websafe: #39836e; -$govuk-foreign-commonwealth-office: #003e74; -$govuk-foreign-commonwealth-office-websafe: #406e97; -$govuk-government-equalities-office: #9325b2; -$govuk-hm-government: #0076c0; -$govuk-hm-government-websafe: #347da4; -$govuk-hm-revenue-customs: #009390; -$govuk-hm-revenue-customs-websafe: #008770; -$govuk-hm-treasury: #af292e; -$govuk-hm-treasury-websafe: #832322; -$govuk-home-office: #9325b2; -$govuk-home-office-websafe: #9440b2; -$govuk-ministry-of-defence: #4d2942; -$govuk-ministry-of-defence-websafe: #5a5c92; -$govuk-ministry-of-justice: #231f20; -$govuk-ministry-of-justice-websafe: #5a5c92; -$govuk-northern-ireland-office: #002663; -$govuk-northern-ireland-office-websafe: #3e598c; -$govuk-office-of-the-advocate-general-for-scotland: #002663; -$govuk-office-of-the-advocate-general-for-scotland-websafe: $govuk-blue; -$govuk-office-of-the-leader-of-the-house-of-lords: #9c132e; -$govuk-office-of-the-leader-of-the-house-of-lords-websafe: #c2395d; -$govuk-scotland-office: #002663; -$govuk-scotland-office-websafe: #405c8a; -// Note: the "the" part here will get dropped -$govuk-the-office-of-the-leader-of-the-house-of-commons: #317023; -$govuk-the-office-of-the-leader-of-the-house-of-commons-websafe: #005f8f; -$govuk-uk-export-finance: #005747; -$govuk-uk-export-finance-websafe: $govuk-blue; -$govuk-uk-trade-investment: #c80651; -$govuk-uk-trade-investment-websafe: $govuk-blue; -$govuk-wales-office: #a33038; -$govuk-wales-office-websafe: #7a242a; - -// All organisation colours in a list -// (class_name, brand colour, WCAG acceptible text colour) -// -// example usage: -// @each $govuk-organisation in $govuk-all-organisation-brand-colours { -// .#{nth($govuk-organisation, 1)} { -// border-color: nth($govuk-organisation, 2); -// } -// } - -$govuk-all-organisation-brand-colours: ( - "govuk-attorney-generals-office": $govuk-attorney-generals-office $govuk-attorney-generals-office-websafe, - "govuk-cabinet-office": $govuk-cabinet-office $govuk-cabinet-office-websafe, - "govuk-civil-service": $govuk-civil-service $govuk-civil-service, - "govuk-department-for-business-innovation-skills": $govuk-department-for-business-innovation-skills $govuk-department-for-business-innovation-skills-websafe, - "govuk-department-for-communities-and-local-government": $govuk-department-for-communities-and-local-government $govuk-department-for-communities-and-local-government-websafe, - "govuk-department-for-culture-media-sport": $govuk-department-for-culture-media-sport $govuk-department-for-culture-media-sport-websafe, - "govuk-department-for-education": $govuk-department-for-education $govuk-department-for-education-websafe, - "govuk-department-for-environment-food-rural-affairs": $govuk-department-for-environment-food-rural-affairs $govuk-department-for-environment-food-rural-affairs, - "govuk-department-for-international-development": $govuk-department-for-international-development $govuk-department-for-international-development-websafe, - "govuk-department-for-transport": $govuk-department-for-transport $govuk-department-for-transport-websafe, - "govuk-department-for-work-pensions": $govuk-department-for-work-pensions $govuk-department-for-work-pensions-websafe, - "govuk-department-of-energy-climate-change": $govuk-department-of-energy-climate-change $govuk-department-of-energy-climate-change-websafe, - "govuk-department-of-health": $govuk-department-of-health $govuk-department-of-health-websafe, - "govuk-foreign-commonwealth-office": $govuk-foreign-commonwealth-office $govuk-foreign-commonwealth-office-websafe, - "govuk-hm-government": $govuk-hm-government $govuk-hm-government-websafe, - "govuk-hm-revenue-customs": $govuk-hm-revenue-customs $govuk-hm-revenue-customs-websafe, - "govuk-hm-treasury": $govuk-hm-treasury $govuk-hm-treasury-websafe, - "govuk-home-office": $govuk-home-office $govuk-home-office-websafe, - "govuk-ministry-of-defence": $govuk-ministry-of-defence $govuk-ministry-of-defence-websafe, - "govuk-ministry-of-justice": $govuk-ministry-of-justice $govuk-ministry-of-justice-websafe, - "govuk-northern-ireland-office": $govuk-northern-ireland-office $govuk-northern-ireland-office-websafe, - "govuk-office-of-the-advocate-general-for-scotland": $govuk-office-of-the-advocate-general-for-scotland $govuk-office-of-the-advocate-general-for-scotland-websafe, - "govuk-office-of-the-leader-of-the-house-of-lords": $govuk-office-of-the-leader-of-the-house-of-lords $govuk-office-of-the-leader-of-the-house-of-lords-websafe, - "govuk-scotland-office": $govuk-scotland-office $govuk-scotland-office-websafe, - "govuk-the-office-of-the-leader-of-the-house-of-commons": $govuk-the-office-of-the-leader-of-the-house-of-commons $govuk-the-office-of-the-leader-of-the-house-of-commons-websafe, - "govuk-uk-export-finance": $govuk-uk-export-finance $govuk-uk-export-finance-websafe, - "govuk-uk-trade-investment": $govuk-uk-trade-investment $govuk-uk-trade-investment-websafe, - "govuk-wales-office": $govuk-wales-office $govuk-wales-office-websafe -); +$govuk-colours-organisations: ( + "attorney-generals-office": ( + colour: #9f1888, + colour-websafe: #a03a88 + ), + "cabinet-office": ( + colour: #005abb, + colour-websafe: #347da4 + ), + "civil-service": ( + colour: #af292e + ), + "department-for-business-innovation-skills": ( + colour: #003479, + colour-websafe: #347da4 + ), + "department-for-communities-and-local-government": ( + colour: #00857e, + colour-websafe: #37836e + ), + "department-for-culture-media-sport": ( + colour: #d40072, + colour-websafe: #a03155 + ), + "department-for-education": ( + colour: #003a69, + colour-websafe: #347ca9 + ), + "department-for-environment-food-rural-affairs": ( + colour: #00a33b, + colour-websafe: #008938 + ), + "department-for-international-development": ( + colour: #002878, + colour-websafe: #405e9a + ), + "department-for-international-trade": ( + colour: #cf102d, + colour-websafe: #005ea5 + ), + "department-for-transport": ( + colour: #006c56, + colour-websafe: #398373 + ), + "department-for-work-pensions": ( + colour: #00beb7, + colour-websafe: #37807b + ), + "department-of-energy-climate-change": ( + colour: #009ddb, + colour-websafe: #2b7cac + ), + "department-of-health": ( + colour: #00ad93, + colour-websafe: #39836e + ), + "foreign-commonwealth-office": ( + colour: #003e74, + colour-websafe: #406e97 + ), + "government-equalities-office": ( + colour: #9325b2 + ), + "hm-government": ( + colour: #0076c0, + colour-websafe: #347da4 + ), + "hm-revenue-customs": ( + colour: #009390, + colour-websafe: #008670 + ), + "hm-treasury": ( + colour: #af292e, + colour-websafe: #832322 + ), + "home-office": ( + colour: #9325b2, + colour-websafe: #9440b2 + ), + "ministry-of-defence": ( + colour: #4d2942, + colour-websafe: #5a5c92 + ), + "ministry-of-justice": ( + colour: #231f20, + colour-websafe: #5a5c92 + ), + "northern-ireland-office": ( + colour: #002663, + colour-websafe: #3e598c + ), + "office-of-the-advocate-general-for-scotland": ( + colour: #002663, + colour-websafe: #005ea5 + ), + "office-of-the-leader-of-the-house-of-commons": ( + colour: #317023, + colour-websafe: #005f8f + ), + "office-of-the-leader-of-the-house-of-lords": ( + colour: #9c132e, + colour-websafe: #c2395d + ), + "scotland-office": ( + colour: #002663, + colour-websafe: #405c8a + ), + "uk-export-finance": ( + colour: #005747, + colour-websafe: #005ea5 + ), + "uk-trade-investment": ( + colour: #c80651, + colour-websafe: #005ea5 + ), + "wales-office": ( + colour: #a33038, + colour-websafe: #7a242a + ) +) !default; diff --git a/package/settings/_colours-palette.scss b/package/settings/_colours-palette.scss index b1ffab94c1..898e50824b 100644 --- a/package/settings/_colours-palette.scss +++ b/package/settings/_colours-palette.scss @@ -1,55 +1,37 @@ -// Brand colours -$govuk-blue: #005ea5; -$govuk-mainstream-brand: $govuk-blue; +//// +/// @group settings/colours +//// -// Standard palette, colours -$govuk-purple: #2e358b; -$govuk-purple-50: #9799c4; -$govuk-purple-25: #d5d6e7; -$govuk-mauve: #6f72af; -$govuk-mauve-50: #b7b9d7; -$govuk-mauve-25: #e2e2ef; -$govuk-fuchsia: #912b88; -$govuk-fuchsia-50: #c994c3; -$govuk-fuchsia-25: #e9d4e6; -$govuk-pink: #d53880; -$govuk-pink-50: #eb9bbe; -$govuk-pink-25: #f6d7e5; -$govuk-baby-pink: #f499be; -$govuk-baby-pink-50: #faccdf; -$govuk-baby-pink-25: #fdebf2; -$govuk-red: #b10e1e; -$govuk-red-50: #d9888c; -$govuk-red-25: #efcfd1; -$govuk-mellow-red: #df3034; -$govuk-mellow-red-50: #ef9998; -$govuk-mellow-red-25: #f9d6d6; -$govuk-orange: #f47738; -$govuk-orange-50: #fabb96; -$govuk-orange-25: #fde4d4; -$govuk-brown: #b58840; -$govuk-brown-50: #dac39c; -$govuk-brown-25: #f0e7d7; -$govuk-yellow: #ffbf47; -$govuk-yellow-50: #ffdf94; -$govuk-yellow-25: #fff2d3; -$govuk-grass-green: #85994b; -$govuk-grass-green-50: #c2cca3; -$govuk-grass-green-25: #e7ebda; -$govuk-green: #006435; -$govuk-green-50: #7fb299; -$govuk-green-25: #cce0d6; -$govuk-turquoise: #28a197; -$govuk-turquoise-50: #95d0cb; -$govuk-turquoise-25: #d5ecea; -$govuk-light-blue: #2b8cc4; -$govuk-light-blue-50: #96c6e2; -$govuk-light-blue-25: #d5e8f3; +/// Colour palette +/// +/// @type Map +/// +/// @prop $colour - Representation for the given $colour, where $colour is the +/// friendly name for the colour (e.g. "red": #ff0000); +/// +/// @access public -// Standard palette, greys -$govuk-black: #0b0c0c; -$govuk-grey-1: #6f777b; -$govuk-grey-2: #bfc1c3; -$govuk-grey-3: #dee0e2; -$govuk-grey-4: #f8f8f8; -$govuk-white: #ffffff; +$govuk-colours: ( + "purple": #2e358b, + "light-purple": #6f72af, + "bright-purple": #912b88, + "pink": #d53880, + "light-pink": #f499be, + "red": #b10e1e, + "bright-red": #df3034, + "orange": #f47738, + "brown": #b58840, + "yellow": #ffbf47, + "light-green": #85994b, + "green": #006435, + "turquoise": #28a197, + "light-blue": #2b8cc4, + "blue": #005ea5, + + "black": #0b0c0c, + "grey-1": #6f777b, + "grey-2": #bfc1c3, + "grey-3": #dee0e2, + "grey-4": #f8f8f8, + "white": #ffffff +) !default; diff --git a/package/settings/_compatibility.scss b/package/settings/_compatibility.scss index 12bc4c4151..f8cc1c8e22 100644 --- a/package/settings/_compatibility.scss +++ b/package/settings/_compatibility.scss @@ -1,33 +1,50 @@ -// We default these settings to true so that if they are missed we opt for a -// mild performance hit over a potential broken experience for the end-user. +//// +/// Compatibility with legacy repos (govuk_elements, govuk_frontend_tookkit and +/// govuk_template) settings +/// +/// We default these settings to `true` so that if they are missed we opt for a +/// mild performance hit over a potential broken experience for the end-user. +/// +/// @group settings/compatibility +//// + /// Compatibility Mode: alphagov/govuk_frontend_toolkit /// -/// @type Boolean True if used in a project that also includes -/// alphagov/govuk_frontend_toolkit. +/// True if used in a project that also includes alphagov/govuk_frontend_toolkit. +/// +/// @type Boolean +/// @access public $govuk-compatibility-govukfrontendtoolkit: true !default; /// Compatibility Mode: alphagov/govuk_template /// -/// @type Boolean True if used in a project that also includes -/// alphagov/govuk_template +/// True if used in a project that also includes alphagov/govuk_template. +/// +/// @type Boolean +/// @access public $govuk-compatibility-govuktemplate: true !default; /// Compatibility Mode: alphagov/govuk_elements /// -/// @type Boolean True if used in a project that also includes -/// alphagov/govuk_elements +/// True if used in a project that also includes alphagov/govuk_elements. +/// +/// @type Boolean +/// @access public $govuk-compatibility-govukelements: true !default; /// Compatibility Product Map /// -/// @type Map Map of product names to their settings that we can use to lookup -/// states from within the `@govuk-compatibility` mixin. +/// Maps product names to their settings that we can use to lookup states from +/// within the `@govuk-compatibility` mixin. +/// +/// @type Map +/// @access private -$govuk-compatibility: ( +$_govuk-compatibility: ( govuk_frontend_toolkit: $govuk-compatibility-govukfrontendtoolkit, govuk_template: $govuk-compatibility-govuktemplate, govuk_elements: $govuk-compatibility-govukelements, diff --git a/package/settings/_global-styles.scss b/package/settings/_global-styles.scss index e5be624abf..d356129e8e 100644 --- a/package/settings/_global-styles.scss +++ b/package/settings/_global-styles.scss @@ -1,3 +1,13 @@ -// set to include optional globals styles +//// +/// @group settings/global-styles +//// + +/// Include 'global' styles +/// +/// Whether to style paragraphs (`

`) and links (``) without explicitly +/// having to apply the `govuk-body` and `govuk-link` classes. +/// +/// @type Boolean +/// @access public $govuk-global-styles: false !default; diff --git a/package/settings/_ie8.scss b/package/settings/_ie8.scss index 3c0d0aafed..2098da72e6 100644 --- a/package/settings/_ie8.scss +++ b/package/settings/_ie8.scss @@ -1,4 +1,18 @@ -// Whether the stylesheet being built is targeting Internet Explorer 8. Used by -// the ie8 mixin tools and in other settings. -// @type Bool +//// +/// @group settings/ie8 +//// + +/// Whether the stylesheet being built is targeting Internet Explorer 8. +/// +/// @type Boolean +/// @access public + $govuk-is-ie8: false !default; + +/// The name of the breakpoint to use as the target when rasterizing media +/// queries +/// +/// @type String +/// @access public + +$govuk-ie8-breakpoint: desktop !default; diff --git a/package/settings/_measurements.scss b/package/settings/_measurements.scss index f76ccc35c8..db0770c9f2 100644 --- a/package/settings/_measurements.scss +++ b/package/settings/_measurements.scss @@ -1,17 +1,85 @@ -// Site width and grid gutters -$govuk-page-width: 960px; +//// +/// @group settings/measurements +//// + + + +// ========================================================= +// Page layout +// ========================================================= + +/// Width of main container +/// +/// @type Number +/// @access public + +$govuk-page-width: 960px !default; + +/// Width of gutter between grid columns +/// +/// @type Number +/// @access public + +$govuk-gutter: 30px !default; + +/// Width of half the gutter between grid columns +/// +/// @type Number +/// @access public -$govuk-gutter: $govuk-spacing-scale-6; $govuk-gutter-half: $govuk-gutter / 2; -// Border widths -$govuk-border-width: 5px; -$govuk-border-width-wide: 10px; -$govuk-border-width-mobile: 4px; -$govuk-border-width-form-element: 2px; -$govuk-border-width-form-element-error: 4px; -$govuk-border-width-form-group-error: $govuk-border-width; -// Focus -$govuk-focus-width: 3px; +// ========================================================= +// Borders +// ========================================================= + +/// Standard border width +/// +/// @type Number +/// @access public + +$govuk-border-width: 5px !default; + +/// Wide border width +/// +/// @type Number +/// @access public + +$govuk-border-width-wide: 10px !default; + +/// Border width on mobile +/// +/// @type Number +/// @access public + +$govuk-border-width-mobile: 4px !default; + +/// Form control border width +/// +/// @type Number +/// @access public + +$govuk-border-width-form-element: 2px !default; + +/// Form control border width when in error state +/// +/// @type Number +/// @access public + +$govuk-border-width-form-element-error: 4px !default; + +/// Form group border width when in error state +/// +/// @type Number +/// @access public + +$govuk-border-width-form-group-error: $govuk-border-width !default; + +/// Border width of focus outline +/// +/// @type Number +/// @access public + +$govuk-focus-width: 3px !default; diff --git a/package/settings/_media-queries.scss b/package/settings/_media-queries.scss index e34384d8a1..20ddca8606 100644 --- a/package/settings/_media-queries.scss +++ b/package/settings/_media-queries.scss @@ -1,60 +1,23 @@ -// Media query helpers using sass-mq -// https://github.com/sass-mq/sass-mq +//// +/// @group settings/media-queries +//// -// mq() takes up to three optional parameters: -// $from: inclusive min-width boundary -// $until: exclusive max-width boundary -// $and: additional custom directives -// $media-type: $mq-media-type // defaults to 'all' +/// Breakpoint definitions +/// +/// @type Map +/// @access public -// Write css mobile-first, overriding mobile styles for tablet and desktop -// -// .govuk-component { -// // Apply styling to mobile and upwards -// @include mq($from: mobile) { -// color: red; -// } -// // Apply styling up to devices smaller than tablets (exclude tablets) -// @include mq($until: tablet) { -// color: blue; -// } -// // Same thing, in landscape orientation -// @include mq($until: tablet, $and: '(orientation: landscape)') { -// color: hotpink; -// } -// // Apply styling to tablets up to desktop (exclude desktop) -// @include mq(tablet, desktop) { -// color: green; -// } -// // Print only styling -// @include mq($media-type: print) { -// display: none; -// } -// } - - -// To enable support for browsers that do not support @media queries, -// (IE <= 8, Firefox <= 3, Opera <= 9) set $mq-responsive to false -// Create a separate stylesheet served exclusively to these browsers, -// meaning @media queries will be rasterized, relying on the cascade itself -@if ($govuk-is-ie8) { - $mq-responsive: false; -} @else { - $mq-responsive: true; -} - -// Name your breakpoints in a way that creates a ubiquitous language -// across team members. It will improve communication between -// stakeholders, designers, developers, and testers. -$mq-breakpoints: ( +$govuk-breakpoints: ( mobile: 320px, - // Support max-width value from FET ? - // mobile: 640px, tablet: 641px, desktop: 769px -); +) !default; + +/// Show active breakpoint in top-right corner. +/// +/// Only use this during local development. +/// +/// @type Boolean +/// @access public -// Define the breakpoint from the $mq-breakpoints list that should -// be used as the target width when outputting a static stylesheet -// (i.e. when $mq-responsive is set to 'false'). -$mq-static-breakpoint: desktop; +$govuk-show-breakpoints: false !default; diff --git a/package/settings/_spacing.scss b/package/settings/_spacing.scss index df61db663e..70432d7a19 100644 --- a/package/settings/_spacing.scss +++ b/package/settings/_spacing.scss @@ -1,88 +1,80 @@ -// Single points on spacing scale -$govuk-spacing-scale-1: 5px; -$govuk-spacing-scale-2: 10px; -$govuk-spacing-scale-3: 15px; -$govuk-spacing-scale-4: 20px; -$govuk-spacing-scale-5: 25px; -$govuk-spacing-scale-6: 30px; -$govuk-spacing-scale-7: 40px; -$govuk-spacing-scale-8: 50px; -$govuk-spacing-scale-9: 60px; +//// +/// @group settings/spacing +//// -// Responsive spacing maps -// -// These definitions are used to generate responsive spacing that adapts -// according to the breakpoints (see 'helpers/spacing'). These maps should be -// used wherever possible to standardise responsive spacing. +/// Single point spacing variables. Access using `govuk-spacing()` +/// (see `helpers/spacing`). +/// +/// @type Map +/// @access private -// You can define different behaviour on tablet and desktop. The 'null' -// breakpoint is for mobile. +$govuk-spacing-points: ( + 0: 0, + 1: 5px, + 2: 10px, + 3: 15px, + 4: 20px, + 5: 25px, + 6: 30px, + 7: 40px, + 8: 50px, + 9: 60px +) !default; -// To use the responsive spacing maps, combine them with -// 'govuk-responsive-margin' or 'govuk-responsive-padding' mixins -// (see 'helpers/spacing'). +/// Responsive spacing maps +/// +/// These definitions are used to generate responsive spacing that adapts +/// according to the breakpoints (see 'helpers/spacing'). These maps should be +/// used wherever possible to standardise responsive spacing. +/// +/// You can define different behaviour on tablet and desktop. The 'null' +/// breakpoint is for mobile. +/// +/// Access responsive spacing with `govuk-responsive-margin` or +/// `govuk-responsive-padding` mixins (see `helpers/spacing`). +/// +/// @type Map +/// @access private - -$govuk-spacing-responsive-0: ( - null: 0, - tablet: 0 -); - -$govuk-spacing-responsive-1: ( - null: 5px, - tablet: 5px -); - -$govuk-spacing-responsive-2: ( - null: 10px, - tablet: 10px -); - -$govuk-spacing-responsive-3: ( - null: 15px, - tablet: 15px -); - -$govuk-spacing-responsive-4: ( - null: 15px, - tablet: 20px -); - -$govuk-spacing-responsive-5: ( - null: 15px, - tablet: 25px -); - -$govuk-spacing-responsive-6: ( - null: 20px, - tablet: 30px -); - -$govuk-spacing-responsive-7: ( - null: 25px, - tablet: 40px -); - -$govuk-spacing-responsive-8: ( - null: 30px, - tablet: 50px -); - -$govuk-spacing-responsive-9: ( - null: 40px, - tablet: 60px -); - -// Create a list of all spacing points we can iterate over elsewhere $govuk-spacing-responsive-scale: ( - 0: $govuk-spacing-responsive-0, - 1: $govuk-spacing-responsive-1, - 2: $govuk-spacing-responsive-2, - 3: $govuk-spacing-responsive-3, - 4: $govuk-spacing-responsive-4, - 5: $govuk-spacing-responsive-5, - 6: $govuk-spacing-responsive-6, - 7: $govuk-spacing-responsive-7, - 8: $govuk-spacing-responsive-8, - 9: $govuk-spacing-responsive-9 -); + 0: ( + null: 0, + tablet: 0 + ), + 1: ( + null: 5px, + tablet: 5px + ), + 2: ( + null: 10px, + tablet: 10px + ), + 3: ( + null: 15px, + tablet: 15px + ), + 4: ( + null: 15px, + tablet: 20px + ), + 5: ( + null: 15px, + tablet: 25px + ), + 6: ( + null: 20px, + tablet: 30px + ), + 7: ( + null: 25px, + tablet: 40px + ), + 8: ( + null: 30px, + tablet: 50px + ), + 9: ( + null: 40px, + tablet: 60px + ) +) !default; diff --git a/package/settings/_typography-font-families.scss b/package/settings/_typography-font-families.scss new file mode 100644 index 0000000000..2b58323dc2 --- /dev/null +++ b/package/settings/_typography-font-families.scss @@ -0,0 +1,22 @@ +//// +/// @group settings/typography +//// + +/// List of font families to use if using NTA (the default font 'stack' for +/// GOV.UK) +/// +/// @type List +/// @access public + +$govuk-font-family-nta: "nta", Arial, sans-serif; + +/// List of font families to use if using the 'tabular numbers' subset of NTA +/// (the default font 'stack' for GOV.UK) +/// +/// Because ntatabularnumbers only includes the digits 0-10, all other glyphs +/// will 'fall-through' the stack to NTA. +/// +/// @type List +/// @access public + +$govuk-font-family-nta-tabular: "ntatabularnumbers", $govuk-font-family-nta; diff --git a/package/settings/_typography-font-stacks.scss b/package/settings/_typography-font-stacks.scss deleted file mode 100644 index 59c6bd1d69..0000000000 --- a/package/settings/_typography-font-stacks.scss +++ /dev/null @@ -1,5 +0,0 @@ -// Fonts - -// New Transport Light font family -$govuk-nta-light: "nta", Arial, sans-serif; -$govuk-nta-light-tabular: "ntatabularnumbers", $govuk-nta-light; diff --git a/package/settings/_typography-font.scss b/package/settings/_typography-font.scss index e2858a7c2b..bc251304f0 100644 --- a/package/settings/_typography-font.scss +++ b/package/settings/_typography-font.scss @@ -1,8 +1,48 @@ -// Allow font stack to be overridden -$govuk-font-stack: $govuk-nta-light !default; -$govuk-font-stack-tabular: $govuk-nta-light-tabular !default; -$govuk-font-stack-print: sans-serif !default; +//// +/// @group settings/typography +//// + + +// ========================================================= +// Font families +// ========================================================= + +/// Font families to use for all typography on screen media +/// +/// @type List +/// @access public + +$govuk-font-family: $govuk-font-family-nta !default; + +/// Font families to use when displaying tabular numbers +/// +/// @type List +/// @access public + +$govuk-font-family-tabular: $govuk-font-family-nta-tabular !default; + +/// Font families to use for print media +/// +/// @type List +/// @access public + +$govuk-font-family-print: sans-serif !default; + + + +// ========================================================= // Font weights -$govuk-font-weight-regular: 400; -$govuk-font-weight-bold: 700; +// ========================================================= + +/// Font weight for regular typography +/// +/// @type Number +/// @access public +$govuk-font-weight-regular: 400 !default; + +/// Font weight for bold typography +/// +/// @type Number +/// @access public +$govuk-font-weight-bold: 700 !default; diff --git a/package/settings/_typography-responsive.scss b/package/settings/_typography-responsive.scss index 5d058553b2..e5aec47010 100644 --- a/package/settings/_typography-responsive.scss +++ b/package/settings/_typography-responsive.scss @@ -1,143 +1,138 @@ -// Responsive typography font maps -// -// These definitions are used to generate responsive typography that adapts -// according to the breakpoints. -// -// Font size and font weight can be defined for each breakpoint. You can define -// different behaviour on tablet and desktop. The 'null' breakpoint is for -// mobile. -// -// You can also specify a separate font size and line height for print media. +//// +/// @group settings/typography +//// -$govuk-font-80: ( - null: ( - font-size: 53px, - line-height: 55px - ), - tablet: ( - font-size: 80px, - line-height: 80px - ), - print: ( - font-size: 53pt, - line-height: 1.1 - ) -); - -$govuk-font-48: ( - null: ( - font-size: 32px, - line-height: 35px - ), - tablet: ( - font-size: 48px, - line-height: 50px - ), - print: ( - font-size: 32pt, - line-height: 1.15 - ) -); - -$govuk-font-36: ( - null: ( - font-size: 24px, - line-height: 25px - ), - tablet: ( - font-size: 36px, - line-height: 40px - ), - print: ( - font-size: 24pt, - line-height: 1.05 - ) -); - -$govuk-font-27: ( - null: ( - font-size: 18px, - line-height: 20px - ), - tablet: ( - font-size: 27px, - line-height: 30px - ), - print: ( - font-size: 18pt, - line-height: 1.15 - ) -); - -$govuk-font-24: ( - null: ( - font-size: 18px, - line-height: 20px - ), - tablet: ( - font-size: 24px, - line-height: 30px - ), - print: ( - font-size: 18pt, - line-height: 1.15 - ) -); - -$govuk-font-19: ( - null: ( - font-size: 16px, - line-height: 20px - ), - tablet: ( - font-size: 19px, - line-height: 25px - ), - print: ( - font-size: 14pt, - line-height: 1.15 - ) -); - -$govuk-font-16: ( - null: ( - font-size: 14px, - line-height: 16px - ), - tablet: ( - font-size: 16px, - line-height: 20px - ), - print: ( - font-size: 14pt, - line-height: 1.2 - ) -); - -$govuk-font-14: ( - null: ( - font-size: 12px, - line-height: 15px - ), - tablet: ( - font-size: 14px, - line-height: 20px - ), - print: ( - font-size: 12pt, - line-height: 1.2 - ) -); +/// Responsive typography font map +/// +/// This is used to generate responsive typography that adapts according to the +/// breakpoints. +/// +/// Font size and font weight can be defined for each breakpoint. You can define +/// different behaviour on tablet and desktop. The 'null' breakpoint is for +/// mobile. +/// +/// You can also specify a separate font size and line height for print media. +/// +/// @type Map +/// +/// @prop {Number} $point.$breakpoint.font-size - Font size for `$point` at `$breakpoint` +/// @prop {Number} $point.$breakpoint.line-height - Line height for `$point` at `$breakpoint` +/// @prop {Number} $point.print.font-size - Font size for `$point` when printing +/// @prop {Number} $point.print.line-height - Line height for `$point` when printing +/// +/// @access public -// Create a list of all responsive typography sizes which we can iterate over -// elsewhere $govuk-typography-scale: ( - 80: $govuk-font-80, - 48: $govuk-font-48, - 36: $govuk-font-36, - 27: $govuk-font-27, - 24: $govuk-font-24, - 19: $govuk-font-19, - 16: $govuk-font-16, - 14: $govuk-font-14 -); + 80: ( + null: ( + font-size: 53px, + line-height: 55px + ), + tablet: ( + font-size: 80px, + line-height: 80px + ), + print: ( + font-size: 53pt, + line-height: 1.1 + ) + ), + 48: ( + null: ( + font-size: 32px, + line-height: 35px + ), + tablet: ( + font-size: 48px, + line-height: 50px + ), + print: ( + font-size: 32pt, + line-height: 1.15 + ) + ), + 36: ( + null: ( + font-size: 24px, + line-height: 25px + ), + tablet: ( + font-size: 36px, + line-height: 40px + ), + print: ( + font-size: 24pt, + line-height: 1.05 + ) + ), + 27: ( + null: ( + font-size: 18px, + line-height: 20px + ), + tablet: ( + font-size: 27px, + line-height: 30px + ), + print: ( + font-size: 18pt, + line-height: 1.15 + ) + ), + 24: ( + null: ( + font-size: 18px, + line-height: 20px + ), + tablet: ( + font-size: 24px, + line-height: 30px + ), + print: ( + font-size: 18pt, + line-height: 1.15 + ) + ), + 19: ( + null: ( + font-size: 16px, + line-height: 20px + ), + tablet: ( + font-size: 19px, + line-height: 25px + ), + print: ( + font-size: 14pt, + line-height: 1.15 + ) + ), + 16: ( + null: ( + font-size: 14px, + line-height: 16px + ), + tablet: ( + font-size: 16px, + line-height: 20px + ), + print: ( + font-size: 14pt, + line-height: 1.2 + ) + ), + 14: ( + null: ( + font-size: 12px, + line-height: 15px + ), + tablet: ( + font-size: 14px, + line-height: 20px + ), + print: ( + font-size: 12pt, + line-height: 1.2 + ) + ) +) !default; diff --git a/package/template.njk b/package/template.njk index 8a76a351f0..7c8b9705b8 100644 --- a/package/template.njk +++ b/package/template.njk @@ -41,11 +41,12 @@ {% endblock %} {% block main %} -

-
+
+ {% block beforeContent %}{% endblock %} +
{% block content %}{% endblock %} -
-
+ +
{% endblock %} {% block footer %} diff --git a/package/tools/_compatibility.scss b/package/tools/_compatibility.scss index 5f842c2c8b..d157e158c3 100644 --- a/package/tools/_compatibility.scss +++ b/package/tools/_compatibility.scss @@ -1,3 +1,7 @@ +//// +/// @group tools +//// + /// Conditional Compatibility Mixin /// /// Selectively output a block (available to the mixin as @content) if a given @@ -15,16 +19,18 @@ /// } /// } /// -/// @param String Name of product that we are defending against. -/// -/// @throw If product name is not recognised +/// @param {String} $product - Name of product that we are 'defending' against. +/// @content Passed content is outputted only if Frontend is being used with +/// this product +/// @throw Errors if product name is not recognised +/// @access public @mixin govuk-compatibility($product) { - @if map-has-key($govuk-compatibility, $product) { - @if map-get($govuk-compatibility, $product) == true { + @if map-has-key($_govuk-compatibility, $product) { + @if map-get($_govuk-compatibility, $product) == true { @content; } } @else { - @error "Non existent compatibility product '#{$product}'"; + @error "Non existent product '#{$product}'"; } } diff --git a/package/tools/_exports.scss b/package/tools/_exports.scss index f66da3112e..ff33cff3eb 100644 --- a/package/tools/_exports.scss +++ b/package/tools/_exports.scss @@ -1,15 +1,30 @@ -// This is used to ensure that the modules of CSS we define throughout Frontend -// are only included in the generated CSS once, no matter how many times they -// are included e.g. by individual components. +//// +/// @group tools +//// -// List of modules which have already been exported -$imported-modules: () !default; +/// List of modules which have already been exported +/// +/// @type List +/// @access private -@mixin govuk-exports($name, $warn: true) { +$_govuk-imported-modules: () !default; + +/// Export module +/// +/// Ensure that the modules of CSS that we define throughout Frontend are only +/// included in the generated CSS once, no matter how many times they are +/// imported across the individual components. +/// +/// @param {String} $name - Name of module - must be unique within the codebase +/// @content The passed content will only be outputted if a module of the same +/// $name has not already been outputted +/// @access public + +@mixin govuk-exports($name) { // If the mixin is not in the list of modules already exported... - @if (index($imported-modules, $name) == null) { + @if (index($_govuk-imported-modules, $name) == null) { // ... then add it to the list - $imported-modules: append($imported-modules, $name) !global; + $_govuk-imported-modules: append($_govuk-imported-modules, $name) !global; // ... and output the CSS for that module @content; } diff --git a/package/tools/_font-url.scss b/package/tools/_font-url.scss index 7a4a09fe2d..5f8e92cad6 100644 --- a/package/tools/_font-url.scss +++ b/package/tools/_font-url.scss @@ -1,3 +1,7 @@ +//// +/// @group tools +//// + // Disable indentation linting in this file only // sass-lint:disable indentation @@ -7,8 +11,9 @@ /// it will be called, otherwise a url will be returned with the filename /// appended to the font path. /// -/// @param {String} Font filename +/// @param {String} $filename - Font filename /// @return {String} URL for the filename, wrapped in `url()` +/// @access public @function govuk-font-url($filename) { $use-custom-function: variable-exists("govuk-font-url-function") diff --git a/package/tools/_ie8.scss b/package/tools/_ie8.scss index 6b5635ae55..8fcea87225 100644 --- a/package/tools/_ie8.scss +++ b/package/tools/_ie8.scss @@ -1,8 +1,11 @@ +//// +/// @group tools +//// + /// Conditionally include rules only for IE8 /// -/// Only output the CSS passed to the mixin if the $govuk-is-ie8 variable is -/// set to true, which means the rules should only be outputted if compiling an -/// IE8 specific stylesheet. +/// @content Passed content is only outputted if we're compiling a stylesheet +/// that targets IE8 (if `$govuk-is-ie8` is true) /// /// @example scss - Usage /// @@ -13,6 +16,9 @@ /// width: 100px; /// } /// } +/// +/// @access public + @mixin govuk-if-ie8 { @if $govuk-is-ie8 { @content; @@ -21,9 +27,8 @@ /// Conditionally exclude rules for IE8 /// -/// Only output the CSS passed to the mixin if the $govuk-is-ie8 variable is -/// not set to true, which means the rules should be excluded when compiling -/// an IE8 specific stylesheet. +/// @content Passed content is only outputted if we're not compiling a +/// stylesheet that targets IE8 (if `$govuk-is-ie8` is false) /// /// @example scss - Usage /// @@ -36,6 +41,9 @@ /// color: #FF69B4; /// } /// } +/// +/// @access public + @mixin govuk-not-ie8 { @if not $govuk-is-ie8 { @content; diff --git a/package/tools/_iff.scss b/package/tools/_iff.scss index ca22cffd76..8817f5e941 100644 --- a/package/tools/_iff.scss +++ b/package/tools/_iff.scss @@ -1,5 +1,15 @@ -// Wrapper for Sass' built-in `if` function that does not require you to pass -// a value for $if-false. +//// +/// @group tools +//// + +/// Syntactic sugar around Sass' built-in `if` function that does not require +/// you to pass a value for `$if-false`. +/// +/// @param {Boolean} $condition - Whether to return the value of `$if-true` +/// @param {Mixed} $if-true - Value to return if `$condition` is truthy +/// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null +/// @access public + @function iff($condition, $if-true) { @return if($condition, $if-true, null); } diff --git a/package/tools/_image-url.scss b/package/tools/_image-url.scss index 62a74ef650..7689b7e200 100644 --- a/package/tools/_image-url.scss +++ b/package/tools/_image-url.scss @@ -1,3 +1,7 @@ +//// +/// @group tools +//// + // Disable indentation linting in this file only // sass-lint:disable indentation @@ -9,6 +13,7 @@ /// /// @param {String} Filename for the image to load /// @return {String} URL for the filename, wrapped in `url()` +/// @access public @function govuk-image-url($filename) { $use-custom-function: variable-exists("govuk-image-url-function") diff --git a/package/tools/_px-to-em.scss b/package/tools/_px-to-em.scss index 8617e9ca29..f39e73bcb9 100644 --- a/package/tools/_px-to-em.scss +++ b/package/tools/_px-to-em.scss @@ -1,10 +1,20 @@ -// Convert pixels to em -@function govuk-em($value, $govuk-context-font-size) { +//// +/// @group tools +//// + +/// Convert pixels to em +/// +/// @param {Number} $value - Length in pixels +/// @param {Number} $context-font-size - Font size of element +/// @return {Number} Length in ems +/// @access public + +@function govuk-em($value, $context-font-size) { @if (unitless($value)) { $value: $value * 1px; } - @if (unitless($govuk-context-font-size)) { - $govuk-context-font-size: $govuk-context-font-size * 1px; + @if (unitless($context-font-size)) { + $context-font-size: $context-font-size * 1px; } - @return $value / $govuk-context-font-size * 1em; + @return $value / $context-font-size * 1em; } diff --git a/package/vendor/polyfills/Document.js b/package/vendor/polyfills/Document.js index 5cbd787078..307abd9646 100644 --- a/package/vendor/polyfills/Document.js +++ b/package/vendor/polyfills/Document.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict'; diff --git a/package/vendor/polyfills/Element.js b/package/vendor/polyfills/Element.js index 51c0dd1da5..6ad132c466 100644 --- a/package/vendor/polyfills/Element.js +++ b/package/vendor/polyfills/Element.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict'; diff --git a/package/vendor/polyfills/Event.js b/package/vendor/polyfills/Event.js index e61260e755..f4b7318935 100644 --- a/package/vendor/polyfills/Event.js +++ b/package/vendor/polyfills/Event.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict'; diff --git a/package/vendor/polyfills/Function/prototype/bind.js b/package/vendor/polyfills/Function/prototype/bind.js index b7ff178a7f..09badc017f 100644 --- a/package/vendor/polyfills/Function/prototype/bind.js +++ b/package/vendor/polyfills/Function/prototype/bind.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict'; diff --git a/package/vendor/polyfills/Object/defineProperty.js b/package/vendor/polyfills/Object/defineProperty.js index c5d58b9cdf..772d7503a5 100644 --- a/package/vendor/polyfills/Object/defineProperty.js +++ b/package/vendor/polyfills/Object/defineProperty.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict'; diff --git a/package/vendor/polyfills/Window.js b/package/vendor/polyfills/Window.js index eba1d539b8..c7f473e1a8 100644 --- a/package/vendor/polyfills/Window.js +++ b/package/vendor/polyfills/Window.js @@ -1,6 +1,6 @@ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory() : - typeof define === 'function' && define.amd ? define('all', factory) : + typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) : (factory()); }(this, (function () { 'use strict';