govuk_publishing_components 9.3.6 → 9.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/app/assets/stylesheets/component_guide/application.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +66 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -0
- data/app/models/govuk_publishing_components/component_doc.rb +12 -0
- data/app/views/govuk_publishing_components/component_guide/component_doc/_preview.html.erb +7 -5
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +22 -0
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +39 -0
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +26 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +10 -0
- data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +142 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +28 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +5 -0
- data/config/initializers/assets.rb +12 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +13 -0
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +96 -0
- data/node_modules/govuk-frontend/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/all.js +1720 -0
- data/node_modules/govuk-frontend/all.scss +11 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/common.js +39 -0
- data/node_modules/govuk-frontend/components/_all.scss +26 -0
- data/node_modules/govuk-frontend/components/back-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/back-link/_back-link.scss +54 -0
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +335 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/_breadcrumbs.scss +119 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +14 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +13 -0
- data/node_modules/govuk-frontend/components/button/README.md +319 -0
- data/node_modules/govuk-frontend/components/button/_button.scss +185 -0
- data/node_modules/govuk-frontend/components/button/button.js +548 -0
- data/node_modules/govuk-frontend/components/button/button.njk +3 -0
- data/node_modules/govuk-frontend/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/button/template.njk +35 -0
- data/node_modules/govuk-frontend/components/checkboxes/README.md +782 -0
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +151 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +730 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +27 -0
- data/node_modules/govuk-frontend/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +86 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +640 -0
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +35 -0
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +23 -0
- data/node_modules/govuk-frontend/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +76 -0
- data/node_modules/govuk-frontend/components/details/README.md +237 -0
- data/node_modules/govuk-frontend/components/details/_details.scss +86 -0
- data/node_modules/govuk-frontend/components/details/details.js +836 -0
- data/node_modules/govuk-frontend/components/details/details.njk +7 -0
- data/node_modules/govuk-frontend/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/components/error-message/README.md +143 -0
- data/node_modules/govuk-frontend/components/error-message/_error-message.scss +15 -0
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +7 -0
- data/node_modules/govuk-frontend/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-message/template.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/README.md +215 -0
- data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +68 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.js +520 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +17 -0
- data/node_modules/govuk-frontend/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/components/fieldset/README.md +213 -0
- data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +58 -0
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +13 -0
- data/node_modules/govuk-frontend/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/fieldset/template.njk +17 -0
- data/node_modules/govuk-frontend/components/file-upload/README.md +332 -0
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +19 -0
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +9 -0
- data/node_modules/govuk-frontend/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/file-upload/template.njk +42 -0
- data/node_modules/govuk-frontend/components/footer/README.md +284 -0
- data/node_modules/govuk-frontend/components/footer/_footer.scss +216 -0
- data/node_modules/govuk-frontend/components/footer/footer.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/template.njk +80 -0
- data/node_modules/govuk-frontend/components/header/README.md +524 -0
- data/node_modules/govuk-frontend/components/header/_header.scss +285 -0
- data/node_modules/govuk-frontend/components/header/header.js +717 -0
- data/node_modules/govuk-frontend/components/header/header.njk +3 -0
- data/node_modules/govuk-frontend/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/header/template.njk +82 -0
- data/node_modules/govuk-frontend/components/hint/README.md +157 -0
- data/node_modules/govuk-frontend/components/hint/_hint.scss +29 -0
- data/node_modules/govuk-frontend/components/hint/hint.njk +7 -0
- data/node_modules/govuk-frontend/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/components/input/README.md +416 -0
- data/node_modules/govuk-frontend/components/input/_input.scss +62 -0
- data/node_modules/govuk-frontend/components/input/input.njk +9 -0
- data/node_modules/govuk-frontend/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/input/template.njk +42 -0
- data/node_modules/govuk-frontend/components/inset-text/README.md +157 -0
- data/node_modules/govuk-frontend/components/inset-text/_inset-text.scss +28 -0
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +7 -0
- data/node_modules/govuk-frontend/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/components/label/README.md +193 -0
- data/node_modules/govuk-frontend/components/label/_label.scss +45 -0
- data/node_modules/govuk-frontend/components/label/label.njk +6 -0
- data/node_modules/govuk-frontend/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/components/panel/README.md +151 -0
- data/node_modules/govuk-frontend/components/panel/_panel.scss +42 -0
- data/node_modules/govuk-frontend/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/panel/panel.njk +7 -0
- data/node_modules/govuk-frontend/components/panel/template.njk +12 -0
- data/node_modules/govuk-frontend/components/phase-banner/README.md +152 -0
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +31 -0
- data/node_modules/govuk-frontend/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +7 -0
- data/node_modules/govuk-frontend/components/phase-banner/template.njk +17 -0
- data/node_modules/govuk-frontend/components/radios/README.md +686 -0
- data/node_modules/govuk-frontend/components/radios/_radios.scss +157 -0
- data/node_modules/govuk-frontend/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/radios/radios.js +730 -0
- data/node_modules/govuk-frontend/components/radios/radios.njk +27 -0
- data/node_modules/govuk-frontend/components/radios/template.njk +85 -0
- data/node_modules/govuk-frontend/components/select/README.md +387 -0
- data/node_modules/govuk-frontend/components/select/_select.scss +35 -0
- data/node_modules/govuk-frontend/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/select/select.njk +24 -0
- data/node_modules/govuk-frontend/components/select/template.njk +44 -0
- data/node_modules/govuk-frontend/components/skip-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/skip-link/_skip-link.scss +15 -0
- data/node_modules/govuk-frontend/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/components/table/README.md +585 -0
- data/node_modules/govuk-frontend/components/table/_table.scss +50 -0
- data/node_modules/govuk-frontend/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/table/table.njk +45 -0
- data/node_modules/govuk-frontend/components/table/template.njk +39 -0
- data/node_modules/govuk-frontend/components/tabs/README.md +375 -0
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +120 -0
- data/node_modules/govuk-frontend/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.js +1302 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/template.njk +29 -0
- data/node_modules/govuk-frontend/components/tag/README.md +150 -0
- data/node_modules/govuk-frontend/components/tag/_tag.scss +23 -0
- data/node_modules/govuk-frontend/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tag/tag.njk +7 -0
- data/node_modules/govuk-frontend/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +350 -0
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +31 -0
- data/node_modules/govuk-frontend/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/template.njk +41 -0
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +11 -0
- data/node_modules/govuk-frontend/components/warning-text/README.md +148 -0
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +50 -0
- data/node_modules/govuk-frontend/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +9 -0
- data/node_modules/govuk-frontend/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/core/_global-styles.scss +19 -0
- data/node_modules/govuk-frontend/core/_links.scss +40 -0
- data/node_modules/govuk-frontend/core/_lists.scss +63 -0
- data/node_modules/govuk-frontend/core/_section-break.scss +56 -0
- data/node_modules/govuk-frontend/core/_template.scss +16 -0
- data/node_modules/govuk-frontend/core/_typography.scss +186 -0
- data/node_modules/govuk-frontend/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/helpers/_colour.scss +51 -0
- data/node_modules/govuk-frontend/helpers/_device-pixels.scss +38 -0
- data/node_modules/govuk-frontend/helpers/_focusable.scss +34 -0
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +67 -0
- data/node_modules/govuk-frontend/helpers/_grid.scss +100 -0
- data/node_modules/govuk-frontend/helpers/_links.scss +149 -0
- data/node_modules/govuk-frontend/helpers/_media-queries.scss +95 -0
- data/node_modules/govuk-frontend/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/helpers/_spacing.scss +152 -0
- data/node_modules/govuk-frontend/helpers/_typography.scss +153 -0
- data/node_modules/govuk-frontend/helpers/_visually-hidden.scss +76 -0
- data/node_modules/govuk-frontend/objects/_all.scss +4 -0
- data/node_modules/govuk-frontend/objects/_form-group.scss +21 -0
- data/node_modules/govuk-frontend/objects/_grid.scss +10 -0
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +37 -0
- data/node_modules/govuk-frontend/objects/_width-container.scss +28 -0
- data/node_modules/govuk-frontend/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/overrides/_display.scss +14 -0
- data/node_modules/govuk-frontend/overrides/_spacing.scss +58 -0
- data/node_modules/govuk-frontend/overrides/_typography.scss +21 -0
- data/node_modules/govuk-frontend/overrides/_width.scss +41 -0
- data/node_modules/govuk-frontend/package.json +89 -0
- data/node_modules/govuk-frontend/settings/_all.scss +21 -0
- data/node_modules/govuk-frontend/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/settings/_colours-applied.scss +130 -0
- data/node_modules/govuk-frontend/settings/_colours-organisations.scss +136 -0
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/settings/_compatibility.scss +51 -0
- data/node_modules/govuk-frontend/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/settings/_measurements.scss +85 -0
- data/node_modules/govuk-frontend/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/settings/_typography-font-families.scss +22 -0
- data/node_modules/govuk-frontend/settings/_typography-font.scss +48 -0
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +138 -0
- data/node_modules/govuk-frontend/template.njk +56 -0
- data/node_modules/govuk-frontend/tools/_all.scss +7 -0
- data/node_modules/govuk-frontend/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/tools/_font-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/tools/_iff.scss +15 -0
- data/node_modules/govuk-frontend/tools/_image-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/vendor/_sass-mq.scss +351 -0
- data/node_modules/govuk-frontend/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +449 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Window.js +28 -0
- metadata +249 -2
@@ -0,0 +1,56 @@
|
|
1
|
+
@include govuk-exports("govuk/core/section-break") {
|
2
|
+
|
3
|
+
%govuk-section-break {
|
4
|
+
margin: 0;
|
5
|
+
border: 0;
|
6
|
+
|
7
|
+
// fix double-width section break and forced visible section break
|
8
|
+
// when combined with styles from alphagov/elements
|
9
|
+
@include govuk-compatibility(govuk_elements) {
|
10
|
+
height: 0;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
.govuk-section-break {
|
15
|
+
@extend %govuk-section-break;
|
16
|
+
}
|
17
|
+
|
18
|
+
// Sizes
|
19
|
+
|
20
|
+
%govuk-section-break--xl {
|
21
|
+
@include govuk-responsive-margin(8, "top");
|
22
|
+
@include govuk-responsive-margin(8, "bottom");
|
23
|
+
}
|
24
|
+
|
25
|
+
.govuk-section-break--xl {
|
26
|
+
@extend %govuk-section-break--xl;
|
27
|
+
}
|
28
|
+
|
29
|
+
%govuk-section-break--l {
|
30
|
+
@include govuk-responsive-margin(6, "top");
|
31
|
+
@include govuk-responsive-margin(6, "bottom");
|
32
|
+
}
|
33
|
+
|
34
|
+
.govuk-section-break--l {
|
35
|
+
@extend %govuk-section-break--l;
|
36
|
+
}
|
37
|
+
|
38
|
+
%govuk-section-break--m {
|
39
|
+
@include govuk-responsive-margin(4, "top");
|
40
|
+
@include govuk-responsive-margin(4, "bottom");
|
41
|
+
}
|
42
|
+
|
43
|
+
.govuk-section-break--m {
|
44
|
+
@extend %govuk-section-break--m;
|
45
|
+
}
|
46
|
+
|
47
|
+
// Visible variant
|
48
|
+
|
49
|
+
%govuk-section-break--visible {
|
50
|
+
border-bottom: 1px solid $govuk-border-colour;
|
51
|
+
}
|
52
|
+
|
53
|
+
.govuk-section-break--visible {
|
54
|
+
@extend %govuk-section-break--visible;
|
55
|
+
}
|
56
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@import "../settings/all";
|
2
|
+
|
3
|
+
@include govuk-exports("govuk/core/template") {
|
4
|
+
// Set the overall page background color to the same colour
|
5
|
+
// as used by the footer to give the illusion of a long footer.
|
6
|
+
.govuk-template {
|
7
|
+
background-color: $govuk-canvas-background-colour;
|
8
|
+
}
|
9
|
+
|
10
|
+
.govuk-template__body {
|
11
|
+
// The default margins set by user-agents are not required since we have our own containers.
|
12
|
+
margin: 0;
|
13
|
+
// Set the overall body of the page back to the typical background colour.
|
14
|
+
background-color: $govuk-body-background-colour;
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,186 @@
|
|
1
|
+
@include govuk-exports("govuk/core/typography") {
|
2
|
+
|
3
|
+
// Headings
|
4
|
+
|
5
|
+
%govuk-heading-xl {
|
6
|
+
@include govuk-text-colour;
|
7
|
+
@include govuk-font($size: 48, $weight: bold);
|
8
|
+
|
9
|
+
display: block;
|
10
|
+
|
11
|
+
margin-top: 0;
|
12
|
+
@include govuk-responsive-margin(8, "bottom");
|
13
|
+
}
|
14
|
+
|
15
|
+
.govuk-heading-xl {
|
16
|
+
@extend %govuk-heading-xl;
|
17
|
+
}
|
18
|
+
|
19
|
+
%govuk-heading-l {
|
20
|
+
@include govuk-text-colour;
|
21
|
+
@include govuk-font($size: 36, $weight: bold);
|
22
|
+
|
23
|
+
display: block;
|
24
|
+
|
25
|
+
margin-top: 0;
|
26
|
+
@include govuk-responsive-margin(6, "bottom");
|
27
|
+
}
|
28
|
+
|
29
|
+
.govuk-heading-l {
|
30
|
+
@extend %govuk-heading-l;
|
31
|
+
}
|
32
|
+
|
33
|
+
%govuk-heading-m {
|
34
|
+
@include govuk-text-colour;
|
35
|
+
@include govuk-font($size: 24, $weight: bold);
|
36
|
+
|
37
|
+
display: block;
|
38
|
+
|
39
|
+
margin-top: 0;
|
40
|
+
@include govuk-responsive-margin(4, "bottom");
|
41
|
+
}
|
42
|
+
|
43
|
+
.govuk-heading-m {
|
44
|
+
@extend %govuk-heading-m;
|
45
|
+
}
|
46
|
+
|
47
|
+
%govuk-heading-s {
|
48
|
+
@include govuk-text-colour;
|
49
|
+
@include govuk-font($size: 19, $weight: bold);
|
50
|
+
|
51
|
+
display: block;
|
52
|
+
|
53
|
+
margin-top: 0;
|
54
|
+
@include govuk-responsive-margin(4, "bottom");
|
55
|
+
}
|
56
|
+
|
57
|
+
.govuk-heading-s {
|
58
|
+
@extend %govuk-heading-s;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Captions to be used inside headings
|
62
|
+
|
63
|
+
.govuk-caption-xl {
|
64
|
+
@include govuk-font($size: 27);
|
65
|
+
|
66
|
+
display: block;
|
67
|
+
|
68
|
+
margin-bottom: govuk-spacing(1);
|
69
|
+
|
70
|
+
color: $govuk-secondary-text-colour;
|
71
|
+
}
|
72
|
+
|
73
|
+
.govuk-caption-l {
|
74
|
+
@include govuk-font($size: 24);
|
75
|
+
|
76
|
+
display: block;
|
77
|
+
|
78
|
+
margin-bottom: govuk-spacing(1);
|
79
|
+
color: $govuk-secondary-text-colour;
|
80
|
+
|
81
|
+
@include govuk-media-query($from: tablet) {
|
82
|
+
margin-bottom: 0;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.govuk-caption-m {
|
87
|
+
@include govuk-font($size: 19);
|
88
|
+
|
89
|
+
display: block;
|
90
|
+
|
91
|
+
color: $govuk-secondary-text-colour;
|
92
|
+
}
|
93
|
+
|
94
|
+
// Body (paragraphs)
|
95
|
+
|
96
|
+
%govuk-body-l {
|
97
|
+
@include govuk-text-colour;
|
98
|
+
@include govuk-font($size: 24);
|
99
|
+
|
100
|
+
margin-top: 0;
|
101
|
+
@include govuk-responsive-margin(6, "bottom");
|
102
|
+
}
|
103
|
+
|
104
|
+
.govuk-body-l {
|
105
|
+
@extend %govuk-body-l;
|
106
|
+
}
|
107
|
+
|
108
|
+
%govuk-body-m {
|
109
|
+
@include govuk-text-colour;
|
110
|
+
@include govuk-font($size: 19);
|
111
|
+
|
112
|
+
margin-top: 0;
|
113
|
+
@include govuk-responsive-margin(4, "bottom");
|
114
|
+
}
|
115
|
+
|
116
|
+
.govuk-body-m {
|
117
|
+
@extend %govuk-body-m;
|
118
|
+
}
|
119
|
+
|
120
|
+
%govuk-body-s {
|
121
|
+
@include govuk-text-colour;
|
122
|
+
@include govuk-font($size: 16);
|
123
|
+
|
124
|
+
margin-top: 0;
|
125
|
+
@include govuk-responsive-margin(4, "bottom");
|
126
|
+
}
|
127
|
+
|
128
|
+
.govuk-body-s {
|
129
|
+
@extend %govuk-body-s;
|
130
|
+
}
|
131
|
+
|
132
|
+
%govuk-body-xs {
|
133
|
+
@include govuk-text-colour;
|
134
|
+
@include govuk-font($size: 14);
|
135
|
+
|
136
|
+
margin-top: 0;
|
137
|
+
@include govuk-responsive-margin(4, "bottom");
|
138
|
+
}
|
139
|
+
|
140
|
+
.govuk-body-xs {
|
141
|
+
@extend %govuk-body-xs;
|
142
|
+
}
|
143
|
+
|
144
|
+
// Usage aliases
|
145
|
+
|
146
|
+
// Using extend to alias means we also inherit any contextual adjustments that
|
147
|
+
// refer to the 'original' class name
|
148
|
+
|
149
|
+
.govuk-body-lead {
|
150
|
+
@extend %govuk-body-l;
|
151
|
+
}
|
152
|
+
|
153
|
+
.govuk-body {
|
154
|
+
@extend %govuk-body-m;
|
155
|
+
}
|
156
|
+
|
157
|
+
// Contextual adjustments
|
158
|
+
// Add top padding to headings that appear directly after paragraphs.
|
159
|
+
|
160
|
+
%govuk-body-l + %govuk-heading-l {
|
161
|
+
padding-top: govuk-spacing(1);
|
162
|
+
|
163
|
+
@include govuk-media-query($from: tablet) {
|
164
|
+
padding-top: govuk-spacing(2);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
%govuk-body-m + %govuk-heading-l,
|
169
|
+
%govuk-body-s + %govuk-heading-l,
|
170
|
+
%govuk-list + %govuk-heading-l {
|
171
|
+
@include govuk-responsive-padding(4, "top");
|
172
|
+
}
|
173
|
+
|
174
|
+
%govuk-body-m + %govuk-heading-m,
|
175
|
+
%govuk-body-s + %govuk-heading-m,
|
176
|
+
%govuk-list + %govuk-heading-m,
|
177
|
+
%govuk-body-m + %govuk-heading-s,
|
178
|
+
%govuk-body-s + %govuk-heading-s,
|
179
|
+
%govuk-list + %govuk-heading-s {
|
180
|
+
padding-top: govuk-spacing(1);
|
181
|
+
|
182
|
+
@include govuk-media-query($from: tablet) {
|
183
|
+
padding-top: govuk-spacing(2);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@import "clearfix";
|
2
|
+
@import "colour";
|
3
|
+
@import "device-pixels";
|
4
|
+
@import "focusable";
|
5
|
+
@import "font-faces";
|
6
|
+
@import "grid";
|
7
|
+
@import "links";
|
8
|
+
@import "media-queries";
|
9
|
+
@import "shape-arrow";
|
10
|
+
@import "spacing";
|
11
|
+
@import "typography";
|
12
|
+
@import "visually-hidden";
|
@@ -0,0 +1,51 @@
|
|
1
|
+
@import "../settings/colours-palette";
|
2
|
+
@import "../settings/colours-organisations";
|
3
|
+
|
4
|
+
////
|
5
|
+
/// @group helpers/colour
|
6
|
+
////
|
7
|
+
|
8
|
+
/// Get colour
|
9
|
+
///
|
10
|
+
/// @param {String} $colour - Name of colour from the colour palette
|
11
|
+
/// (`$govuk-colours`)
|
12
|
+
/// @return {Colour} Representation of named colour
|
13
|
+
/// @throw if `$colour` is not a colour from the colour palette
|
14
|
+
/// @access public
|
15
|
+
|
16
|
+
@function govuk-colour($colour) {
|
17
|
+
$colour: quote($colour);
|
18
|
+
|
19
|
+
@if not map-has-key($govuk-colours, $colour) {
|
20
|
+
@error "Unknown colour `#{$colour}`";
|
21
|
+
}
|
22
|
+
|
23
|
+
@return map-get($govuk-colours, $colour);
|
24
|
+
}
|
25
|
+
|
26
|
+
/// Get the colour for a government organisation
|
27
|
+
///
|
28
|
+
/// @param {String} $organisation - Organisation name, lowercase, hyphenated
|
29
|
+
/// @param {Boolean} $websafe [true] - By default a 'websafe' version of the
|
30
|
+
/// colour will be returned which meets contrast requirements . If you want to
|
31
|
+
/// use the non-websafe version you can set this to `false` but your should
|
32
|
+
/// ensure that you still meets contrast requirements for accessibility - for
|
33
|
+
/// example, don't use the non-websafe version for text.
|
34
|
+
///
|
35
|
+
/// @return {Colour} Representation of colour for organisation
|
36
|
+
/// @throw if `$organisation` is not a known organisation
|
37
|
+
/// @access public
|
38
|
+
|
39
|
+
@function govuk-organisation-colour($organisation, $websafe: true) {
|
40
|
+
@if not map-has-key($govuk-colours-organisations, $organisation) {
|
41
|
+
@error "Unknown organisation `#{$organisation}`";
|
42
|
+
}
|
43
|
+
|
44
|
+
$org-colour: map-get($govuk-colours-organisations, $organisation);
|
45
|
+
|
46
|
+
@if ($websafe and map-has-key($org-colour, colour-websafe)) {
|
47
|
+
@return map-get($org-colour, colour-websafe);
|
48
|
+
} @else {
|
49
|
+
@return map-get($org-colour, colour);
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Media query for retina images (device-pixel-ratio)
|
6
|
+
///
|
7
|
+
/// @param {Number} $ratio [2] - Device pixel ratio
|
8
|
+
/// @content Passed content will be outputted within the media query
|
9
|
+
///
|
10
|
+
/// @example scss - Providing a @2x image for screens that support it
|
11
|
+
/// background-image: govuk-image-url("my-image.png");
|
12
|
+
///
|
13
|
+
/// @include govuk-device-pixel-ratio {
|
14
|
+
/// background-image: govuk-image-url("my-image-2x.png");
|
15
|
+
/// }
|
16
|
+
///
|
17
|
+
/// @example scss - Using a custom ratio
|
18
|
+
/// background-image: govuk-image-url("my-image.png");
|
19
|
+
///
|
20
|
+
/// @include govuk-device-pixel-ratio {
|
21
|
+
/// background-image: govuk-image-url("my-image-2x.png");
|
22
|
+
/// }
|
23
|
+
///
|
24
|
+
/// @include govuk-device-pixel-ratio(3) {
|
25
|
+
/// background-image: govuk-image-url("my-image-3x.png");
|
26
|
+
/// }
|
27
|
+
///
|
28
|
+
/// @access public
|
29
|
+
|
30
|
+
@mixin govuk-device-pixel-ratio($ratio: 2) {
|
31
|
+
@media only screen and (-webkit-min-device-pixel-ratio: $ratio),
|
32
|
+
only screen and (min--moz-device-pixel-ratio: $ratio),
|
33
|
+
only screen and ( min-device-pixel-ratio: $ratio),
|
34
|
+
only screen and ( min-resolution: #{($ratio*96)}dpi),
|
35
|
+
only screen and ( min-resolution: #{$ratio}dppx) {
|
36
|
+
@content;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Focusable helper
|
6
|
+
///
|
7
|
+
/// Provides an additional outline to clearly indicate when the target element is
|
8
|
+
/// focussed. Used for interactive elements which themselves have some background
|
9
|
+
/// or border, such as most form elements.
|
10
|
+
///
|
11
|
+
/// @access public
|
12
|
+
|
13
|
+
@mixin govuk-focusable {
|
14
|
+
&:focus {
|
15
|
+
outline: $govuk-focus-width solid $govuk-focus-colour;
|
16
|
+
outline-offset: 0;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
/// Focusable with fill helper
|
21
|
+
///
|
22
|
+
/// Provides an additional outline and background colour to clearly indicate when
|
23
|
+
/// the target element is focussed. Used for interactive text-based elements such
|
24
|
+
/// as links.
|
25
|
+
///
|
26
|
+
/// @access public
|
27
|
+
|
28
|
+
@mixin govuk-focusable-fill {
|
29
|
+
&:focus {
|
30
|
+
outline: $govuk-focus-width solid $govuk-focus-colour;
|
31
|
+
outline-offset: 0;
|
32
|
+
background-color: $govuk-focus-colour;
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers
|
3
|
+
////
|
4
|
+
|
5
|
+
// Disables linting for this file only
|
6
|
+
// sass-lint:disable no-css-comments, no-duplicate-properties, property-sort-order, indentation
|
7
|
+
|
8
|
+
@import "../tools/exports";
|
9
|
+
|
10
|
+
/// Font Face - NTA
|
11
|
+
///
|
12
|
+
/// Outputs the font-face declaration for NTA at the root of the CSS document
|
13
|
+
/// the first time it is called.
|
14
|
+
///
|
15
|
+
/// @access private
|
16
|
+
|
17
|
+
@mixin _govuk-font-face-nta {
|
18
|
+
@include govuk-exports("govuk/helpers/font-face") {
|
19
|
+
@at-root {
|
20
|
+
/*! 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. */
|
21
|
+
|
22
|
+
@font-face {
|
23
|
+
font-family: "nta";
|
24
|
+
src: govuk-font-url("light-2c037cf7e1-v1.eot");
|
25
|
+
src: govuk-font-url("light-2c037cf7e1-v1.eot?#iefix") format("embedded-opentype"),
|
26
|
+
govuk-font-url("light-f38ad40456-v1.woff2") format("woff2"),
|
27
|
+
govuk-font-url("light-458f8ea81c-v1.woff") format("woff");
|
28
|
+
font-weight: normal;
|
29
|
+
font-style: normal;
|
30
|
+
font-display: fallback;
|
31
|
+
}
|
32
|
+
|
33
|
+
@font-face {
|
34
|
+
font-family: "nta";
|
35
|
+
src: govuk-font-url("bold-fb2676462a-v1.eot");
|
36
|
+
src: govuk-font-url("bold-fb2676462a-v1.eot?#iefix") format("embedded-opentype"),
|
37
|
+
govuk-font-url("bold-a2452cb66f-v1.woff2") format("woff2"),
|
38
|
+
govuk-font-url("bold-f38c792ac2-v1.woff") format("woff");
|
39
|
+
font-weight: bold;
|
40
|
+
font-style: normal;
|
41
|
+
font-display: fallback;
|
42
|
+
}
|
43
|
+
|
44
|
+
@font-face {
|
45
|
+
font-family: "ntatabularnumbers";
|
46
|
+
src: govuk-font-url("light-tabular-498ea8ffe2-v1.eot");
|
47
|
+
src: govuk-font-url("light-tabular-498ea8ffe2-v1.eot?#iefix") format("embedded-opentype"),
|
48
|
+
govuk-font-url("light-tabular-851b10ccdd-v1.woff2") format("woff2"),
|
49
|
+
govuk-font-url("light-tabular-62cc6f0a28-v1.woff") format("woff");
|
50
|
+
font-weight: normal;
|
51
|
+
font-style: normal;
|
52
|
+
font-display: fallback;
|
53
|
+
}
|
54
|
+
|
55
|
+
@font-face {
|
56
|
+
font-family: "ntatabularnumbers";
|
57
|
+
src: govuk-font-url("bold-tabular-357fdfbcc3-v1.eot");
|
58
|
+
src: govuk-font-url("bold-tabular-357fdfbcc3-v1.eot?#iefix") format("embedded-opentype"),
|
59
|
+
govuk-font-url("bold-tabular-b89238d840-v1.woff2") format("woff2"),
|
60
|
+
govuk-font-url("bold-tabular-784c21afb8-v1.woff") format("woff");
|
61
|
+
font-weight: bold;
|
62
|
+
font-style: normal;
|
63
|
+
font-display: fallback;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|