defra_ruby_template 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +20 -0
- data/README.md +71 -0
- data/Rakefile +50 -0
- data/app/views/layouts/defra_ruby_template.html.erb +83 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/defra_ruby_template.gemspec +24 -0
- data/lib/defra_ruby_template.rb +23 -0
- data/lib/defra_ruby_template/version.rb +3 -0
- data/node_modules/govuk-frontend/README.md +91 -0
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +14 -0
- data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/govuk/all.js +2616 -0
- data/node_modules/govuk-frontend/govuk/all.scss +9 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/govuk/common.js +39 -0
- data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1011 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/accordion/template.njk +27 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/fixtures.json +62 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/fixtures.json +193 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro-options.json +52 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/template.njk +24 -0
- data/node_modules/govuk-frontend/govuk/components/button/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
- data/node_modules/govuk-frontend/govuk/components/button/button.js +724 -0
- data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +318 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro-options.json +74 -0
- data/node_modules/govuk-frontend/govuk/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1194 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/fixtures.json +240 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +111 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +37 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1192 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/fixtures.json +1189 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +161 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/checkboxes/template.njk +119 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/fixtures.json +443 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/template.njk +73 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/fixtures.json +549 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +117 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/date-input/template.njk +97 -0
- data/node_modules/govuk-frontend/govuk/components/details/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
- data/node_modules/govuk-frontend/govuk/components/details/details.js +828 -0
- data/node_modules/govuk-frontend/govuk/components/details/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +50 -0
- data/node_modules/govuk-frontend/govuk/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/fixtures.json +77 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-message/template.njk +6 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +853 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/fixtures.json +242 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/fixtures.json +103 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +70 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/fieldset/template.njk +22 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/fixtures.json +198 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/file-upload/template.njk +44 -0
- data/node_modules/govuk-frontend/govuk/components/footer/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
- data/node_modules/govuk-frontend/govuk/components/footer/fixtures.json +501 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +118 -0
- data/node_modules/govuk-frontend/govuk/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +87 -0
- data/node_modules/govuk-frontend/govuk/components/header/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
- data/node_modules/govuk-frontend/govuk/components/header/fixtures.json +378 -0
- data/node_modules/govuk-frontend/govuk/components/header/header.js +1066 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +106 -0
- data/node_modules/govuk-frontend/govuk/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +79 -0
- data/node_modules/govuk-frontend/govuk/components/hint/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/hint/fixtures.json +59 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/input/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
- data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/input/fixtures.json +628 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +167 -0
- data/node_modules/govuk-frontend/govuk/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/input/template.njk +65 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/fixtures.json +58 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/govuk/components/label/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
- data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/label/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +38 -0
- data/node_modules/govuk-frontend/govuk/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/fixtures.json +212 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro-options.json +68 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
- data/node_modules/govuk-frontend/govuk/components/notification-banner/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/panel/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/panel/fixtures.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +44 -0
- data/node_modules/govuk-frontend/govuk/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/panel/template.njk +13 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/fixtures.json +76 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro-options.json +33 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/phase-banner/template.njk +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/radios/fixtures.json +1183 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +143 -0
- data/node_modules/govuk-frontend/govuk/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1148 -0
- data/node_modules/govuk-frontend/govuk/components/radios/template.njk +116 -0
- data/node_modules/govuk-frontend/govuk/components/select/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/select/fixtures.json +327 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +105 -0
- data/node_modules/govuk-frontend/govuk/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/select/template.njk +51 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/fixtures.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +1084 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +113 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/summary-list/template.njk +47 -0
- data/node_modules/govuk-frontend/govuk/components/table/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
- data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/table/fixtures.json +538 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro-options.json +132 -0
- data/node_modules/govuk-frontend/govuk/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/table/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/fixtures.json +286 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +84 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1347 -0
- data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +32 -0
- data/node_modules/govuk-frontend/govuk/components/tag/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/tag/fixtures.json +131 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro-options.json +26 -0
- data/node_modules/govuk-frontend/govuk/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/fixtures.json +250 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +91 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +45 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/README.md +15 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/fixtures.json +73 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro-options.json +32 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/govuk/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/govuk/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +25 -0
- data/node_modules/govuk-frontend/govuk/core/_links.scss +41 -0
- data/node_modules/govuk-frontend/govuk/core/_lists.scss +72 -0
- data/node_modules/govuk-frontend/govuk/core/_section-break.scss +62 -0
- data/node_modules/govuk-frontend/govuk/core/_template.scss +36 -0
- data/node_modules/govuk-frontend/govuk/core/_typography.scss +192 -0
- data/node_modules/govuk-frontend/govuk/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +95 -0
- data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
- data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +28 -0
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +61 -0
- data/node_modules/govuk-frontend/govuk/helpers/_links.scss +427 -0
- data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
- data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +153 -0
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +207 -0
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
- data/node_modules/govuk-frontend/govuk/objects/_all.scss +5 -0
- data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
- data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +23 -0
- data/node_modules/govuk-frontend/govuk/objects/_grid.scss +24 -0
- data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +68 -0
- data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +88 -0
- data/node_modules/govuk-frontend/govuk/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +30 -0
- data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +64 -0
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +27 -0
- data/node_modules/govuk-frontend/govuk/overrides/_width.scss +52 -0
- data/node_modules/govuk-frontend/govuk/settings/_all.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +139 -0
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +108 -0
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +74 -0
- data/node_modules/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
- data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +105 -0
- data/node_modules/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +89 -0
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +183 -0
- data/node_modules/govuk-frontend/govuk/template.njk +60 -0
- data/node_modules/govuk-frontend/govuk/tools/_all.scss +8 -0
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/govuk/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/govuk/tools/_iff.scss +17 -0
- data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +25 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
- data/node_modules/govuk-frontend/govuk/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +589 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +54 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +31 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +254 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +28 -0
- data/node_modules/govuk-frontend/package.json +56 -0
- data/package-lock.json +13 -0
- data/package.json +29 -0
- data/vendor/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/vendor/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/vendor/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/vendor/assets/images/favicon.ico +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon.png +0 -0
- data/vendor/assets/images/govuk-crest-2x.png +0 -0
- data/vendor/assets/images/govuk-crest.png +0 -0
- data/vendor/assets/images/govuk-logotype-crown.png +0 -0
- data/vendor/assets/images/govuk-mask-icon.svg +7 -0
- data/vendor/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +2616 -0
- data/vendor/assets/stylesheets/_base.scss +3 -0
- data/vendor/assets/stylesheets/all-ie8.scss +6 -0
- data/vendor/assets/stylesheets/all.scss +9 -0
- data/vendor/assets/stylesheets/components/_all.scss +33 -0
- data/vendor/assets/stylesheets/components/accordion/_accordion.scss +2 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +197 -0
- data/vendor/assets/stylesheets/components/back-link/_back-link.scss +2 -0
- data/vendor/assets/stylesheets/components/back-link/_index.scss +99 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +2 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +138 -0
- data/vendor/assets/stylesheets/components/button/_button.scss +2 -0
- data/vendor/assets/stylesheets/components/button/_index.scss +288 -0
- data/vendor/assets/stylesheets/components/character-count/_character-count.scss +2 -0
- data/vendor/assets/stylesheets/components/character-count/_index.scss +25 -0
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +2 -0
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +320 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_cookie-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +51 -0
- data/vendor/assets/stylesheets/components/date-input/_date-input.scss +2 -0
- data/vendor/assets/stylesheets/components/date-input/_index.scss +26 -0
- data/vendor/assets/stylesheets/components/details/_details.scss +2 -0
- data/vendor/assets/stylesheets/components/details/_index.scss +87 -0
- data/vendor/assets/stylesheets/components/error-message/_error-message.scss +2 -0
- data/vendor/assets/stylesheets/components/error-message/_index.scss +11 -0
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +2 -0
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +43 -0
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +2 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +64 -0
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +2 -0
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/footer/_footer.scss +2 -0
- data/vendor/assets/stylesheets/components/footer/_index.scss +241 -0
- data/vendor/assets/stylesheets/components/header/_header.scss +2 -0
- data/vendor/assets/stylesheets/components/header/_index.scss +331 -0
- data/vendor/assets/stylesheets/components/hint/_hint.scss +2 -0
- data/vendor/assets/stylesheets/components/hint/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/input/_index.scss +191 -0
- data/vendor/assets/stylesheets/components/input/_input.scss +2 -0
- data/vendor/assets/stylesheets/components/inset-text/_index.scss +24 -0
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +2 -0
- data/vendor/assets/stylesheets/components/label/_index.scss +41 -0
- data/vendor/assets/stylesheets/components/label/_label.scss +2 -0
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
- data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/panel/_index.scss +44 -0
- data/vendor/assets/stylesheets/components/panel/_panel.scss +2 -0
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +27 -0
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +2 -0
- data/vendor/assets/stylesheets/components/radios/_index.scss +342 -0
- data/vendor/assets/stylesheets/components/radios/_radios.scss +2 -0
- data/vendor/assets/stylesheets/components/select/_index.scss +49 -0
- data/vendor/assets/stylesheets/components/select/_select.scss +2 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +36 -0
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +2 -0
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +145 -0
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +2 -0
- data/vendor/assets/stylesheets/components/table/_index.scss +71 -0
- data/vendor/assets/stylesheets/components/table/_table.scss +2 -0
- data/vendor/assets/stylesheets/components/tabs/_index.scss +130 -0
- data/vendor/assets/stylesheets/components/tabs/_tabs.scss +2 -0
- data/vendor/assets/stylesheets/components/tag/_index.scss +86 -0
- data/vendor/assets/stylesheets/components/tag/_tag.scss +2 -0
- data/vendor/assets/stylesheets/components/textarea/_index.scss +47 -0
- data/vendor/assets/stylesheets/components/textarea/_textarea.scss +2 -0
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +66 -0
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +2 -0
- data/vendor/assets/stylesheets/core/_all.scss +6 -0
- data/vendor/assets/stylesheets/core/_global-styles.scss +25 -0
- data/vendor/assets/stylesheets/core/_links.scss +41 -0
- data/vendor/assets/stylesheets/core/_lists.scss +72 -0
- data/vendor/assets/stylesheets/core/_section-break.scss +62 -0
- data/vendor/assets/stylesheets/core/_template.scss +36 -0
- data/vendor/assets/stylesheets/core/_typography.scss +192 -0
- data/vendor/assets/stylesheets/defra_ruby_template.scss +16 -0
- data/vendor/assets/stylesheets/helpers/_all.scss +12 -0
- data/vendor/assets/stylesheets/helpers/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/helpers/_colour.scss +95 -0
- data/vendor/assets/stylesheets/helpers/_device-pixels.scss +37 -0
- data/vendor/assets/stylesheets/helpers/_focused.scss +28 -0
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +41 -0
- data/vendor/assets/stylesheets/helpers/_grid.scss +61 -0
- data/vendor/assets/stylesheets/helpers/_links.scss +427 -0
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +91 -0
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +80 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +153 -0
- data/vendor/assets/stylesheets/helpers/_typography.scss +207 -0
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +84 -0
- data/vendor/assets/stylesheets/objects/_all.scss +5 -0
- data/vendor/assets/stylesheets/objects/_button-group.scss +101 -0
- data/vendor/assets/stylesheets/objects/_form-group.scss +23 -0
- data/vendor/assets/stylesheets/objects/_grid.scss +24 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +68 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +88 -0
- data/vendor/assets/stylesheets/overrides/_all.scss +4 -0
- data/vendor/assets/stylesheets/overrides/_display.scss +30 -0
- data/vendor/assets/stylesheets/overrides/_spacing.scss +64 -0
- data/vendor/assets/stylesheets/overrides/_typography.scss +27 -0
- data/vendor/assets/stylesheets/overrides/_width.scss +52 -0
- data/vendor/assets/stylesheets/settings/_all.scss +23 -0
- data/vendor/assets/stylesheets/settings/_assets.scss +82 -0
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +155 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +139 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +108 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +74 -0
- data/vendor/assets/stylesheets/settings/_global-styles.scss +13 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +18 -0
- data/vendor/assets/stylesheets/settings/_links.scss +62 -0
- data/vendor/assets/stylesheets/settings/_measurements.scss +105 -0
- data/vendor/assets/stylesheets/settings/_media-queries.scss +23 -0
- data/vendor/assets/stylesheets/settings/_spacing.scss +80 -0
- data/vendor/assets/stylesheets/settings/_typography-font-families.scss +32 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +89 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +183 -0
- data/vendor/assets/stylesheets/tools/_all.scss +8 -0
- data/vendor/assets/stylesheets/tools/_compatibility.scss +36 -0
- data/vendor/assets/stylesheets/tools/_exports.scss +33 -0
- data/vendor/assets/stylesheets/tools/_font-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_ie8.scss +51 -0
- data/vendor/assets/stylesheets/tools/_iff.scss +17 -0
- data/vendor/assets/stylesheets/tools/_image-url.scss +25 -0
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +20 -0
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +20 -0
- data/vendor/assets/stylesheets/utilities/_all.scss +2 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.scss +5 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +9 -0
- data/vendor/assets/stylesheets/vendor/_sass-mq.scss +347 -0
- metadata +520 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers/layout
|
3
|
+
////
|
4
|
+
|
5
|
+
// =========================================================
|
6
|
+
// Wrangle sass-mq config...
|
7
|
+
// =========================================================
|
8
|
+
|
9
|
+
// Pass our breakpoints and static breakpoint definitions through to sass-mq.
|
10
|
+
$mq-breakpoints: if(variable-exists(govuk-breakpoints), $govuk-breakpoints, ());
|
11
|
+
$mq-static-breakpoint: if(variable-exists(govuk-ie8-breakpoint), $govuk-ie8-breakpoint, desktop);
|
12
|
+
|
13
|
+
$mq-show-breakpoints: ();
|
14
|
+
|
15
|
+
@if (variable-exists(govuk-show-breakpoints) and $govuk-show-breakpoints) {
|
16
|
+
$mq-show-breakpoints: map-keys($govuk-breakpoints);
|
17
|
+
}
|
18
|
+
|
19
|
+
// When building a stylesheet for IE8, set $mq-responsive to false in order to
|
20
|
+
// 'rasterize' any media queries.
|
21
|
+
|
22
|
+
$mq-responsive: true;
|
23
|
+
@if (variable-exists(govuk-is-ie8) and $govuk-is-ie8) {
|
24
|
+
$mq-responsive: false;
|
25
|
+
}
|
26
|
+
|
27
|
+
// This is a horrible, horrible hack to prevent the 'dev mode' CSS to display
|
28
|
+
// the current breakpoint from being included multiple times.
|
29
|
+
//
|
30
|
+
// We can't use the `exports` mixin for this because import directives cannot be
|
31
|
+
// used within control directives 😠
|
32
|
+
$sass-mq-already-included: false !default;
|
33
|
+
|
34
|
+
@if $sass-mq-already-included {
|
35
|
+
$mq-show-breakpoints: ();
|
36
|
+
}
|
37
|
+
|
38
|
+
@import "../vendor/sass-mq";
|
39
|
+
|
40
|
+
$sass-mq-already-included: true;
|
41
|
+
|
42
|
+
// =========================================================
|
43
|
+
// Helpers
|
44
|
+
// =========================================================
|
45
|
+
|
46
|
+
/// Media Query
|
47
|
+
///
|
48
|
+
/// This is a currently a wrapper for sass-mq - abstracted so that we can
|
49
|
+
/// replace it in the future if we so choose.
|
50
|
+
///
|
51
|
+
/// @param {String | Boolean} $from [false] - One of $govuk-breakpoints
|
52
|
+
/// @param {String | Boolean} $until [false] - One of $govuk-breakpoints
|
53
|
+
/// @param {String | Boolean} $and [false] - Additional media query parameters
|
54
|
+
/// @param {String} $media-type [all] - Media type: screen, print…
|
55
|
+
///
|
56
|
+
/// @ignore Undocumented mq API, for advanced use only:
|
57
|
+
/// @ignore @param {Map} $breakpoints [$govuk-breakpoints]
|
58
|
+
/// @ignore @param {String} $static-breakpoint [$govuk-ie8-breakpoint]
|
59
|
+
/// @ignore @param {Boolean} $responsive [$govuk-is-ie8]
|
60
|
+
///
|
61
|
+
/// @content styling rules, wrapped into a @media query when $responsive is true
|
62
|
+
///
|
63
|
+
/// @example scss
|
64
|
+
/// .element {
|
65
|
+
/// @include govuk-media-query($from: mobile) {
|
66
|
+
/// color: red;
|
67
|
+
/// }
|
68
|
+
/// @include govuk-media-query($until: tablet) {
|
69
|
+
/// color: blue;
|
70
|
+
/// }
|
71
|
+
/// @include govuk-media-query(mobile, tablet) {
|
72
|
+
/// color: green;
|
73
|
+
/// }
|
74
|
+
/// @include govuk-media-query($from: tablet, $and: '(orientation: landscape)') {
|
75
|
+
/// color: teal;
|
76
|
+
/// }
|
77
|
+
/// @include govuk-media-query(950px) {
|
78
|
+
/// color: hotpink;
|
79
|
+
/// }
|
80
|
+
/// @include govuk-media-query(tablet, $media-type: screen) {
|
81
|
+
/// color: hotpink;
|
82
|
+
/// }
|
83
|
+
/// }
|
84
|
+
///
|
85
|
+
/// @access public
|
86
|
+
|
87
|
+
@mixin govuk-media-query($args...) {
|
88
|
+
@include mq($args...) {
|
89
|
+
@content;
|
90
|
+
}
|
91
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers/shapes
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Calculate the height of an equilateral triangle
|
6
|
+
///
|
7
|
+
/// Multiplying half the length of the base of an equilateral triangle by the
|
8
|
+
/// square root of three gives us its height. We use 1.732 as an approximation.
|
9
|
+
///
|
10
|
+
/// @param {Number} $base - Length of the base of the triangle
|
11
|
+
/// @return {Number} Calculated height of the triangle
|
12
|
+
/// @access private
|
13
|
+
|
14
|
+
@function _govuk-equilateral-height($base) {
|
15
|
+
$square-root-of-three: 1.732;
|
16
|
+
|
17
|
+
@return ($base / 2) * $square-root-of-three;
|
18
|
+
}
|
19
|
+
|
20
|
+
/// Arrow mixin
|
21
|
+
///
|
22
|
+
/// Generate Arrows (triangles) by using a mix of transparent (1) and coloured
|
23
|
+
/// borders. The coloured borders inherit the text colour of the element (2).
|
24
|
+
///
|
25
|
+
/// Ensure the arrow is rendered correctly if browser colours are overridden by
|
26
|
+
/// providing a clip path (3). Without this the transparent borders are
|
27
|
+
/// overridden to become visible which results in a square.
|
28
|
+
///
|
29
|
+
/// We need both because older browsers do not support clip-path.
|
30
|
+
///
|
31
|
+
/// @param {String} $direction - Direction for arrow: up, right, down, left.
|
32
|
+
/// @param {Number} $base - Length of the triangle 'base' side
|
33
|
+
/// @param {Number} $height [null] - Height of triangle. Omit for equilateral.
|
34
|
+
/// @param {String} $display [block] - CSS display property of the arrow
|
35
|
+
///
|
36
|
+
/// @access public
|
37
|
+
|
38
|
+
@mixin govuk-shape-arrow($direction, $base, $height: null, $display: block) {
|
39
|
+
display: $display;
|
40
|
+
|
41
|
+
width: 0;
|
42
|
+
height: 0;
|
43
|
+
|
44
|
+
border-style: solid;
|
45
|
+
border-color: transparent; // 1
|
46
|
+
|
47
|
+
$perpendicular: $base / 2;
|
48
|
+
|
49
|
+
@if ($height == null) {
|
50
|
+
$height: _govuk-equilateral-height($base);
|
51
|
+
}
|
52
|
+
|
53
|
+
@if $direction == "up" {
|
54
|
+
-webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
55
|
+
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3
|
56
|
+
|
57
|
+
border-width: 0 $perpendicular $height $perpendicular;
|
58
|
+
border-bottom-color: inherit; // 2
|
59
|
+
} @else if $direction == "right" {
|
60
|
+
-webkit-clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
|
61
|
+
clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3
|
62
|
+
|
63
|
+
border-width: $perpendicular 0 $perpendicular $height;
|
64
|
+
border-left-color: inherit; // 2
|
65
|
+
} @else if $direction == "down" {
|
66
|
+
-webkit-clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
|
67
|
+
clip-path: polygon(0% 0%, 50% 100%, 100% 0%); // 3
|
68
|
+
|
69
|
+
border-width: $height $perpendicular 0 $perpendicular;
|
70
|
+
border-top-color: inherit; // 2
|
71
|
+
} @else if $direction == "left" {
|
72
|
+
-webkit-clip-path: polygon(0% 50%, 100% 100%, 100% 0%);
|
73
|
+
clip-path: polygon(0% 50%, 100% 100%, 100% 0%); // 3
|
74
|
+
|
75
|
+
border-width: $perpendicular $height $perpendicular 0;
|
76
|
+
border-right-color: inherit; // 2
|
77
|
+
} @else {
|
78
|
+
@error "Invalid arrow direction: expected `up`, `right`, `down` or `left`, got `#{$direction}`";
|
79
|
+
}
|
80
|
+
}
|
@@ -0,0 +1,153 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers/spacing
|
3
|
+
////
|
4
|
+
|
5
|
+
// stylelint-disable indentation
|
6
|
+
|
7
|
+
/// Single point spacing
|
8
|
+
///
|
9
|
+
/// Returns measurement corresponding to the spacing point requested.
|
10
|
+
///
|
11
|
+
/// @param {Number} $spacing-point - Point on the spacing scale (set in `settings/_spacing.sccs`)
|
12
|
+
///
|
13
|
+
/// @returns {String} Spacing Measurement eg. 10px
|
14
|
+
///
|
15
|
+
/// @example scss
|
16
|
+
/// .element {
|
17
|
+
/// padding: govuk-spacing(5);
|
18
|
+
/// top: govuk-spacing(2) !important; // if `!important` is required
|
19
|
+
/// }
|
20
|
+
/// @access public
|
21
|
+
|
22
|
+
@function govuk-spacing($spacing-point) {
|
23
|
+
|
24
|
+
$actual-input-type: type-of($spacing-point);
|
25
|
+
@if $actual-input-type != "number" {
|
26
|
+
@error "Expected a number (integer), but got a "
|
27
|
+
+ "#{$actual-input-type}.";
|
28
|
+
}
|
29
|
+
|
30
|
+
@if not map-has-key($govuk-spacing-points, $spacing-point) {
|
31
|
+
@error "Unknown spacing variable `#{$spacing-point}`. Make sure you are using a point from the spacing scale in `_settings/spacing.scss`.";
|
32
|
+
}
|
33
|
+
|
34
|
+
@return map-get($govuk-spacing-points, $spacing-point);
|
35
|
+
}
|
36
|
+
|
37
|
+
/// Responsive spacing
|
38
|
+
///
|
39
|
+
/// Adds responsive spacing (either padding or margin, depending on `$property`)
|
40
|
+
/// by fetching a 'spacing map' from the responsive spacing scale, which defines
|
41
|
+
/// different spacing values at different breakpoints.
|
42
|
+
///
|
43
|
+
/// To generate responsive spacing, use 'govuk-responsive-margin' or
|
44
|
+
/// 'govuk-responsive-padding' mixins
|
45
|
+
///
|
46
|
+
/// @param {Number} $responsive-spacing-point - Point on the responsive spacing
|
47
|
+
/// scale, corresponds to a map of breakpoints and spacing values
|
48
|
+
/// @param {String} $property - Property to add spacing to (e.g. 'margin')
|
49
|
+
/// @param {String} $direction [all] - Direction to add spacing to
|
50
|
+
/// (`top`, `right`, `bottom`, `left`, `all`)
|
51
|
+
/// @param {Boolean} $important [false] - Whether to mark as `!important`
|
52
|
+
/// @param {Number} $adjustment [false] - Offset to adjust spacing by
|
53
|
+
///
|
54
|
+
/// @access private
|
55
|
+
|
56
|
+
@mixin _govuk-responsive-spacing($responsive-spacing-point, $property, $direction: "all", $important: false, $adjustment: false) {
|
57
|
+
|
58
|
+
$actual-input-type: type-of($responsive-spacing-point);
|
59
|
+
@if $actual-input-type != "number" {
|
60
|
+
@error "Expected a number (integer), but got a " + "#{$actual-input-type}.";
|
61
|
+
}
|
62
|
+
|
63
|
+
@if not map-has-key($govuk-spacing-responsive-scale, $responsive-spacing-point) {
|
64
|
+
@error "Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the "
|
65
|
+
+ "responsive spacing scale in `_settings/spacing.scss`.";
|
66
|
+
}
|
67
|
+
|
68
|
+
// Make sure that the return value from `_settings/spacing.scss` is a map.
|
69
|
+
$scale-map: map-get($govuk-spacing-responsive-scale, $responsive-spacing-point);
|
70
|
+
$actual-map-type: type-of($scale-map);
|
71
|
+
@if $actual-map-type != "map" {
|
72
|
+
@error "Expected a number (integer), but got a "
|
73
|
+
+ "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)";
|
74
|
+
}
|
75
|
+
|
76
|
+
// Loop through each breakpoint in the map
|
77
|
+
@each $breakpoint, $breakpoint-value in $scale-map {
|
78
|
+
|
79
|
+
@if ($adjustment) {
|
80
|
+
$breakpoint-value: $breakpoint-value + $adjustment;
|
81
|
+
}
|
82
|
+
|
83
|
+
// The 'null' breakpoint is for mobile.
|
84
|
+
@if $breakpoint == null {
|
85
|
+
|
86
|
+
@if $direction == all {
|
87
|
+
#{$property}: $breakpoint-value if($important, !important, null);
|
88
|
+
} @else {
|
89
|
+
#{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
|
90
|
+
}
|
91
|
+
} @else {
|
92
|
+
@include govuk-media-query($from: $breakpoint) {
|
93
|
+
@if $direction == all {
|
94
|
+
#{$property}: $breakpoint-value if($important, !important, null);
|
95
|
+
} @else {
|
96
|
+
#{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
/// Responsive margin
|
104
|
+
///
|
105
|
+
/// Adds responsive margin by fetching a 'spacing map' from the responsive
|
106
|
+
/// spacing scale, which defines different spacing values at different
|
107
|
+
/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin.
|
108
|
+
///
|
109
|
+
/// @see {mixin} _govuk-responsive-spacing
|
110
|
+
///
|
111
|
+
/// @param {Number} $responsive-spacing-point - Point on the responsive spacing
|
112
|
+
/// scale, corresponds to a map of breakpoints and spacing values
|
113
|
+
/// @param {String} $direction [all] - Direction to add spacing to
|
114
|
+
/// (`top`, `right`, `bottom`, `left`, `all`)
|
115
|
+
/// @param {Boolean} $important [false] - Whether to mark as `!important`
|
116
|
+
/// @param {Number} $adjustment [false] - Offset to adjust spacing by
|
117
|
+
///
|
118
|
+
/// @example scss
|
119
|
+
/// .element {
|
120
|
+
/// @include govuk-responsive-margin(6, "left", $adjustment: 1px);
|
121
|
+
/// }
|
122
|
+
///
|
123
|
+
/// @access public
|
124
|
+
|
125
|
+
@mixin govuk-responsive-margin($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) {
|
126
|
+
@include _govuk-responsive-spacing($responsive-spacing-point, "margin", $direction, $important, $adjustment);
|
127
|
+
}
|
128
|
+
|
129
|
+
/// Responsive padding
|
130
|
+
///
|
131
|
+
/// Adds responsive padding by fetching a 'spacing map' from the responsive
|
132
|
+
/// spacing scale, which defines different spacing values at different
|
133
|
+
/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin.
|
134
|
+
///
|
135
|
+
/// @see {mixin} _govuk-responsive-spacing
|
136
|
+
///
|
137
|
+
/// @param {Number} $responsive-spacing-point - Point on the responsive spacing
|
138
|
+
/// scale, corresponds to a map of breakpoints and spacing values
|
139
|
+
/// @param {String} $direction [all] - Direction to add spacing to
|
140
|
+
/// (`top`, `right`, `bottom`, `left`, `all`)
|
141
|
+
/// @param {Boolean} $important [false] - Whether to mark as `!important`
|
142
|
+
/// @param {Number} $adjustment [false] - Offset to adjust spacing
|
143
|
+
///
|
144
|
+
/// @example scss
|
145
|
+
/// .element {
|
146
|
+
/// @include govuk-responsive-padding(6, "left", $adjustment: 1px);
|
147
|
+
/// }
|
148
|
+
///
|
149
|
+
/// @access public
|
150
|
+
|
151
|
+
@mixin govuk-responsive-padding($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) {
|
152
|
+
@include _govuk-responsive-spacing($responsive-spacing-point, "padding", $direction, $important, $adjustment);
|
153
|
+
}
|
@@ -0,0 +1,207 @@
|
|
1
|
+
////
|
2
|
+
/// @group helpers/typography
|
3
|
+
////
|
4
|
+
|
5
|
+
@import "../tools/px-to-rem";
|
6
|
+
|
7
|
+
/// 'Common typography' helper
|
8
|
+
///
|
9
|
+
/// Sets the font family and associated properties, such as font smoothing. Also
|
10
|
+
/// overrides the font for print.
|
11
|
+
///
|
12
|
+
/// @param {List} $font-family [$govuk-font-family] Font family to use
|
13
|
+
/// @access public
|
14
|
+
|
15
|
+
@mixin govuk-typography-common($font-family: $govuk-font-family) {
|
16
|
+
font-family: $font-family;
|
17
|
+
-webkit-font-smoothing: antialiased;
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
19
|
+
|
20
|
+
// If the user is using the default GDS Transport font we need to include
|
21
|
+
// the font-face declarations.
|
22
|
+
//
|
23
|
+
// We do not need to include the GDS Transport font-face declarations if
|
24
|
+
// alphagov/govuk_template is being used since nta will already be included by
|
25
|
+
// default.
|
26
|
+
@if ($govuk-include-default-font-face) {
|
27
|
+
@include _govuk-font-face-gds-transport;
|
28
|
+
}
|
29
|
+
|
30
|
+
@include govuk-media-query($media-type: print) {
|
31
|
+
font-family: $govuk-font-family-print;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
/// Text colour helper
|
36
|
+
///
|
37
|
+
/// Sets the text colour, including a suitable override for print.
|
38
|
+
///
|
39
|
+
/// @access public
|
40
|
+
|
41
|
+
@mixin govuk-text-colour {
|
42
|
+
color: $govuk-text-colour;
|
43
|
+
|
44
|
+
@include govuk-media-query($media-type: print) {
|
45
|
+
color: $govuk-print-text-colour;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
/// Regular font weight helper
|
50
|
+
///
|
51
|
+
/// @param {Boolean} $important [false] - Whether to mark declarations as
|
52
|
+
/// `!important`. Generally Used to create override classes.
|
53
|
+
/// @access public
|
54
|
+
|
55
|
+
@mixin govuk-typography-weight-regular($important: false) {
|
56
|
+
font-weight: $govuk-font-weight-regular if($important, !important, null);
|
57
|
+
}
|
58
|
+
|
59
|
+
/// Bold font weight helper
|
60
|
+
///
|
61
|
+
/// @param {Boolean} $important [false] - Whether to mark declarations as
|
62
|
+
/// `!important`. Generally Used to create override classes.
|
63
|
+
/// @access public
|
64
|
+
|
65
|
+
@mixin govuk-typography-weight-bold($important: false) {
|
66
|
+
font-weight: $govuk-font-weight-bold if($important, !important, null);
|
67
|
+
}
|
68
|
+
|
69
|
+
/// Convert line-heights specified in pixels into a relative value, unless
|
70
|
+
/// they are already unit-less (and thus already treated as relative values)
|
71
|
+
/// or the units do not match the units used for the font size.
|
72
|
+
///
|
73
|
+
/// @param {Number} $line-height Line height
|
74
|
+
/// @param {Number} $font-size Font size
|
75
|
+
/// @return {Number} The line height as either a relative value or unmodified
|
76
|
+
///
|
77
|
+
/// @access private
|
78
|
+
|
79
|
+
@function _govuk-line-height($line-height, $font-size) {
|
80
|
+
@if not unitless($line-height) and unit($line-height) == unit($font-size) {
|
81
|
+
$line-height: $line-height / $font-size;
|
82
|
+
}
|
83
|
+
|
84
|
+
@return $line-height;
|
85
|
+
}
|
86
|
+
|
87
|
+
/// Responsive typography helper
|
88
|
+
///
|
89
|
+
/// Takes a 'font map' as an argument and uses it to create font-size and
|
90
|
+
/// line-height declarations for different breakpoints, and for print.
|
91
|
+
///
|
92
|
+
/// Example font map:
|
93
|
+
///
|
94
|
+
/// $my-font-map: (
|
95
|
+
/// null: (
|
96
|
+
/// font-size: 16px,
|
97
|
+
/// line-height: 20px
|
98
|
+
/// ),
|
99
|
+
/// tablet: (
|
100
|
+
/// font-size: 19px,
|
101
|
+
/// line-height: 25px
|
102
|
+
/// ),
|
103
|
+
/// print: (
|
104
|
+
/// font-size: 14pt,
|
105
|
+
/// line-height: 1.15
|
106
|
+
/// )
|
107
|
+
/// );
|
108
|
+
///
|
109
|
+
/// @param {Map} $font-map - Font map
|
110
|
+
/// @param {Number} $override-line-height [false] - Non responsive custom line
|
111
|
+
/// height. Omit to use the line height from the font map.
|
112
|
+
/// @param {Boolean} $important [false] - Whether to mark declarations as
|
113
|
+
/// `!important`.
|
114
|
+
///
|
115
|
+
/// @access public
|
116
|
+
|
117
|
+
@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {
|
118
|
+
|
119
|
+
@if not map-has-key($govuk-typography-scale, $size) {
|
120
|
+
@error "Unknown font size `#{$size}` - expected a point from the typography scale.";
|
121
|
+
}
|
122
|
+
|
123
|
+
$font-map: map-get($govuk-typography-scale, $size);
|
124
|
+
|
125
|
+
@each $breakpoint, $breakpoint-map in $font-map {
|
126
|
+
$font-size: map-get($breakpoint-map, "font-size");
|
127
|
+
$font-size-rem: govuk-px-to-rem($font-size);
|
128
|
+
|
129
|
+
$line-height: _govuk-line-height(
|
130
|
+
$line-height: if(
|
131
|
+
$override-line-height,
|
132
|
+
$override-line-height,
|
133
|
+
map-get($breakpoint-map, "line-height")
|
134
|
+
),
|
135
|
+
$font-size: $font-size
|
136
|
+
);
|
137
|
+
|
138
|
+
// Mark rules as !important if $important is true - this will result in
|
139
|
+
// these variables becoming strings, so this needs to happen *after* they
|
140
|
+
// are used in calculations
|
141
|
+
$font-size: $font-size if($important, !important, null);
|
142
|
+
$font-size-rem: $font-size-rem if($important, !important, null);
|
143
|
+
$line-height: $line-height if($important, !important, null);
|
144
|
+
|
145
|
+
@if $breakpoint == null {
|
146
|
+
font-size: $font-size;
|
147
|
+
@if $govuk-typography-use-rem {
|
148
|
+
font-size: $font-size-rem;
|
149
|
+
}
|
150
|
+
line-height: $line-height;
|
151
|
+
} @else if $breakpoint == "print" {
|
152
|
+
@include govuk-media-query($media-type: print) {
|
153
|
+
font-size: $font-size;
|
154
|
+
line-height: $line-height;
|
155
|
+
}
|
156
|
+
} @else {
|
157
|
+
@include govuk-media-query($from: $breakpoint) {
|
158
|
+
font-size: $font-size;
|
159
|
+
@if $govuk-typography-use-rem {
|
160
|
+
font-size: $font-size-rem;
|
161
|
+
}
|
162
|
+
line-height: $line-height;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
168
|
+
/// Font helper
|
169
|
+
///
|
170
|
+
/// @param {Number} $size - Size of the font as it would appear on desktop -
|
171
|
+
/// uses the responsive font size map
|
172
|
+
/// @param {String} $weight [regular] - Weight: `bold` or `regular`
|
173
|
+
/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not
|
174
|
+
/// @param {Number} $line-height [false] - Line-height, if overriding the default
|
175
|
+
///
|
176
|
+
/// @access public
|
177
|
+
|
178
|
+
@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {
|
179
|
+
@if $tabular {
|
180
|
+
// if govuk-font-family-tabular is set use $govuk-font-family-tabular
|
181
|
+
@if $govuk-font-family-tabular {
|
182
|
+
@include govuk-typography-common($font-family: $govuk-font-family-tabular);
|
183
|
+
} @else {
|
184
|
+
@include govuk-typography-common;
|
185
|
+
-webkit-font-feature-settings: "tnum" 1;
|
186
|
+
font-feature-settings: "tnum" 1;
|
187
|
+
|
188
|
+
@supports (font-variant-numeric: tabular-nums) {
|
189
|
+
-webkit-font-feature-settings: normal;
|
190
|
+
font-feature-settings: normal;
|
191
|
+
font-variant-numeric: tabular-nums;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
} @else {
|
195
|
+
@include govuk-typography-common;
|
196
|
+
}
|
197
|
+
|
198
|
+
@if $weight == regular {
|
199
|
+
@include govuk-typography-weight-regular;
|
200
|
+
} @else if $weight == bold {
|
201
|
+
@include govuk-typography-weight-bold;
|
202
|
+
}
|
203
|
+
|
204
|
+
@if $size {
|
205
|
+
@include govuk-typography-responsive($size, $override-line-height: $line-height);
|
206
|
+
}
|
207
|
+
}
|