govuk_tech_docs 3.4.5 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/publish.yaml +8 -4
- data/.github/workflows/test.yaml +11 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +22 -1
- data/example/.ruby-version +1 -1
- data/example/source/javascripts/govuk_frontend.js +1 -0
- data/govuk_tech_docs.gemspec +17 -11
- data/lib/assets/javascripts/_modules/page-expiry.js +2 -2
- data/lib/assets/javascripts/_modules/table-of-contents.js +48 -2
- data/lib/assets/javascripts/govuk_frontend_all.js +3 -0
- data/lib/assets/javascripts/govuk_tech_docs.js +0 -2
- data/lib/assets/stylesheets/_govuk_tech_docs.scss +4 -10
- data/lib/assets/stylesheets/modules/_page-review.scss +0 -2
- data/lib/assets/stylesheets/modules/_search.scss +0 -4
- data/lib/govuk_tech_docs/meta_tags.rb +1 -1
- data/lib/govuk_tech_docs/redirects.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/heading_tree_builder.rb +1 -1
- data/lib/govuk_tech_docs/table_of_contents/helpers.rb +2 -2
- data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +6 -2
- data/lib/govuk_tech_docs/version.rb +1 -1
- data/lib/govuk_tech_docs.rb +20 -3
- data/lib/source/layouts/_header.erb +8 -12
- data/lib/source/layouts/_page_review.erb +1 -1
- data/lib/source/layouts/_search.erb +2 -2
- data/lib/source/layouts/core.erb +8 -2
- data/lib/source/stylesheets/manifest.css +1 -1
- data/node_modules/govuk-frontend/dist/govuk/_base.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +2554 -0
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +2529 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +18 -0
- data/node_modules/govuk-frontend/dist/govuk/all.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-mask.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs +7 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +4 -0
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +159 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +18 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +31 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk/components/_all.scss → dist/govuk/components/_index.scss} +8 -3
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/accordion/_index.scss +55 -77
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +785 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +777 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +349 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/back-link/_index.scss +12 -36
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/breadcrumbs/_index.scss +11 -36
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/button/_index.scss +30 -103
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +318 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +310 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +73 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/character-count/_index.scss +8 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +761 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +753 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +295 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/checkboxes/_index.scss +108 -132
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +268 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +260 -0
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs +111 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/cookie-banner/_index.scss +19 -15
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/date-input/_index.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +139 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-message/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-summary/_index.scss +19 -6
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +378 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +370 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +103 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/exit-this-page/_index.scss +5 -10
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +662 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +654 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +226 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/fieldset/_index.scss +20 -15
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/file-upload/_index.scss +11 -15
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/footer/_index.scss +25 -68
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/header/_index.scss +84 -79
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +252 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +244 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +88 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_hint.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_index.scss +3 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_index.scss +24 -49
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_input.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/inset-text/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_index.scss +12 -7
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_label.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/notification-banner/_index.scss +11 -7
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +320 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +312 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +51 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/pagination/_index.scss +36 -55
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +58 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/panel/_panel.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +594 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +586 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +154 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/phase-banner/_index.scss +10 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/radios/_index.scss +92 -113
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +245 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +237 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs +88 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/select/_index.scss +9 -16
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +168 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +249 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +241 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/skip-link/_index.scss +10 -5
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +244 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +236 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +58 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/summary-list/_index.scss +22 -20
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_index.scss +21 -17
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_table.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_index.scss +13 -9
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_tabs.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +453 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +445 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +283 -0
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +97 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tag/_tag.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +79 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/textarea/_index.scss +6 -10
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/warning-text/_index.scss +13 -13
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_global-styles.scss +2 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +12 -0
- data/node_modules/govuk-frontend/{govuk/core/_all.scss → dist/govuk/core/_index.scss} +3 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_links.scss +8 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_lists.scss +2 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_section-break.scss +2 -7
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_typography.scss +8 -5
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +57 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +60 -0
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_clearfix.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +127 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_device-pixels.scss +4 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_focused.scss +22 -6
- data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss +41 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_grid.scss +3 -1
- data/node_modules/govuk-frontend/{govuk/helpers/_all.scss → dist/govuk/helpers/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_links.scss +38 -76
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_media-queries.scss +3 -12
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_shape-arrow.scss +3 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_spacing.scss +12 -10
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +288 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_visually-hidden.scss +39 -50
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +195 -0
- data/node_modules/govuk-frontend/dist/govuk/index.scss +11 -0
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +162 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_button-group.scss +7 -12
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_form-group.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_grid.scss +4 -2
- data/node_modules/govuk-frontend/{govuk/objects/_all.scss → dist/govuk/objects/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_main-wrapper.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_template.scss +2 -1
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_width-container.scss +2 -9
- data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +9 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_display.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/overrides/_all.scss → dist/govuk/overrides/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_spacing.scss +3 -19
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_text-align.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +42 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_width.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_assets.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_colours-applied.scss +9 -7
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +378 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_global-styles.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/settings/_all.scss → dist/govuk/settings/_index.scss} +2 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_links.scss +3 -20
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_measurements.scss +18 -6
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_media-queries.scss +5 -3
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_spacing.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +52 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +322 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_warnings.scss +33 -8
- data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_exports.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_font-url.scss +3 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_image-url.scss +3 -0
- data/node_modules/govuk-frontend/{govuk/tools/_all.scss → dist/govuk/tools/_index.scss} +2 -2
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-em.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-rem.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +10 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_clearfix.scss +2 -0
- data/node_modules/govuk-frontend/{govuk/utilities/_all.scss → dist/govuk/utilities/_index.scss} +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_visually-hidden.scss +2 -0
- data/node_modules/govuk-frontend/{govuk → dist/govuk}/vendor/_sass-mq.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.js +15 -0
- data/node_modules/govuk-frontend/{govuk-prototype-kit → dist/govuk-prototype-kit}/init.scss +3 -2
- data/package-lock.json +37 -37
- data/package.json +6 -1
- metadata +316 -206
- data/node_modules/govuk-frontend/govuk/_base.scss +0 -3
- data/node_modules/govuk-frontend/govuk/all-ie8.scss +0 -14
- data/node_modules/govuk-frontend/govuk/all.js +0 -5172
- data/node_modules/govuk-frontend/govuk/all.scss +0 -9
- 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 +0 -7
- data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +0 -75
- data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +0 -17
- data/node_modules/govuk-frontend/govuk/common/index.js +0 -192
- data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +0 -386
- data/node_modules/govuk-frontend/govuk/common.js +0 -194
- data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +0 -2386
- data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/button/_button.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/button/button.js +0 -1027
- data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +0 -2281
- data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +0 -1277
- data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/details/_details.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -88
- data/node_modules/govuk-frontend/govuk/components/details/details.js +0 -873
- data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +0 -1189
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +0 -2120
- data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/header/_header.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/header/header.js +0 -794
- data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +0 -843
- data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +0 -56
- data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/radios/radios.js +0 -1222
- data/node_modules/govuk-frontend/govuk/components/select/_select.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +0 -1145
- data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +0 -1621
- data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -81
- data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +0 -2
- data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +0 -2
- data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +0 -5
- data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +0 -98
- data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +0 -41
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +0 -214
- data/node_modules/govuk-frontend/govuk/i18n.js +0 -397
- data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -21
- data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +0 -146
- data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +0 -120
- data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -100
- data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +0 -34
- data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +0 -32
- data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +0 -112
- data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +0 -195
- data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +0 -50
- data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +0 -87
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +0 -274
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +0 -23
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +0 -36
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +0 -597
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +0 -58
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +0 -307
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +0 -33
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +0 -261
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +0 -261
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +0 -151
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +0 -512
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +0 -256
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +0 -96
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +0 -23
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +0 -30
- data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +0 -8
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-affa96571d-v2.woff +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- /data/{lib/source → node_modules/govuk-frontend/dist/govuk/assets/images}/favicon.ico +0 -0
@@ -1,81 +0,0 @@
|
|
1
|
-
@include govuk-exports("govuk/component/tag") {
|
2
|
-
.govuk-tag {
|
3
|
-
|
4
|
-
display: inline-block;
|
5
|
-
|
6
|
-
// When a user customises their colours often the background is removed,
|
7
|
-
// by adding a outline we ensure that the tag component still keeps it's meaning.
|
8
|
-
// https://accessibility.blog.gov.uk/2017/03/27/how-users-change-colours-on-websites/
|
9
|
-
outline: 2px solid transparent;
|
10
|
-
outline-offset: -2px;
|
11
|
-
|
12
|
-
color: govuk-colour("white");
|
13
|
-
background-color: govuk-colour("blue");
|
14
|
-
letter-spacing: 1px;
|
15
|
-
|
16
|
-
text-decoration: none;
|
17
|
-
text-transform: uppercase;
|
18
|
-
|
19
|
-
@if $govuk-use-legacy-font {
|
20
|
-
// Since New Transport sits slightly higher than other common fonts.
|
21
|
-
// We use intentionally uneven padding to make it balanced, this can be
|
22
|
-
// removed using the version of the font that has a more common vertical spacing.
|
23
|
-
@include govuk-font($size: 16, $weight: bold, $line-height: 1.25);
|
24
|
-
padding-top: 4px;
|
25
|
-
padding-right: 8px;
|
26
|
-
padding-bottom: 1px;
|
27
|
-
padding-left: 8px;
|
28
|
-
} @else {
|
29
|
-
@include govuk-font($size: 16, $weight: bold, $line-height: 1);
|
30
|
-
padding-top: 5px;
|
31
|
-
padding-right: 8px;
|
32
|
-
padding-bottom: 4px;
|
33
|
-
padding-left: 8px;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
.govuk-tag--grey {
|
38
|
-
color: govuk-shade(govuk-colour("dark-grey", $legacy: "grey-1"), 30%);
|
39
|
-
background: govuk-tint(govuk-colour("dark-grey", $legacy: "grey-1"), 90%);
|
40
|
-
}
|
41
|
-
|
42
|
-
.govuk-tag--purple {
|
43
|
-
color: govuk-shade(govuk-colour("purple"), 20%);
|
44
|
-
background: govuk-tint(govuk-colour("purple"), 80%);
|
45
|
-
}
|
46
|
-
|
47
|
-
.govuk-tag--turquoise {
|
48
|
-
color: govuk-shade(govuk-colour("turquoise"), 60%);
|
49
|
-
background: govuk-tint(govuk-colour("turquoise"), 70%);
|
50
|
-
}
|
51
|
-
|
52
|
-
.govuk-tag--blue {
|
53
|
-
color: govuk-shade(govuk-colour("blue"), 30%);
|
54
|
-
background: govuk-tint(govuk-colour("blue"), 80%);
|
55
|
-
}
|
56
|
-
|
57
|
-
.govuk-tag--yellow {
|
58
|
-
color: govuk-shade(govuk-colour("yellow"), 65%);
|
59
|
-
background: govuk-tint(govuk-colour("yellow"), 75%);
|
60
|
-
}
|
61
|
-
|
62
|
-
.govuk-tag--orange {
|
63
|
-
color: govuk-shade(govuk-colour("orange"), 55%);
|
64
|
-
background: govuk-tint(govuk-colour("orange"), 70%);
|
65
|
-
}
|
66
|
-
|
67
|
-
.govuk-tag--red {
|
68
|
-
color: govuk-shade(govuk-colour("red"), 30%);
|
69
|
-
background: govuk-tint(govuk-colour("red"), 80%);
|
70
|
-
}
|
71
|
-
|
72
|
-
.govuk-tag--pink {
|
73
|
-
color: govuk-shade(govuk-colour("pink"), 40%);
|
74
|
-
background: govuk-tint(govuk-colour("pink"), 80%);
|
75
|
-
}
|
76
|
-
|
77
|
-
.govuk-tag--green {
|
78
|
-
color: govuk-shade(govuk-colour("green"), 20%);
|
79
|
-
background: govuk-tint(govuk-colour("green"), 80%);
|
80
|
-
}
|
81
|
-
}
|
@@ -1,98 +0,0 @@
|
|
1
|
-
@import "../settings/compatibility";
|
2
|
-
@import "../settings/colours-palette";
|
3
|
-
@import "../settings/colours-organisations";
|
4
|
-
|
5
|
-
////
|
6
|
-
/// @group helpers/colour
|
7
|
-
////
|
8
|
-
|
9
|
-
/// Get colour
|
10
|
-
///
|
11
|
-
/// @param {String | Colour} $colour - Name of colour from the colour palette
|
12
|
-
/// (`$govuk-colours`)
|
13
|
-
/// @param {String} $legacy - Either the name of colour from the legacy palette
|
14
|
-
/// or a colour literal, to return instead when in 'legacy mode' - matching
|
15
|
-
/// the palette from GOV.UK Template, Elements or Frontend Toolkit
|
16
|
-
/// @return {Colour} Representation of named colour
|
17
|
-
///
|
18
|
-
/// @example scss - Using legacy colours from the palette
|
19
|
-
/// .foo {
|
20
|
-
/// background-colour: govuk-colour("mid-grey", $legacy: "grey-2");
|
21
|
-
/// }
|
22
|
-
///
|
23
|
-
/// @example scss - Using legacy colour literals
|
24
|
-
/// .foo {
|
25
|
-
/// background-colour: govuk-colour("green", $legacy: #BADA55);
|
26
|
-
/// }
|
27
|
-
///
|
28
|
-
/// @throw if `$colour` is not a colour from the colour palette
|
29
|
-
/// @access public
|
30
|
-
|
31
|
-
@function govuk-colour($colour, $legacy: false) {
|
32
|
-
@if $govuk-use-legacy-palette and $legacy {
|
33
|
-
@if type-of($legacy) == "color" {
|
34
|
-
@return $legacy;
|
35
|
-
}
|
36
|
-
$colour: $legacy;
|
37
|
-
}
|
38
|
-
|
39
|
-
@if type-of($colour) == "color" {
|
40
|
-
// stylelint-disable-next-line scss/function-quote-no-quoted-strings-inside
|
41
|
-
$colour: quote("#{$colour}");
|
42
|
-
}
|
43
|
-
|
44
|
-
@if not map-has-key($govuk-colours, $colour) {
|
45
|
-
@error "Unknown colour `#{$colour}`";
|
46
|
-
}
|
47
|
-
|
48
|
-
@return map-get($govuk-colours, $colour);
|
49
|
-
}
|
50
|
-
|
51
|
-
/// Get the colour for a government organisation
|
52
|
-
///
|
53
|
-
/// @param {String} $organisation - Organisation name, lowercase, hyphenated
|
54
|
-
/// @param {Boolean} $websafe [true] - By default a 'websafe' version of the
|
55
|
-
/// colour will be returned which meets contrast requirements . If you want to
|
56
|
-
/// use the non-websafe version you can set this to `false` but your should
|
57
|
-
/// ensure that you still meets contrast requirements for accessibility - for
|
58
|
-
/// example, do not use the non-websafe version for text.
|
59
|
-
///
|
60
|
-
/// @return {Colour} Representation of colour for organisation
|
61
|
-
/// @throw if `$organisation` is not a known organisation
|
62
|
-
/// @access public
|
63
|
-
|
64
|
-
@function govuk-organisation-colour($organisation, $websafe: true) {
|
65
|
-
@if not map-has-key($govuk-colours-organisations, $organisation) {
|
66
|
-
@error "Unknown organisation `#{$organisation}`";
|
67
|
-
}
|
68
|
-
|
69
|
-
$org-colour: map-get($govuk-colours-organisations, $organisation);
|
70
|
-
|
71
|
-
@if $websafe and map-has-key($org-colour, colour-websafe) {
|
72
|
-
@return map-get($org-colour, colour-websafe);
|
73
|
-
} @else {
|
74
|
-
@return map-get($org-colour, colour);
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
/// Make a colour darker by mixing it with black
|
79
|
-
///
|
80
|
-
/// @param {Colour} $colour - colour to shade
|
81
|
-
/// @param {Number} $percentage - percentage of black to mix with $colour
|
82
|
-
/// @return {Colour}
|
83
|
-
/// @access public
|
84
|
-
|
85
|
-
@function govuk-shade($colour, $percentage) {
|
86
|
-
@return mix(#000000, $colour, $percentage);
|
87
|
-
}
|
88
|
-
|
89
|
-
/// Make a colour lighter by mixing it with white
|
90
|
-
///
|
91
|
-
/// @param {Colour} $colour - colour to tint
|
92
|
-
/// @param {Number} $percentage - percentage of white to mix with $colour
|
93
|
-
/// @return {Colour}
|
94
|
-
/// @access public
|
95
|
-
|
96
|
-
@function govuk-tint($colour, $percentage) {
|
97
|
-
@return mix(govuk-colour("white"), $colour, $percentage);
|
98
|
-
}
|
@@ -1,41 +0,0 @@
|
|
1
|
-
////
|
2
|
-
/// @group helpers
|
3
|
-
////
|
4
|
-
|
5
|
-
@import "../tools/exports";
|
6
|
-
|
7
|
-
/// Font Face - GDS Transport
|
8
|
-
///
|
9
|
-
/// Outputs the font-face declaration for GDS Transport at the root of the CSS document
|
10
|
-
/// the first time it is called.
|
11
|
-
///
|
12
|
-
/// @access private
|
13
|
-
|
14
|
-
@mixin _govuk-font-face-gds-transport {
|
15
|
-
@include _govuk-not-ie8 { // In IE8, which cannot render WOFF format, we fall back to system fonts
|
16
|
-
@include govuk-exports("govuk/helpers/font-faces") {
|
17
|
-
@at-root {
|
18
|
-
/*! 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. */ /* stylelint-disable-line scss/comment-no-loud */
|
19
|
-
@font-face {
|
20
|
-
font-family: "GDS Transport";
|
21
|
-
font-style: normal;
|
22
|
-
font-weight: normal;
|
23
|
-
src:
|
24
|
-
govuk-font-url("light-94a07e06a1-v2.woff2") format("woff2"),
|
25
|
-
govuk-font-url("light-f591b13f7d-v2.woff") format("woff");
|
26
|
-
font-display: fallback;
|
27
|
-
}
|
28
|
-
|
29
|
-
@font-face {
|
30
|
-
font-family: "GDS Transport";
|
31
|
-
font-style: normal;
|
32
|
-
font-weight: bold;
|
33
|
-
src:
|
34
|
-
govuk-font-url("bold-b542beb274-v2.woff2") format("woff2"),
|
35
|
-
govuk-font-url("bold-affa96571d-v2.woff") format("woff");
|
36
|
-
font-display: fallback;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
@@ -1,214 +0,0 @@
|
|
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 point from the responsive 'font map' as an argument (the size as it
|
90
|
-
/// would appear on tablet and above), and uses it to create font-size and
|
91
|
-
/// line-height declarations for different breakpoints, and print.
|
92
|
-
///
|
93
|
-
/// Example font map:
|
94
|
-
///
|
95
|
-
/// 19: (
|
96
|
-
/// null: (
|
97
|
-
/// font-size: 16px,
|
98
|
-
/// line-height: 20px
|
99
|
-
/// ),
|
100
|
-
/// tablet: (
|
101
|
-
/// font-size: 19px,
|
102
|
-
/// line-height: 25px
|
103
|
-
/// ),
|
104
|
-
/// print: (
|
105
|
-
/// font-size: 14pt,
|
106
|
-
/// line-height: 1.15
|
107
|
-
/// )
|
108
|
-
/// );
|
109
|
-
///
|
110
|
-
/// @param {Number} $size - Point from the spacing scale (the size as it would
|
111
|
-
/// appear on tablet and above)
|
112
|
-
/// @param {Number} $override-line-height [false] - Non responsive custom line
|
113
|
-
/// height. Omit to use the line height from the font map.
|
114
|
-
/// @param {Boolean} $important [false] - Whether to mark declarations as
|
115
|
-
/// `!important`.
|
116
|
-
///
|
117
|
-
/// @throw if `$size` is not a valid point from the spacing scale
|
118
|
-
///
|
119
|
-
/// @access public
|
120
|
-
|
121
|
-
@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {
|
122
|
-
|
123
|
-
@if not map-has-key($govuk-typography-scale, $size) {
|
124
|
-
@error "Unknown font size `#{$size}` - expected a point from the typography scale.";
|
125
|
-
}
|
126
|
-
|
127
|
-
$font-map: map-get($govuk-typography-scale, $size);
|
128
|
-
|
129
|
-
@each $breakpoint, $breakpoint-map in $font-map {
|
130
|
-
$font-size: map-get($breakpoint-map, "font-size");
|
131
|
-
$font-size-rem: govuk-px-to-rem($font-size);
|
132
|
-
|
133
|
-
$line-height: _govuk-line-height(
|
134
|
-
$line-height: if(
|
135
|
-
$override-line-height,
|
136
|
-
$override-line-height,
|
137
|
-
map-get($breakpoint-map, "line-height")
|
138
|
-
),
|
139
|
-
$font-size: $font-size
|
140
|
-
);
|
141
|
-
|
142
|
-
// Mark rules as !important if $important is true - this will result in
|
143
|
-
// these variables becoming strings, so this needs to happen *after* they
|
144
|
-
// are used in calculations
|
145
|
-
$font-size: $font-size if($important, !important, null);
|
146
|
-
$font-size-rem: $font-size-rem if($important, !important, null);
|
147
|
-
$line-height: $line-height if($important, !important, null);
|
148
|
-
|
149
|
-
@if not $breakpoint {
|
150
|
-
font-size: $font-size;
|
151
|
-
@if $govuk-typography-use-rem {
|
152
|
-
font-size: $font-size-rem;
|
153
|
-
}
|
154
|
-
line-height: $line-height;
|
155
|
-
} @else if $breakpoint == "print" {
|
156
|
-
@include govuk-media-query($media-type: print) {
|
157
|
-
font-size: $font-size;
|
158
|
-
line-height: $line-height;
|
159
|
-
}
|
160
|
-
} @else {
|
161
|
-
@include govuk-media-query($from: $breakpoint) {
|
162
|
-
font-size: $font-size;
|
163
|
-
@if $govuk-typography-use-rem {
|
164
|
-
font-size: $font-size-rem;
|
165
|
-
}
|
166
|
-
line-height: $line-height;
|
167
|
-
}
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
/// Font helper
|
173
|
-
///
|
174
|
-
/// @param {Number | Boolean} $size Point from the spacing scale (the size as it
|
175
|
-
/// would appear on tablet and above). Use `false` to avoid setting a size.
|
176
|
-
/// @param {String} $weight [regular] - Weight: `bold` or `regular`
|
177
|
-
/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not
|
178
|
-
/// @param {Number} $line-height [false] - Line-height, if overriding the
|
179
|
-
/// default
|
180
|
-
///
|
181
|
-
/// @throw if `$size` is not a valid point from the spacing scale (or false)
|
182
|
-
///
|
183
|
-
/// @access public
|
184
|
-
|
185
|
-
@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {
|
186
|
-
@if $tabular {
|
187
|
-
// if govuk-font-family-tabular is set use $govuk-font-family-tabular
|
188
|
-
@if $govuk-font-family-tabular {
|
189
|
-
@include govuk-typography-common($font-family: $govuk-font-family-tabular);
|
190
|
-
} @else {
|
191
|
-
@include govuk-typography-common;
|
192
|
-
-webkit-font-feature-settings: "tnum" 1;
|
193
|
-
font-feature-settings: "tnum" 1;
|
194
|
-
|
195
|
-
@supports (font-variant-numeric: tabular-nums) {
|
196
|
-
-webkit-font-feature-settings: normal;
|
197
|
-
font-feature-settings: normal;
|
198
|
-
font-variant-numeric: tabular-nums;
|
199
|
-
}
|
200
|
-
}
|
201
|
-
} @else {
|
202
|
-
@include govuk-typography-common;
|
203
|
-
}
|
204
|
-
|
205
|
-
@if $weight == regular {
|
206
|
-
@include govuk-typography-weight-regular;
|
207
|
-
} @else if $weight == bold {
|
208
|
-
@include govuk-typography-weight-bold;
|
209
|
-
}
|
210
|
-
|
211
|
-
@if $size {
|
212
|
-
@include govuk-typography-responsive($size, $override-line-height: $line-height);
|
213
|
-
}
|
214
|
-
}
|