defra_ruby_template 5.4.1 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/layouts/defra_ruby_template.html.erb +39 -18
- data/lib/defra_ruby_template/version.rb +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +882 -492
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +877 -492
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.mjs +5 -0
- data/node_modules/govuk-frontend/dist/govuk/all.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/all.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/favicon.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-crest.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-180.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-192.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-512.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-icon-mask.svg +1 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/rebrand/manifest.json +39 -0
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +169 -0
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +20 -83
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs +60 -0
- data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +35 -31
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +296 -195
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +295 -194
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +88 -110
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/fixtures.json +16 -3
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/fixtures.json +25 -15
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template-with-custom-link.html +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/template.njk +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/fixtures.json +53 -15
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/macro-options.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-inverse.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-collapse-on-mobile.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-last-breadcrumb-as-current-page.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-multiple-levels.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-with-one-level.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template-without-the-home-section.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/template.njk +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +217 -106
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +216 -105
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +9 -22
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/fixtures.json +38 -0
- data/node_modules/govuk-frontend/dist/govuk/components/button/macro-options.json +2 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +12 -4
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +256 -145
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +255 -144
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +29 -34
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +80 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +6 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-error.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-hint-and-error.html +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +5 -4
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +6 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +96 -50
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +95 -49
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs +9 -18
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +88 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +23 -14
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/fixtures.json +23 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/fixtures.json +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/macro-options.json +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +7 -2
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/fixtures.json +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +238 -127
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +237 -126
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +10 -22
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/fixtures.json +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +218 -107
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +217 -106
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +10 -22
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/fixtures.json +4 -0
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -5
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/fixtures.json +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +175 -9
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +744 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +736 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +257 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +220 -16
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/macro-options.json +52 -3
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-direct-media-capture.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-image-files-only.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-allows-multiple-files.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-disabled.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-disabled.html +13 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-with-error-message-and-hint.html +16 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-translated.html +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template.njk +42 -5
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +61 -19
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/fixtures.json +34 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/macro-options.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/template.njk +10 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +223 -21
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/fixtures.json +78 -32
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +90 -43
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +89 -42
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +10 -18
- data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/macro-options.json +31 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-default.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width-with-navigation.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-full-width.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-html.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-navigation-item-with-text-without-link.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-label.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-menu-button-text.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-custom-navigation-label.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-full-width-border.html +30 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-large-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-product-name.html +21 -15
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-and-navigation.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name-but-no-service-url.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-service-name.html +20 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template-with-st-edwards-crown.html +10 -12
- data/node_modules/govuk-frontend/dist/govuk/components/header/template.njk +11 -41
- data/node_modules/govuk-frontend/dist/govuk/components/hint/fixtures.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -4
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/fixtures.json +97 -27
- data/node_modules/govuk-frontend/dist/govuk/components/input/macro-options.json +6 -6
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-default.html +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-disabled.html +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-and-hint.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/template-with-error-message.html +2 -5
- data/node_modules/govuk-frontend/dist/govuk/components/input/template.njk +5 -4
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/fixtures.json +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/label/fixtures.json +17 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/fixtures.json +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +238 -127
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +237 -126
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +10 -22
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +24 -37
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/macro-options.json +4 -4
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +13 -9
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +12 -9
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/fixtures.json +27 -2
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/macro-options.json +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +220 -110
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +219 -109
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +12 -25
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template-default.html +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/template.njk +4 -2
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +0 -8
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/fixtures.json +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +7 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +51 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +96 -50
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +95 -49
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs +9 -18
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +5 -5
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/fixtures.json +43 -9
- data/node_modules/govuk-frontend/dist/govuk/components/select/macro-options.json +2 -2
- data/node_modules/govuk-frontend/dist/govuk/components/select/template-id.html +7 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/template.njk +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +187 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -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.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +515 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +138 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +229 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +221 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-default.html +57 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-html-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-large-navigation.html +153 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-long-service-name.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-a-current-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-navigation-with-an-active-item.html +58 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-non-link-navigation-items.html +49 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-link.html +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name-and-navigation.html +63 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-service-name.html +18 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +103 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/fixtures.json +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +95 -48
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +94 -47
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +15 -23
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +14 -22
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/fixtures.json +174 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/template-as-a-summary-card-extreme.html +106 -0
- data/node_modules/govuk-frontend/dist/govuk/components/table/fixtures.json +22 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/fixtures.json +15 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +95 -53
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +94 -52
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +15 -28
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +11 -8
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/fixtures.json +14 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +12 -10
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +44 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-with-empty-values.html +27 -0
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/template.njk +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/fixtures.json +32 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/macro-options.json +3 -3
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/template.njk +6 -4
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +6 -5
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/fixtures.json +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +16 -3
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +55 -8
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +14 -4
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +18 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +30 -62
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +90 -24
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/macros/logo.njk +78 -0
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss +39 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-applied.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +244 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +5 -10
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/template.njk +20 -9
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss +65 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_rebrand.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/functions.js +25 -0
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss.map +1 -1
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +8 -1
- data/node_modules/govuk-frontend/package.json +16 -16
- data/spec/spec_helper.rb +98 -0
- data/spec/tasks/assets_spec.rb +53 -0
- data/vendor/assets/assets/fonts/bold-affa96571d-v2.woff +0 -0
- data/vendor/assets/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
- data/vendor/assets/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
- data/vendor/assets/assets/fonts/light-f591b13f7d-v2.woff +0 -0
- data/vendor/assets/assets/images/favicon.ico +0 -0
- data/vendor/assets/assets/images/favicon.svg +1 -0
- data/vendor/assets/assets/images/govuk-crest.svg +1 -0
- data/vendor/assets/assets/images/govuk-icon-180.png +0 -0
- data/vendor/assets/assets/images/govuk-icon-192.png +0 -0
- data/vendor/assets/assets/images/govuk-icon-512.png +0 -0
- data/vendor/assets/assets/images/govuk-icon-mask.svg +1 -0
- data/vendor/assets/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/manifest.json +39 -0
- data/vendor/assets/assets/rebrand/images/favicon.ico +0 -0
- data/vendor/assets/assets/rebrand/images/favicon.svg +1 -0
- data/vendor/assets/assets/rebrand/images/govuk-crest.svg +1 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-180.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-192.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-512.png +0 -0
- data/vendor/assets/assets/rebrand/images/govuk-icon-mask.svg +1 -0
- data/vendor/assets/assets/rebrand/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/assets/rebrand/manifest.json +39 -0
- data/vendor/assets/images/govuk-crest.svg +1 -0
- data/vendor/assets/javascripts/defra_ruby_template.js +882 -492
- data/vendor/assets/stylesheets/all.scss +6 -0
- data/vendor/assets/stylesheets/components/_index.scss +1 -0
- data/vendor/assets/stylesheets/components/accordion/_index.scss +35 -31
- data/vendor/assets/stylesheets/components/character-count/_index.scss +12 -4
- data/vendor/assets/stylesheets/components/checkboxes/_index.scss +6 -1
- data/vendor/assets/stylesheets/components/cookie-banner/_index.scss +23 -14
- data/vendor/assets/stylesheets/components/date-input/_index.scss +2 -2
- data/vendor/assets/stylesheets/components/details/_index.scss +7 -2
- data/vendor/assets/stylesheets/components/error-summary/_index.scss +4 -0
- data/vendor/assets/stylesheets/components/fieldset/_index.scss +3 -5
- data/vendor/assets/stylesheets/components/file-upload/_index.scss +175 -9
- data/vendor/assets/stylesheets/components/footer/_index.scss +61 -19
- data/vendor/assets/stylesheets/components/header/_index.scss +223 -21
- data/vendor/assets/stylesheets/components/input/_index.scss +7 -4
- data/vendor/assets/stylesheets/components/notification-banner/_index.scss +3 -2
- data/vendor/assets/stylesheets/components/pagination/_index.scss +24 -37
- data/vendor/assets/stylesheets/components/panel/_index.scss +13 -9
- data/vendor/assets/stylesheets/components/password-input/_index.scss +12 -9
- data/vendor/assets/stylesheets/components/phase-banner/_index.scss +0 -8
- data/vendor/assets/stylesheets/components/radios/_index.scss +7 -5
- data/vendor/assets/stylesheets/components/select/_index.scss +5 -5
- data/vendor/assets/stylesheets/components/service-navigation/_index.scss +187 -0
- data/vendor/assets/stylesheets/components/service-navigation/_service-navigation.scss +4 -0
- data/vendor/assets/stylesheets/components/skip-link/_index.scss +6 -4
- data/vendor/assets/stylesheets/components/summary-list/_index.scss +14 -22
- data/vendor/assets/stylesheets/components/tag/_index.scss +11 -8
- data/vendor/assets/stylesheets/components/task-list/_index.scss +12 -10
- data/vendor/assets/stylesheets/components/textarea/_index.scss +3 -3
- data/vendor/assets/stylesheets/components/warning-text/_index.scss +6 -5
- data/vendor/assets/stylesheets/core/_govuk-frontend-properties.scss +1 -1
- data/vendor/assets/stylesheets/defra_ruby_template.scss +6 -0
- data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
- data/vendor/assets/stylesheets/helpers/_colour.scss +55 -8
- data/vendor/assets/stylesheets/helpers/_focused.scss +14 -4
- data/vendor/assets/stylesheets/helpers/_grid.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_links.scss +2 -2
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
- data/vendor/assets/stylesheets/helpers/_typography.scss +18 -1
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +30 -62
- data/vendor/assets/stylesheets/objects/_template.scss +5 -1
- data/vendor/assets/stylesheets/overrides/_typography.scss +5 -1
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +39 -1
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +244 -10
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +5 -10
- data/vendor/assets/stylesheets/tools/_index.scss +1 -0
- data/vendor/assets/stylesheets/tools/_rebrand.scss +65 -0
- metadata +100 -24
- data/.github/dependabot.yml +0 -14
- data/.github/workflows/ci.yml +0 -31
- data/.gitignore +0 -8
- data/.rspec +0 -1
- data/.rubocop.yml +0 -3
- data/.ruby-version +0 -1
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -58
- data/defra_ruby_template.gemspec +0 -35
- data/node_modules/.package-lock.json +0 -16
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +0 -18
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +0 -31
- data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs.map +0 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-with-value.html +0 -6
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +0 -16
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs.map +0 -1
- data/package-lock.json +0 -24
- data/package.json +0 -29
@@ -42,25 +42,72 @@
|
|
42
42
|
/// Get the colour for a government organisation
|
43
43
|
///
|
44
44
|
/// @param {String} $organisation - Organisation name, lowercase, hyphenated
|
45
|
-
/// @param {Boolean} $websafe
|
46
|
-
///
|
47
|
-
///
|
48
|
-
///
|
49
|
-
///
|
45
|
+
/// @param {Boolean} $websafe - Deprecated. Use $contrast-safe instead.
|
46
|
+
/// @param {Boolean} $contrast-safe [true] - By default a version of the colour
|
47
|
+
/// will be returned which has a minimum 4.5:1 contrast ratio when used with
|
48
|
+
/// white, as per the WCAG 2.1 Level AA guidelines. If you want to use the
|
49
|
+
/// non-contrast safe version you can set this to `false` but your should
|
50
|
+
/// ensure that you still meets contrast requirements for accessibility -
|
51
|
+
/// for example, do not use the non-contrast safe version for text.
|
50
52
|
///
|
51
53
|
/// @return {Colour} Representation of colour for organisation
|
52
54
|
/// @throw if `$organisation` is not a known organisation
|
53
55
|
/// @access public
|
54
56
|
|
55
|
-
@function govuk-organisation-colour($organisation, $websafe: true) {
|
57
|
+
@function govuk-organisation-colour($organisation, $websafe: null, $contrast-safe: true) {
|
58
|
+
// Check if the $organisation exists in the aliases map. If so, change the
|
59
|
+
// value of $organisation to the aliased value.
|
60
|
+
@if map-has-key($_govuk_colours-organisations-aliases, $organisation) {
|
61
|
+
$organisation: map-get($_govuk_colours-organisations-aliases, $organisation);
|
62
|
+
}
|
63
|
+
|
64
|
+
// Check to see if the organisation exists
|
56
65
|
@if not map-has-key($govuk-colours-organisations, $organisation) {
|
57
66
|
@error "Unknown organisation `#{$organisation}`";
|
58
67
|
}
|
59
68
|
|
69
|
+
// Output a deprecation warning if the legacy colour palette is being used.
|
70
|
+
// Remove in next major version.
|
71
|
+
$is-legacy: $govuk-colours-organisations == $_govuk-legacy-organisation-colours;
|
72
|
+
@if $is-legacy and _should-warn("legacy-organisation-colours") {
|
73
|
+
@warn _warning-text("legacy-organisation-colours",
|
74
|
+
"We've updated the organisation colour palette. Opt in to the new " +
|
75
|
+
"colours using `$govuk-new-organisation-colours: true`. The old " +
|
76
|
+
"palette is deprecated and we'll remove it in the next major version."
|
77
|
+
);
|
78
|
+
}
|
79
|
+
|
80
|
+
// Output a warning if $websafe is set.
|
81
|
+
@if $websafe and _should-warn("organisation-colour-websafe-param") {
|
82
|
+
@warn _warning-text("organisation-colour-websafe-param",
|
83
|
+
"The `$websafe` parameter of `govuk-organisation-colour` has been " +
|
84
|
+
"renamed to `$contrast-safe`. The old parameter name will be removed in " +
|
85
|
+
"the next major version."
|
86
|
+
);
|
87
|
+
}
|
88
|
+
|
60
89
|
$org-colour: map-get($govuk-colours-organisations, $organisation);
|
61
90
|
|
62
|
-
@if
|
63
|
-
@
|
91
|
+
@if map-has-key($org-colour, deprecation-message) and _should-warn("organisation-colours") {
|
92
|
+
@warn _warning-text(
|
93
|
+
"organisation-colours",
|
94
|
+
map-get($org-colour, deprecation-message)
|
95
|
+
);
|
96
|
+
}
|
97
|
+
|
98
|
+
// If the $websafe parameter is being used (it has been explicitly set as true
|
99
|
+
// or false), assume the user hasn't updated to use $contrast-safe yet and map
|
100
|
+
// the old parameter's value onto the new parameter.
|
101
|
+
@if type-of($websafe) != "null" {
|
102
|
+
$contrast-safe: $websafe;
|
103
|
+
}
|
104
|
+
|
105
|
+
// Determine the contrast-safe key to use depending on whether it's the new
|
106
|
+
// palette or the legacy palette
|
107
|
+
$safe-key: if($govuk-new-organisation-colours, "contrast-safe", "colour-websafe");
|
108
|
+
|
109
|
+
@if $contrast-safe and map-has-key($org-colour, $safe-key) {
|
110
|
+
@return map-get($org-colour, $safe-key);
|
64
111
|
} @else {
|
65
112
|
@return map-get($org-colour, colour);
|
66
113
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_colour.scss"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,2CAA2C;AAC3C,8BAA8B;;AAE9B,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,aAAa;AACb,EAAE;AACF,4EAA4E;AAC5E,uBAAuB;AACvB,mEAAmE;AACnE,yEAAyE;AACzE,6EAA6E;AAC7E,4BAA4B;AAC5B,kDAAkD;AAClD,EAAE;AACF,8DAA8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E;EAC1E,+BAA+B;EAC/B,iFAAiF;;EAEjF;IACE,uCAAuC;EACzC,EAAE;IACA,oCAAoC;EACtC;AACF;;AAEA,+CAA+C;AAC/C,EAAE;AACF,4CAA4C;AAC5C,wEAAwE;AACxE,mBAAmB;AACnB,iBAAiB;;AAEjB;EACE,0CAA0C;AAC5C;;AAEA,gDAAgD;AAChD,EAAE;AACF,2CAA2C;AAC3C,wEAAwE;AACxE,mBAAmB;AACnB,iBAAiB;;AAEjB;EACE,wDAAwD;AAC1D","file":"_colour.scss","sourcesContent":["@import \"../settings/colours-palette\";\n@import \"../settings/colours-organisations\";\n@import \"../settings/warnings\";\n\n////\n/// @group helpers/colour\n////\n\n/// Get colour\n///\n/// @param {String | Colour} $colour - Name of colour from the colour palette\n/// (`$govuk-colours`)\n/// @param {String | Colour | Boolean} $legacy [false] - Deprecated.\n/// The `$legacy` parameter is deprecated and is non-operational, as the\n/// legacy colour palette has been removed. The parameter will be removed in\n/// the next major version.\n/// @return {Colour} Representation of named colour\n///\n/// @throw if `$colour` is not a colour from the colour palette\n/// @access public\n\n@function govuk-colour($colour, $legacy: false) {\n // Output a warning if $legacy is set to anything.\n @if $legacy and _should-warn(\"legacy-colour-param\") {\n @warn _warning-text(\"legacy-colour-param\", \"The `$legacy` parameter of \" +\n \"`govuk-colour` is deprecated and is non-operational. It will be \" +\n \"removed in the next major version.\");\n }\n\n @if type-of($colour) == \"color\" {\n // stylelint-disable-next-line scss/function-quote-no-quoted-strings-inside\n $colour: quote(\"#{$colour}\");\n }\n\n @if not map-has-key($govuk-colours, $colour) {\n @error \"Unknown colour `#{$colour}`\";\n }\n\n @return map-get($govuk-colours, $colour);\n}\n\n/// Get the colour for a government organisation\n///\n/// @param {String} $organisation - Organisation name, lowercase, hyphenated\n/// @param {Boolean} $websafe - Deprecated. Use $contrast-safe instead.\n/// @param {Boolean} $contrast-safe [true] - By default a version of the colour\n/// will be returned which has a minimum 4.5:1 contrast ratio when used with\n/// white, as per the WCAG 2.1 Level AA guidelines. If you want to use the\n/// non-contrast safe version you can set this to `false` but your should\n/// ensure that you still meets contrast requirements for accessibility -\n/// for example, do not use the non-contrast safe version for text.\n///\n/// @return {Colour} Representation of colour for organisation\n/// @throw if `$organisation` is not a known organisation\n/// @access public\n\n@function govuk-organisation-colour($organisation, $websafe: null, $contrast-safe: true) {\n // Check if the $organisation exists in the aliases map. If so, change the\n // value of $organisation to the aliased value.\n @if map-has-key($_govuk_colours-organisations-aliases, $organisation) {\n $organisation: map-get($_govuk_colours-organisations-aliases, $organisation);\n }\n\n // Check to see if the organisation exists\n @if not map-has-key($govuk-colours-organisations, $organisation) {\n @error \"Unknown organisation `#{$organisation}`\";\n }\n\n // Output a deprecation warning if the legacy colour palette is being used.\n // Remove in next major version.\n $is-legacy: $govuk-colours-organisations == $_govuk-legacy-organisation-colours;\n @if $is-legacy and _should-warn(\"legacy-organisation-colours\") {\n @warn _warning-text(\"legacy-organisation-colours\",\n \"We've updated the organisation colour palette. Opt in to the new \" +\n \"colours using `$govuk-new-organisation-colours: true`. The old \" +\n \"palette is deprecated and we'll remove it in the next major version.\"\n );\n }\n\n // Output a warning if $websafe is set.\n @if $websafe and _should-warn(\"organisation-colour-websafe-param\") {\n @warn _warning-text(\"organisation-colour-websafe-param\",\n \"The `$websafe` parameter of `govuk-organisation-colour` has been \" +\n \"renamed to `$contrast-safe`. The old parameter name will be removed in \" +\n \"the next major version.\"\n );\n }\n\n $org-colour: map-get($govuk-colours-organisations, $organisation);\n\n @if map-has-key($org-colour, deprecation-message) and _should-warn(\"organisation-colours\") {\n @warn _warning-text(\n \"organisation-colours\",\n map-get($org-colour, deprecation-message)\n );\n }\n\n // If the $websafe parameter is being used (it has been explicitly set as true\n // or false), assume the user hasn't updated to use $contrast-safe yet and map\n // the old parameter's value onto the new parameter.\n @if type-of($websafe) != \"null\" {\n $contrast-safe: $websafe;\n }\n\n // Determine the contrast-safe key to use depending on whether it's the new\n // palette or the legacy palette\n $safe-key: if($govuk-new-organisation-colours, \"contrast-safe\", \"colour-websafe\");\n\n @if $contrast-safe and map-has-key($org-colour, $safe-key) {\n @return map-get($org-colour, $safe-key);\n } @else {\n @return map-get($org-colour, colour);\n }\n}\n\n/// Make a colour darker by mixing it with black\n///\n/// @param {Colour} $colour - colour to shade\n/// @param {Number} $percentage - percentage of black to mix with $colour\n/// @return {Colour}\n/// @access public\n\n@function govuk-shade($colour, $percentage) {\n @return mix(#000000, $colour, $percentage);\n}\n\n/// Make a colour lighter by mixing it with white\n///\n/// @param {Colour} $colour - colour to tint\n/// @param {Number} $percentage - percentage of white to mix with $colour\n/// @return {Colour}\n/// @access public\n\n@function govuk-tint($colour, $percentage) {\n @return mix(govuk-colour(\"white\"), $colour, $percentage);\n}\n"]}
|
@@ -24,10 +24,20 @@
|
|
24
24
|
// box shadow adds the "underline"
|
25
25
|
text-decoration: none;
|
26
26
|
|
27
|
-
//
|
28
|
-
//
|
29
|
-
|
30
|
-
|
27
|
+
// Fixes an issue in Chromium 108–111 where the box-shadow on the focus state
|
28
|
+
// is missing on links that wrap across multiple lines [1].
|
29
|
+
//
|
30
|
+
// However, text-wrap: balance doesn't play nicely with box-decoration-break:
|
31
|
+
// clone, causing links to re-flow when focused [2]. As text-wrap: balance
|
32
|
+
// wasn't introduced until Chromium 114 we can use it as a way to target
|
33
|
+
// this fix to just 108–111.
|
34
|
+
//
|
35
|
+
// [1]: http://crbug.com/40884971
|
36
|
+
// [2]: https://github.com/alphagov/govuk-frontend/issues/5878
|
37
|
+
@supports not (text-wrap: balance) {
|
38
|
+
-webkit-box-decoration-break: clone;
|
39
|
+
box-decoration-break: clone;
|
40
|
+
}
|
31
41
|
}
|
32
42
|
|
33
43
|
/// Focused box
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_focused.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,eAAe;AACf,EAAE;AACF,8EAA8E;AAC9E,4CAA4C;AAC5C,EAAE;AACF,iBAAiB;;AAEjB;EACE,uEAAuE;EACvE,uEAAuE;EACvE,4DAA4D;;EAE5D,6CAA6C;EAC7C,+BAA+B;EAC/B,qCAAqC;EACrC;;kCAEgC;EAChC,6DAA6D;EAC7D,iCAAiC;EACjC,qBAAqB;;EAErB,
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_focused.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,eAAe;AACf,EAAE;AACF,8EAA8E;AAC9E,4CAA4C;AAC5C,EAAE;AACF,iBAAiB;;AAEjB;EACE,uEAAuE;EACvE,uEAAuE;EACvE,4DAA4D;;EAE5D,6CAA6C;EAC7C,+BAA+B;EAC/B,qCAAqC;EACrC;;kCAEgC;EAChC,6DAA6D;EAC7D,iCAAiC;EACjC,qBAAqB;;EAErB,4EAA4E;EAC5E,0DAA0D;EAC1D,CAAC;EACD,4EAA4E;EAC5E,yEAAyE;EACzE,uEAAuE;EACvE,2BAA2B;EAC3B,CAAC;EACD,gCAAgC;EAChC,6DAA6D;EAC7D;IACE,mCAA2B;YAA3B,2BAA2B;EAC7B;AACF;;AAEA,cAAc;AACd,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,sEAAsE;AACtE,yDAAyD;AACzD,EAAE;AACF,iBAAiB;;AAEjB;EACE,6CAA6C;EAC7C;;sCAEoC;AACtC","file":"_focused.scss","sourcesContent":["////\n/// @group helpers/accessibility\n////\n\n/// Focused text\n///\n/// Provides an outline to clearly indicate when the target element is focused.\n/// Used for interactive text-based elements.\n///\n/// @access public\n\n@mixin govuk-focused-text {\n // When colours are overridden, for example when users have a dark mode,\n // backgrounds and box-shadows disappear, so we need to ensure there's a\n // transparent outline which will be set to a visible colour.\n\n outline: $govuk-focus-width solid transparent;\n color: $govuk-focus-text-colour;\n background-color: $govuk-focus-colour;\n box-shadow:\n 0 -2px $govuk-focus-colour,\n 0 4px $govuk-focus-text-colour;\n // When link is focussed, hide the default underline since the\n // box shadow adds the \"underline\"\n text-decoration: none;\n\n // Fixes an issue in Chromium 108–111 where the box-shadow on the focus state\n // is missing on links that wrap across multiple lines [1].\n //\n // However, text-wrap: balance doesn't play nicely with box-decoration-break:\n // clone, causing links to re-flow when focused [2]. As text-wrap: balance\n // wasn't introduced until Chromium 114 we can use it as a way to target\n // this fix to just 108–111.\n //\n // [1]: http://crbug.com/40884971\n // [2]: https://github.com/alphagov/govuk-frontend/issues/5878\n @supports not (text-wrap: balance) {\n box-decoration-break: clone;\n }\n}\n\n/// Focused box\n///\n/// Provides an outline to clearly indicate when the target element is focused.\n/// Unlike govuk-focused-text, which only draws an underline below the element,\n/// govuk-focused-box draws an outline around all sides of the element.\n/// Best used for non-text content contained within links.\n///\n/// @access public\n\n@mixin govuk-focused-box {\n outline: $govuk-focus-width solid transparent;\n box-shadow:\n 0 0 0 4px $govuk-focus-colour,\n 0 0 0 8px $govuk-focus-text-colour;\n}\n"]}
|
@@ -37,7 +37,7 @@
|
|
37
37
|
/// }
|
38
38
|
///
|
39
39
|
/// @example scss - Customising the breakpoint where width percentage is applied
|
40
|
-
/// .govuk-grid-column-one-half-
|
40
|
+
/// .govuk-grid-column-one-half-from-desktop {
|
41
41
|
/// @include govuk-grid-column(one-half, $at: desktop);
|
42
42
|
/// }
|
43
43
|
///
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_grid.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,wBAAwB;AACxB,EAAE;AACF,8DAA8D;AAC9D,oCAAoC;AACpC,6CAA6C;AAC7C,iBAAiB;;AAEjB;EACE;IACE,yCAAyC;EAC3C;;EAEA,qCAAqC;AACvC;;AAEA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,EAAE;AACF,2DAA2D;AAC3D,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,aAAa;AACb,EAAE;AACF,6EAA6E;AAC7E,6CAA6C;AAC7C,mFAAmF;AACnF,EAAE;AACF,0BAA0B;AAC1B,oCAAoC;AACpC,6CAA6C;AAC7C,MAAM;AACN,EAAE;AACF,+EAA+E;AAC/E
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_grid.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,wBAAwB;AACxB,EAAE;AACF,8DAA8D;AAC9D,oCAAoC;AACpC,6CAA6C;AAC7C,iBAAiB;;AAEjB;EACE;IACE,yCAAyC;EAC3C;;EAEA,qCAAqC;AACvC;;AAEA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,EAAE;AACF,2DAA2D;AAC3D,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,aAAa;AACb,EAAE;AACF,6EAA6E;AAC7E,6CAA6C;AAC7C,mFAAmF;AACnF,EAAE;AACF,0BAA0B;AAC1B,oCAAoC;AACpC,6CAA6C;AAC7C,MAAM;AACN,EAAE;AACF,+EAA+E;AAC/E,+CAA+C;AAC/C,0DAA0D;AAC1D,MAAM;AACN,EAAE;AACF,kDAAkD;AAClD,wCAAwC;AACxC,6DAA6D;AAC7D,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE,sBAAsB;EACtB;IACE,WAAW;EACb;EACA,6BAA6B;EAC7B;IACE,+BAA+B;IAC/B,aAAa;EACf;AACF","file":"_grid.scss","sourcesContent":["////\n/// @group helpers/layout\n////\n\n/// Grid width percentage\n///\n/// @param {String} $key - Name of grid width (e.g. two-thirds)\n/// @return {Number} Percentage width\n/// @throw if `$key` is not a valid grid width\n/// @access public\n\n@function govuk-grid-width($key) {\n @if map-has-key($govuk-grid-widths, $key) {\n @return map-get($govuk-grid-widths, $key);\n }\n\n @error \"Unknown grid width `#{$key}`\";\n}\n\n/// Generate grid column styles\n///\n/// Creates a grid column with standard gutter between the columns.\n///\n/// Grid widths are defined in the `$govuk-grid-widths` map.\n///\n/// By default the column width changes from 100% to specified width at the\n/// 'tablet' breakpoint, but other breakpoints can be specified using the `$at`\n/// parameter.\n///\n/// @param {String} $width [full] name of a grid width from $govuk-grid-widths\n/// @param {String} $float [left] left | right\n/// @param {String} $at [tablet] - mobile | tablet | desktop | any custom breakpoint\n///\n/// @example scss - Default\n/// .govuk-grid-column-two-thirds {\n/// @include govuk-grid-column(two-thirds)\n/// }\n///\n/// @example scss - Customising the breakpoint where width percentage is applied\n/// .govuk-grid-column-one-half-from-desktop {\n/// @include govuk-grid-column(one-half, $at: desktop);\n/// }\n///\n/// @example scss - Customising the float direction\n/// .govuk-grid-column-one-half-right {\n/// @include govuk-grid-column(two-thirds, $float: right);\n/// }\n///\n/// @access public\n\n@mixin govuk-grid-column($width: full, $float: left, $at: tablet) {\n box-sizing: border-box;\n @if $at != desktop {\n width: 100%;\n }\n padding: 0 $govuk-gutter-half;\n @include govuk-media-query($from: $at) {\n width: govuk-grid-width($width);\n float: $float;\n }\n}\n"]}
|
@@ -229,7 +229,7 @@
|
|
229
229
|
}
|
230
230
|
|
231
231
|
// Force a colour change on hover to work around a bug in Safari
|
232
|
-
// https://
|
232
|
+
// https://webkit.org/b/224483
|
233
233
|
&:hover {
|
234
234
|
@if type-of($govuk-text-colour) == color {
|
235
235
|
color: rgba($govuk-text-colour, 0.99);
|
@@ -265,7 +265,7 @@
|
|
265
265
|
}
|
266
266
|
|
267
267
|
// Force a colour change on hover to work around a bug in Safari
|
268
|
-
// https://
|
268
|
+
// https://webkit.org/b/224483
|
269
269
|
&:hover,
|
270
270
|
&:active {
|
271
271
|
color: rgba(govuk-colour("white"), 0.99);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_links.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,uBAAuB;AACvB,GAAG;;AAEH,qBAAqB;AACrB,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;EAChC,8BAA8B;;EAE9B;IACE,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D,gDAAgD;EAChD;;IAEE,wCAAwC;EAC1C;;EAEA;IACE,+BAA+B;EACjC;AACF;;AAEA,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,0BAA0B;AAC1B,EAAE;AACF,0EAA0E;AAC1E,8DAA8D;AAC9D,6EAA6E;AAC7E,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,kDAAkD;AAClD,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,yBAAyB;EAC3B;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,+BAA+B;EACjC;;EAEA;IACE,gCAAgC;EAClC;;EAEA,yEAAyE;EACzE,8BAA8B;EAC9B;IACE,+BAA+B;EACjC;AACF;;AAEA,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,wBAAwB;AACxB,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,yCAAyC;AACzC,8CAA8C;AAC9C,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,qBAAqB;EACvB;AACF;;AAEA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE;;;;MAIE;QACE,4BAA4B;QAC5B,cAAc;;QAEd,mEAAmE;QACnE,gEAAgE;QAChE,oBAAoB;QACpB,qBAAqB;MACvB;IACF;EACF;AACF;;AAEA,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE,kDAAkD;EAClD,qBAAqB;;EAErB,2EAA2E;EAC3E,cAAc;;EAEd,2BAA2B;EAC3B,qBAAqB;;EAErB;IACE,0BAA0B;EAC5B;AACF","file":"_links.scss","sourcesContent":["////\n/// @group helpers/links\n////\n\n/// Common link styles\n///\n/// Provides the typography and focus state, regardless of link style.\n///\n/// @access public\n\n@mixin govuk-link-common {\n @include govuk-typography-common;\n @include govuk-link-decoration;\n\n &:hover {\n @include govuk-link-hover-decoration;\n }\n\n &:focus {\n @include govuk-focused-text;\n }\n}\n\n/// Link decoration\n///\n/// Provides the text decoration for links, including thickness and underline\n/// offset. Use this mixin only if you cannot use the `govuk-link-common` mixin.\n///\n/// @access public\n@mixin govuk-link-decoration {\n text-decoration: underline;\n\n @if $govuk-link-underline-thickness {\n text-decoration-thickness: $govuk-link-underline-thickness;\n }\n\n @if $govuk-link-underline-offset {\n text-underline-offset: $govuk-link-underline-offset;\n }\n}\n\n/// Link hover decoration\n///\n/// Provides the text decoration for links in their hover state, for you to use\n/// within a `:hover` pseudo-selector. Use this mixin only if you cannot use the\n/// `govuk-link-common` mixin.\n///\n/// @access public\n\n@mixin govuk-link-hover-decoration {\n @if $govuk-link-hover-underline-thickness {\n text-decoration-thickness: $govuk-link-hover-underline-thickness;\n // Disable ink skipping on underlines on hover. Browsers haven't\n // standardised on this part of the spec yet, so set both properties\n text-decoration-skip-ink: none; // Chromium, Firefox\n text-decoration-skip: none; // Safari\n }\n}\n\n/// Default link styles\n///\n/// Makes links use the default unvisited, visited, hover and active colours.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-default {\n &:link {\n color: $govuk-link-colour;\n }\n\n &:visited {\n color: $govuk-link-visited-colour;\n }\n\n &:hover {\n color: $govuk-link-hover-colour;\n }\n\n &:active {\n color: $govuk-link-active-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Error link styles\n///\n/// Makes links use the error colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-error;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-error {\n &:link,\n &:visited {\n color: $govuk-error-colour;\n }\n\n &:hover {\n color: scale-color($govuk-error-colour, $lightness: -30%);\n }\n\n &:active {\n color: $govuk-error-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Success link styles\n///\n/// Makes links use the success colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-success;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-success {\n &:link,\n &:visited {\n color: $govuk-success-colour;\n }\n\n &:hover {\n color: scale-color($govuk-success-colour, $lightness: -30%);\n }\n\n &:active {\n color: $govuk-success-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Muted link styles\n///\n/// Makes links use the secondary text colour. The link will darken if it's\n/// active or a user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-muted;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-muted {\n &:link,\n &:visited {\n color: $govuk-secondary-text-colour;\n }\n\n &:hover,\n &:active {\n color: $govuk-text-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Text link styles\n///\n/// Makes links use the primary text colour, in all states. Use this mixin for\n/// navigation components, such as breadcrumbs or the back link.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-text;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-text {\n &:link,\n &:visited {\n @include govuk-text-colour;\n }\n\n // Force a colour change on hover to work around a bug in Safari\n // https://bugs.webkit.org/show_bug.cgi?id=224483\n &:hover {\n @if type-of($govuk-text-colour) == color {\n color: rgba($govuk-text-colour, 0.99);\n }\n }\n\n &:active,\n &:focus {\n @include govuk-text-colour;\n }\n}\n\n/// Inverse link styles\n///\n/// Makes links white, in all states. Use this mixin if you're displaying links\n/// against a dark background.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-inverse;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-inverse {\n &:link,\n &:visited {\n color: govuk-colour(\"white\");\n }\n\n // Force a colour change on hover to work around a bug in Safari\n // https://bugs.webkit.org/show_bug.cgi?id=224483\n &:hover,\n &:active {\n color: rgba(govuk-colour(\"white\"), 0.99);\n }\n\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Default link styles, without a visited state\n///\n/// Makes links use the default unvisited, hover and active colours, with no\n/// distinct visited state.\n///\n/// Use this mixin when it's not helpful to distinguish between visited and\n/// non-visited links. For example, when you link to pages with\n/// frequently-changing content, such as the dashboard for an admin interface.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-no-visited-state;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-visited-state {\n &:link {\n color: $govuk-link-colour;\n }\n\n &:visited {\n color: $govuk-link-colour;\n }\n\n &:hover {\n color: $govuk-link-hover-colour;\n }\n\n &:active {\n color: $govuk-link-active-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Remove underline from links\n///\n/// Remove underlines from links unless the link is active or a user hovers\n/// their cursor over it.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// @include govuk-link-style-no-underline;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-underline {\n &:not(:hover):not(:active) {\n text-decoration: none;\n }\n}\n\n/// Include link destination when printing the page\n///\n/// If the user prints the page, add the destination URL after the link text, if\n/// the URL starts with `/`, `http://` or `https://`.\n///\n/// @access public\n\n@mixin govuk-link-print-friendly {\n @include govuk-media-query($media-type: print) {\n &[href^=\"/\"],\n &[href^=\"http://\"],\n &[href^=\"https://\"]\n {\n &::after {\n content: \" (\" attr(href) \")\";\n font-size: 90%;\n\n // Because the URLs may be very long, ensure that they may be broken\n // at arbitrary points if there are no otherwise acceptable break\n // points in the line\n word-wrap: break-word;\n }\n }\n }\n}\n\n/// Image link styles\n///\n/// Prepares and provides the focus state for links that only contain images\n/// with no accompanying text.\n///\n/// @access public\n\n@mixin govuk-link-image {\n // Needed to draw the focus around the entire image\n display: inline-block;\n\n // Remove extra space at the bottom of the image that's added by line-height\n line-height: 0;\n\n // Don't render an underline\n text-decoration: none;\n\n &:focus {\n @include govuk-focused-box;\n }\n}\n"]}
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_links.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,uBAAuB;AACvB,GAAG;;AAEH,qBAAqB;AACrB,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;EAChC,8BAA8B;;EAE9B;IACE,oCAAoC;EACtC;;EAEA;IACE,2BAA2B;EAC7B;AACF;;AAEA,kBAAkB;AAClB,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,iBA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AA0B;AAC1B,EAAE;AACF,0EAA0E;AAC1E,8DAA8D;AAC9D,6EAA6E;AAC7E,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,kDAAkD;AAClD,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,yBAAyB;EAC3B;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,+BAA+B;EACjC;;EAEA;IACE,gCAAgC;EAClC;;EAEA,yEAAyE;EACzE,8BAA8B;EAC9B;IACE,+BAA+B;EACjC;AACF;;AAEA,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,wBAAwB;AACxB,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,yCAAyC;AACzC,8CAA8C;AAC9C,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,qBAAqB;EACvB;AACF;;AAEA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE;;;;MAIE;QACE,4BAA4B;QAC5B,cAAc;;QAEd,mEAAmE;QACnE,gEAAgE;QAChE,oBAAoB;QACpB,qBAAqB;MACvB;IACF;EACF;AACF;;AAEA,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE,kDAAkD;EAClD,qBAAqB;;EAErB,2EAA2E;EAC3E,cAAc;;EAEd,2BAA2B;EAC3B,qBAAqB;;EAErB;IACE,0BAA0B;EAC5B;AACF","file":"_links.scss","sourcesContent":["////\n/// @group helpers/links\n////\n\n/// Common link styles\n///\n/// Provides the typography and focus state, regardless of link style.\n///\n/// @access public\n\n@mixin govuk-link-common {\n @include govuk-typography-common;\n @include govuk-link-decoration;\n\n &:hover {\n @include govuk-link-hover-decoration;\n }\n\n &:focus {\n @include govuk-focused-text;\n }\n}\n\n/// Link decoration\n///\n/// Provides the text decoration for links, including thickness and underline\n/// offset. Use this mixin only if you cannot use the `govuk-link-common` mixin.\n///\n/// @access public\n@mixin govuk-link-decoration {\n text-decoration: underline;\n\n @if $govuk-link-underline-thickness {\n text-decoration-thickness: $govuk-link-underline-thickness;\n }\n\n @if $govuk-link-underline-offset {\n text-underline-offset: $govuk-link-underline-offset;\n }\n}\n\n/// Link hover decoration\n///\n/// Provides the text decoration for links in their hover state, for you to use\n/// within a `:hover` pseudo-selector. Use this mixin only if you cannot use the\n/// `govuk-link-common` mixin.\n///\n/// @access public\n\n@mixin govuk-link-hover-decoration {\n @if $govuk-link-hover-underline-thickness {\n text-decoration-thickness: $govuk-link-hover-underline-thickness;\n // Disable ink skipping on underlines on hover. Browsers haven't\n // standardised on this part of the spec yet, so set both properties\n text-decoration-skip-ink: none; // Chromium, Firefox\n text-decoration-skip: none; // Safari\n }\n}\n\n/// Default link styles\n///\n/// Makes links use the default unvisited, visited, hover and active colours.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-default {\n &:link {\n color: $govuk-link-colour;\n }\n\n &:visited {\n color: $govuk-link-visited-colour;\n }\n\n &:hover {\n color: $govuk-link-hover-colour;\n }\n\n &:active {\n color: $govuk-link-active-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Error link styles\n///\n/// Makes links use the error colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-error;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-error {\n &:link,\n &:visited {\n color: $govuk-error-colour;\n }\n\n &:hover {\n color: scale-color($govuk-error-colour, $lightness: -30%);\n }\n\n &:active {\n color: $govuk-error-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Success link styles\n///\n/// Makes links use the success colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-success;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-success {\n &:link,\n &:visited {\n color: $govuk-success-colour;\n }\n\n &:hover {\n color: scale-color($govuk-success-colour, $lightness: -30%);\n }\n\n &:active {\n color: $govuk-success-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Muted link styles\n///\n/// Makes links use the secondary text colour. The link will darken if it's\n/// active or a user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-muted;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-muted {\n &:link,\n &:visited {\n color: $govuk-secondary-text-colour;\n }\n\n &:hover,\n &:active {\n color: $govuk-text-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Text link styles\n///\n/// Makes links use the primary text colour, in all states. Use this mixin for\n/// navigation components, such as breadcrumbs or the back link.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-text;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-text {\n &:link,\n &:visited {\n @include govuk-text-colour;\n }\n\n // Force a colour change on hover to work around a bug in Safari\n // https://webkit.org/b/224483\n &:hover {\n @if type-of($govuk-text-colour) == color {\n color: rgba($govuk-text-colour, 0.99);\n }\n }\n\n &:active,\n &:focus {\n @include govuk-text-colour;\n }\n}\n\n/// Inverse link styles\n///\n/// Makes links white, in all states. Use this mixin if you're displaying links\n/// against a dark background.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-inverse;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-inverse {\n &:link,\n &:visited {\n color: govuk-colour(\"white\");\n }\n\n // Force a colour change on hover to work around a bug in Safari\n // https://webkit.org/b/224483\n &:hover,\n &:active {\n color: rgba(govuk-colour(\"white\"), 0.99);\n }\n\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Default link styles, without a visited state\n///\n/// Makes links use the default unvisited, hover and active colours, with no\n/// distinct visited state.\n///\n/// Use this mixin when it's not helpful to distinguish between visited and\n/// non-visited links. For example, when you link to pages with\n/// frequently-changing content, such as the dashboard for an admin interface.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-no-visited-state;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-visited-state {\n &:link {\n color: $govuk-link-colour;\n }\n\n &:visited {\n color: $govuk-link-colour;\n }\n\n &:hover {\n color: $govuk-link-hover-colour;\n }\n\n &:active {\n color: $govuk-link-active-colour;\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: $govuk-focus-text-colour;\n }\n}\n\n/// Remove underline from links\n///\n/// Remove underlines from links unless the link is active or a user hovers\n/// their cursor over it.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// @include govuk-link-style-no-underline;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-underline {\n &:not(:hover):not(:active) {\n text-decoration: none;\n }\n}\n\n/// Include link destination when printing the page\n///\n/// If the user prints the page, add the destination URL after the link text, if\n/// the URL starts with `/`, `http://` or `https://`.\n///\n/// @access public\n\n@mixin govuk-link-print-friendly {\n @include govuk-media-query($media-type: print) {\n &[href^=\"/\"],\n &[href^=\"http://\"],\n &[href^=\"https://\"]\n {\n &::after {\n content: \" (\" attr(href) \")\";\n font-size: 90%;\n\n // Because the URLs may be very long, ensure that they may be broken\n // at arbitrary points if there are no otherwise acceptable break\n // points in the line\n word-wrap: break-word;\n }\n }\n }\n}\n\n/// Image link styles\n///\n/// Prepares and provides the focus state for links that only contain images\n/// with no accompanying text.\n///\n/// @access public\n\n@mixin govuk-link-image {\n // Needed to draw the focus around the entire image\n display: inline-block;\n\n // Remove extra space at the bottom of the image that's added by line-height\n line-height: 0;\n\n // Don't render an underline\n text-decoration: none;\n\n &:focus {\n @include govuk-focused-box;\n }\n}\n"]}
|
@@ -54,7 +54,7 @@
|
|
54
54
|
-webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
55
55
|
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3
|
56
56
|
|
57
|
-
border-width: 0 $perpendicular $height
|
57
|
+
border-width: 0 $perpendicular $height;
|
58
58
|
border-bottom-color: inherit; // 2
|
59
59
|
} @else if $direction == "right" {
|
60
60
|
-webkit-clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_shape-arrow.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,EAAE;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G;EACnC,EAAE;IACA,oDAA4C;YAA5C,4CAA4C,EAAE,GAAG;;IAEjD,qDAAqD;IACrD,0BAA0B,EAAE,GAAG;EACjC,EAAE;IACA,oDAA4C;YAA5C,4CAA4C,EAAE,GAAG;;IAEjD,qDAAqD;IACrD,yBAAyB,EAAE,GAAG;EAChC,EAAE;IACA,sDAA8C;YAA9C,8CAA8C,EAAE,GAAG;;IAEnD,qDAAqD;IACrD,2BAA2B,EAAE,GAAG;EAClC,EAAE;IACA,+FAA+F;EACjG;AACF","file":"_shape-arrow.scss","sourcesContent":["////\n/// @group helpers/shapes\n////\n\n/// Calculate the height of an equilateral triangle\n///\n/// Multiplying half the length of the base of an equilateral triangle by the\n/// square root of three gives us its height. We use 1.732 as an approximation.\n///\n/// @param {Number} $base - Length of the base of the triangle\n/// @return {Number} Calculated height of the triangle\n/// @access private\n\n@function _govuk-equilateral-height($base) {\n $square-root-of-three: 1.732;\n\n @return ($base / 2) * $square-root-of-three;\n}\n\n/// Arrow mixin\n///\n/// Generate Arrows (triangles) by using a mix of transparent (1) and coloured\n/// borders. The coloured borders inherit the text colour of the element (2).\n///\n/// Ensure the arrow is rendered correctly if browser colours are overridden by\n/// providing a clip path (3). Without this the transparent borders are\n/// overridden to become visible which results in a square.\n///\n/// We need both because older browsers do not support clip-path.\n///\n/// @param {String} $direction - Direction for arrow: up, right, down, left.\n/// @param {Number} $base - Length of the triangle 'base' side\n/// @param {Number} $height [null] - Height of triangle. Omit for equilateral.\n/// @param {String} $display [block] - CSS display property of the arrow\n///\n/// @access public\n\n@mixin govuk-shape-arrow($direction, $base, $height: null, $display: block) {\n display: $display;\n\n width: 0;\n height: 0;\n\n border-style: solid;\n border-color: transparent; // 1\n\n $perpendicular: $base / 2;\n\n @if not $height {\n $height: _govuk-equilateral-height($base);\n }\n\n @if $direction == \"up\" {\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3\n\n border-width: 0 $perpendicular $height;\n border-bottom-color: inherit; // 2\n } @else if $direction == \"right\" {\n clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3\n\n border-width: $perpendicular 0 $perpendicular $height;\n border-left-color: inherit; // 2\n } @else if $direction == \"down\" {\n clip-path: polygon(0% 0%, 50% 100%, 100% 0%); // 3\n\n border-width: $height $perpendicular 0 $perpendicular;\n border-top-color: inherit; // 2\n } @else if $direction == \"left\" {\n clip-path: polygon(0% 50%, 100% 100%, 100% 0%); // 3\n\n border-width: $perpendicular $height $perpendicular 0;\n border-right-color: inherit; // 2\n } @else {\n @error \"Invalid arrow direction: expected `up`, `right`, `down` or `left`, got `#{$direction}`\";\n }\n}\n"]}
|
@@ -79,6 +79,23 @@
|
|
79
79
|
font-variant-numeric: tabular-nums if($important, !important, null);
|
80
80
|
}
|
81
81
|
|
82
|
+
/// Word break helper
|
83
|
+
///
|
84
|
+
/// Forcibly breaks long words that lack spaces, such as email addresses,
|
85
|
+
/// across multiple lines when they wouldn't otherwise fit.
|
86
|
+
///
|
87
|
+
/// @param {Boolean} $important [false] - Whether to mark declarations as
|
88
|
+
/// `!important`. Generally used to create override classes.
|
89
|
+
/// @access public
|
90
|
+
|
91
|
+
@mixin govuk-text-break-word($important: false) {
|
92
|
+
// IE 11 and Edge 16–17 only support the non-standard `word-wrap` property
|
93
|
+
word-wrap: break-word if($important, !important, null);
|
94
|
+
|
95
|
+
// All other browsers support `overflow-wrap`
|
96
|
+
overflow-wrap: break-word if($important, !important, null);
|
97
|
+
}
|
98
|
+
|
82
99
|
/// Convert line-heights specified in pixels into a relative value, unless
|
83
100
|
/// they are already unit-less (and thus already treated as relative values)
|
84
101
|
/// or the units do not match the units used for the font size.
|
@@ -173,7 +190,7 @@
|
|
173
190
|
// No match? Try with string type (e.g. $size: "16" not 16)
|
174
191
|
@if not $font-map {
|
175
192
|
@each $font-size in map-keys($govuk-typography-scale) {
|
176
|
-
@if not $font-map and #{$font-size} == #{$size} {
|
193
|
+
@if not $font-map and "#{$font-size}" == "#{$size}" {
|
177
194
|
$font-map: map-get($govuk-typography-scale, $font-size);
|
178
195
|
}
|
179
196
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_typography.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,4BAA4B;AAC5B,GAAG;;AAEH,4BAA4B;;AAE5B,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,gCAAgC;AAChC,EAAE;AACF,qEAAqE;AACrE,iBAAiB;;AAEjB;EACE,yBAAyB;EACzB,mCAAmC;EACnC,kCAAkC;;EAElC,wEAAwE;EACxE,6BAA6B;EAC7B;IACE,uCAAuC;EACzC;;EAEA;IACE,qCAAqC;EACvC;AACF;;AAEA,qBAAqB;AACrB,EAAE;AACF,iEAAiE;AACjE,EAAE;AACF,iBAAiB;;AAEjB;EACE,yBAAyB;;EAEzB;IACE,+BAA+B;EACjC;AACF;;AAEA,6BAA6B;AAC7B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,wEAAwE;AAC1E;;AAEA,0BAA0B;AAC1B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,qEAAqE;AACvE;;AAEA,wBAAwB;AACxB,EAAE;AACF,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,uEAAuE;AACvE,oDAAoD;AACpD,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,mEAAmE;AACrE;;AAEA,yEAAyE;AACzE,2EAA2E;AAC3E,8DAA8D;AAC9D,EAAE;AACF,2CAA2C;AAC3C,uCAAuC;AACvC,4EAA4E;AAC5E,EAAE;AACF,kBAAkB;;AAElB;EACE;IACE,uCAAuC;EACzC;;EAEA,oBAAoB;AACtB;;AAEA,mCAAmC;AACnC,EAAE;AACF,0EAA0E;AAC1E,gCAAgC;AAChC,6EAA6E;AAC7E,2DAA2D;AAC3D,wEAAwE;AACxE,kBA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;QACrB,oCAAoC;MACtC;IACF,EAAE;MACA;QACE,yBAAyB;QACzB,oCAAoC;MACtC;IACF;EACF;AACF;;AAEA,cAAc;AACd,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,YAAY;AACZ,kEAAkE;AAClE,4EAA4E;AAC5E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;;EAEhC;IACE,mCAAmC;EACrC;;EAEA;IACE,wCAAwC;EAC1C,EAAE;IACA,qCAAqC;EACvC;;EAEA;IACE,6CAA6C;EAC/C;AACF","file":"_typography.scss","sourcesContent":["////\n/// @group helpers/typography\n////\n\n@import \"../tools/px-to-rem\";\n\n/// 'Common typography' helper\n///\n/// Sets the font family and associated properties, such as font smoothing. Also\n/// overrides the font for print.\n///\n/// @param {List} $font-family [$govuk-font-family] Font family to use\n/// @access public\n\n@mixin govuk-typography-common($font-family: $govuk-font-family) {\n font-family: $font-family;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n // If the user is using the default GDS Transport font we need to include\n // the font-face declarations.\n @if $govuk-include-default-font-face {\n @include _govuk-font-face-gds-transport;\n }\n\n @include govuk-media-query($media-type: print) {\n font-family: $govuk-font-family-print;\n }\n}\n\n/// Text colour helper\n///\n/// Sets the text colour, including a suitable override for print.\n///\n/// @access public\n\n@mixin govuk-text-colour {\n color: $govuk-text-colour;\n\n @include govuk-media-query($media-type: print) {\n color: $govuk-print-text-colour;\n }\n}\n\n/// Regular font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-regular($important: false) {\n font-weight: $govuk-font-weight-regular if($important, !important, null);\n}\n\n/// Bold font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-bold($important: false) {\n font-weight: $govuk-font-weight-bold if($important, !important, null);\n}\n\n/// Tabular number helper\n///\n/// Switches numerical glyphs (0–9) to use alternative forms with a\n/// monospaced bounding box. This ensures that columns of numbers, such\n/// as those in tables, remain horizontally aligned with one another.\n/// This also has the useful side effect of making numbers more legible\n/// in some situations, such as reference codes, as the numbers are more\n/// distinct and visually separated from one another.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-font-tabular-numbers($important: false) {\n font-variant-numeric: tabular-nums if($important, !important, null);\n}\n\n/// Convert line-heights specified in pixels into a relative value, unless\n/// they are already unit-less (and thus already treated as relative values)\n/// or the units do not match the units used for the font size.\n///\n/// @param {Number} $line-height Line height\n/// @param {Number} $font-size Font size\n/// @return {Number} The line height as either a relative value or unmodified\n///\n/// @access private\n\n@function _govuk-line-height($line-height, $font-size) {\n @if not unitless($line-height) and unit($line-height) == unit($font-size) {\n $line-height: $line-height / $font-size;\n }\n\n @return $line-height;\n}\n\n/// Font size and line height helper\n///\n/// @param {Number} $size - Point from the type scale (the size as it would\n/// appear on tablet and above)\n/// @param {Number} $override-line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n///\n/// @alias govuk-font-size\n/// @deprecated Use `govuk-font-size` instead\n\n@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {\n @include _warning(\n \"govuk-typography-responsive\",\n \"govuk-typography-responsive is deprecated. Use govuk-font-size instead.\"\n );\n @include govuk-font-size($size, $override-line-height, $important);\n}\n\n/// Font size and line height helper\n///\n/// Takes a point from the responsive 'font map' as an argument (the size as it\n/// would appear on tablet and above), and uses it to create font-size and\n/// line-height declarations for different breakpoints, and print.\n///\n/// Example font map:\n///\n/// ```scss\n/// 19: (\n/// null: (\n/// font-size: 16px,\n/// line-height: 20px\n/// ),\n/// tablet: (\n/// font-size: 19px,\n/// line-height: 25px\n/// ),\n/// print: (\n/// font-size: 14pt,\n/// line-height: 1.15\n/// )\n/// );\n/// ```\n///\n/// @param {Number | String} $size - Point from the type scale (the size as\n/// it would appear on tablet and above)\n/// @param {Number} $line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n\n@mixin govuk-font-size($size, $line-height: false, $important: false) {\n // Flag font sizes that start with underscores so we can suppress warnings on\n // deprecated sizes used internally, for example `govuk-font($size: \"_14\")`\n $size-internal-use-only: str-slice(#{$size}, 1, 1) == \"_\";\n\n // Remove underscore from font sizes flagged for internal use\n @if $size-internal-use-only {\n $size: str-slice(#{$size}, 2);\n }\n\n // Check for a font map exactly matching the given size\n $font-map: map-get($govuk-typography-scale, $size);\n\n // No match? Try with string type (e.g. $size: \"16\" not 16)\n @if not $font-map {\n @each $font-size in map-keys($govuk-typography-scale) {\n @if not $font-map and #{$font-size} == #{$size} {\n $font-map: map-get($govuk-typography-scale, $font-size);\n }\n }\n }\n\n // Still no match? Throw error\n @if not $font-map {\n @error \"Unknown font size `#{$size}` - expected a point from the type scale.\";\n }\n\n // Check for a deprecation within the type scale\n $deprecation: map-get($font-map, \"deprecation\");\n\n @if $deprecation {\n // Warn on deprecated font sizes unless flagged for internal use\n @if not $size-internal-use-only {\n @include _warning(map-get($deprecation, \"key\"), map-get($deprecation, \"message\"));\n }\n\n // remove the deprecation map keys so they do not break the breakpoint loop\n $font-map: map-remove($font-map, \"deprecation\");\n }\n\n @each $breakpoint, $breakpoint-map in $font-map {\n $font-size: map-get($breakpoint-map, \"font-size\");\n $font-size-rem: govuk-px-to-rem($font-size);\n\n // $calculated-line-height is a separate variable from $line-height,\n // as otherwise the value would get redefined with each loop and\n // eventually break _govuk-line-height.\n //\n // We continue to call the param $line-height to stay consistent with the\n // naming with govuk-font.\n $calculated-line-height: _govuk-line-height(\n $line-height: if($line-height, $line-height, map-get($breakpoint-map, \"line-height\")),\n $font-size: $font-size\n );\n\n // Mark rules as !important if $important is true - this will result in\n // these variables becoming strings, so this needs to happen *after* they\n // are used in calculations\n $font-size: $font-size if($important, !important, null);\n $font-size-rem: $font-size-rem if($important, !important, null);\n $calculated-line-height: $calculated-line-height if($important, !important, null);\n\n @if not $breakpoint {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n } @else if $breakpoint == \"print\" {\n @include govuk-media-query($media-type: print) {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @include govuk-media-query($from: $breakpoint) {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n }\n }\n }\n}\n\n/// Font helper\n///\n/// @param {Number | Boolean | String} $size Point from the type scale (the\n/// size as it would appear on tablet and above). Use `false` to avoid setting\n/// a size.\n/// @param {String} $weight [regular] - Weight: `bold` or `regular`\n/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not\n/// @param {Number} $line-height [false] - Line-height, if overriding the\n/// default\n///\n/// @throw if `$size` is not a valid point from the type scale (or false)\n///\n/// @access public\n\n@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {\n @include govuk-typography-common;\n\n @if $tabular {\n @include govuk-font-tabular-numbers;\n }\n\n @if $weight == regular {\n @include govuk-typography-weight-regular;\n } @else if $weight == bold {\n @include govuk-typography-weight-bold;\n }\n\n @if $size {\n @include govuk-font-size($size, $line-height);\n }\n}\n"]}
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_typography.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,4BAA4B;AAC5B,GAAG;;AAEH,4BAA4B;;AAE5B,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,gCAAgC;AAChC,EAAE;AACF,qEAAqE;AACrE,iBAAiB;;AAEjB;EACE,yBAAyB;EACzB,mCAAmC;EACnC,kCAAkC;;EAElC,wEAAwE;EACxE,6BAA6B;EAC7B;IAC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E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;;EAEhC;IACE,mCAAmC;EACrC;;EAEA;IACE,wCAAwC;EAC1C,EAAE;IACA,qCAAqC;EACvC;;EAEA;IACE,6CAA6C;EAC/C;AACF","file":"_typography.scss","sourcesContent":["////\n/// @group helpers/typography\n////\n\n@import \"../tools/px-to-rem\";\n\n/// 'Common typography' helper\n///\n/// Sets the font family and associated properties, such as font smoothing. Also\n/// overrides the font for print.\n///\n/// @param {List} $font-family [$govuk-font-family] Font family to use\n/// @access public\n\n@mixin govuk-typography-common($font-family: $govuk-font-family) {\n font-family: $font-family;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n // If the user is using the default GDS Transport font we need to include\n // the font-face declarations.\n @if $govuk-include-default-font-face {\n @include _govuk-font-face-gds-transport;\n }\n\n @include govuk-media-query($media-type: print) {\n font-family: $govuk-font-family-print;\n }\n}\n\n/// Text colour helper\n///\n/// Sets the text colour, including a suitable override for print.\n///\n/// @access public\n\n@mixin govuk-text-colour {\n color: $govuk-text-colour;\n\n @include govuk-media-query($media-type: print) {\n color: $govuk-print-text-colour;\n }\n}\n\n/// Regular font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-regular($important: false) {\n font-weight: $govuk-font-weight-regular if($important, !important, null);\n}\n\n/// Bold font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-bold($important: false) {\n font-weight: $govuk-font-weight-bold if($important, !important, null);\n}\n\n/// Tabular number helper\n///\n/// Switches numerical glyphs (0–9) to use alternative forms with a\n/// monospaced bounding box. This ensures that columns of numbers, such\n/// as those in tables, remain horizontally aligned with one another.\n/// This also has the useful side effect of making numbers more legible\n/// in some situations, such as reference codes, as the numbers are more\n/// distinct and visually separated from one another.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-font-tabular-numbers($important: false) {\n font-variant-numeric: tabular-nums if($important, !important, null);\n}\n\n/// Word break helper\n///\n/// Forcibly breaks long words that lack spaces, such as email addresses,\n/// across multiple lines when they wouldn't otherwise fit.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally used to create override classes.\n/// @access public\n\n@mixin govuk-text-break-word($important: false) {\n // IE 11 and Edge 16–17 only support the non-standard `word-wrap` property\n word-wrap: break-word if($important, !important, null);\n\n // All other browsers support `overflow-wrap`\n overflow-wrap: break-word if($important, !important, null);\n}\n\n/// Convert line-heights specified in pixels into a relative value, unless\n/// they are already unit-less (and thus already treated as relative values)\n/// or the units do not match the units used for the font size.\n///\n/// @param {Number} $line-height Line height\n/// @param {Number} $font-size Font size\n/// @return {Number} The line height as either a relative value or unmodified\n///\n/// @access private\n\n@function _govuk-line-height($line-height, $font-size) {\n @if not unitless($line-height) and unit($line-height) == unit($font-size) {\n $line-height: $line-height / $font-size;\n }\n\n @return $line-height;\n}\n\n/// Font size and line height helper\n///\n/// @param {Number} $size - Point from the type scale (the size as it would\n/// appear on tablet and above)\n/// @param {Number} $override-line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n///\n/// @alias govuk-font-size\n/// @deprecated Use `govuk-font-size` instead\n\n@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {\n @include _warning(\n \"govuk-typography-responsive\",\n \"govuk-typography-responsive is deprecated. Use govuk-font-size instead.\"\n );\n @include govuk-font-size($size, $override-line-height, $important);\n}\n\n/// Font size and line height helper\n///\n/// Takes a point from the responsive 'font map' as an argument (the size as it\n/// would appear on tablet and above), and uses it to create font-size and\n/// line-height declarations for different breakpoints, and print.\n///\n/// Example font map:\n///\n/// ```scss\n/// 19: (\n/// null: (\n/// font-size: 16px,\n/// line-height: 20px\n/// ),\n/// tablet: (\n/// font-size: 19px,\n/// line-height: 25px\n/// ),\n/// print: (\n/// font-size: 14pt,\n/// line-height: 1.15\n/// )\n/// );\n/// ```\n///\n/// @param {Number | String} $size - Point from the type scale (the size as\n/// it would appear on tablet and above)\n/// @param {Number} $line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n\n@mixin govuk-font-size($size, $line-height: false, $important: false) {\n // Flag font sizes that start with underscores so we can suppress warnings on\n // deprecated sizes used internally, for example `govuk-font($size: \"_14\")`\n $size-internal-use-only: str-slice(#{$size}, 1, 1) == \"_\";\n\n // Remove underscore from font sizes flagged for internal use\n @if $size-internal-use-only {\n $size: str-slice(#{$size}, 2);\n }\n\n // Check for a font map exactly matching the given size\n $font-map: map-get($govuk-typography-scale, $size);\n\n // No match? Try with string type (e.g. $size: \"16\" not 16)\n @if not $font-map {\n @each $font-size in map-keys($govuk-typography-scale) {\n @if not $font-map and \"#{$font-size}\" == \"#{$size}\" {\n $font-map: map-get($govuk-typography-scale, $font-size);\n }\n }\n }\n\n // Still no match? Throw error\n @if not $font-map {\n @error \"Unknown font size `#{$size}` - expected a point from the type scale.\";\n }\n\n // Check for a deprecation within the type scale\n $deprecation: map-get($font-map, \"deprecation\");\n\n @if $deprecation {\n // Warn on deprecated font sizes unless flagged for internal use\n @if not $size-internal-use-only {\n @include _warning(map-get($deprecation, \"key\"), map-get($deprecation, \"message\"));\n }\n\n // remove the deprecation map keys so they do not break the breakpoint loop\n $font-map: map-remove($font-map, \"deprecation\");\n }\n\n @each $breakpoint, $breakpoint-map in $font-map {\n $font-size: map-get($breakpoint-map, \"font-size\");\n $font-size-rem: govuk-px-to-rem($font-size);\n\n // $calculated-line-height is a separate variable from $line-height,\n // as otherwise the value would get redefined with each loop and\n // eventually break _govuk-line-height.\n //\n // We continue to call the param $line-height to stay consistent with the\n // naming with govuk-font.\n $calculated-line-height: _govuk-line-height(\n $line-height: if($line-height, $line-height, map-get($breakpoint-map, \"line-height\")),\n $font-size: $font-size\n );\n\n // Mark rules as !important if $important is true - this will result in\n // these variables becoming strings, so this needs to happen *after* they\n // are used in calculations\n $font-size: $font-size if($important, !important, null);\n $font-size-rem: $font-size-rem if($important, !important, null);\n $calculated-line-height: $calculated-line-height if($important, !important, null);\n\n @if not $breakpoint {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n } @else if $breakpoint == \"print\" {\n @include govuk-media-query($media-type: print) {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @include govuk-media-query($from: $breakpoint) {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n }\n }\n }\n}\n\n/// Font helper\n///\n/// @param {Number | Boolean | String} $size Point from the type scale (the\n/// size as it would appear on tablet and above). Use `false` to avoid setting\n/// a size.\n/// @param {String} $weight [regular] - Weight: `bold` or `regular`\n/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not\n/// @param {Number} $line-height [false] - Line-height, if overriding the\n/// default\n///\n/// @throw if `$size` is not a valid point from the type scale (or false)\n///\n/// @access public\n\n@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {\n @include govuk-typography-common;\n\n @if $tabular {\n @include govuk-font-tabular-numbers;\n }\n\n @if $weight == regular {\n @include govuk-typography-weight-regular;\n } @else if $weight == bold {\n @include govuk-typography-weight-bold;\n }\n\n @if $size {\n @include govuk-font-size($size, $line-height);\n }\n}\n"]}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/// @group helpers/accessibility
|
3
3
|
////
|
4
4
|
|
5
|
-
///
|
5
|
+
/// Helper function containing the common code for the following two mixins
|
6
6
|
///
|
7
7
|
/// @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
8
8
|
/// - Hiding Content for Accessibility, Jonathan Snook, February 2011
|
@@ -11,23 +11,11 @@
|
|
11
11
|
///
|
12
12
|
/// @param {Boolean} $important [true] - Whether to mark as `!important`
|
13
13
|
///
|
14
|
-
/// @access
|
14
|
+
/// @access private
|
15
15
|
|
16
|
-
@mixin
|
16
|
+
@mixin _govuk-visually-hide-content($important: true) {
|
17
17
|
position: absolute if($important, !important, null);
|
18
18
|
|
19
|
-
// Absolute positioning has the unintended consequence of removing any
|
20
|
-
// whitespace surrounding visually hidden text from the accessibility tree.
|
21
|
-
// Insert a space character before and after visually hidden text to separate
|
22
|
-
// it from any visible text surrounding it.
|
23
|
-
&::before {
|
24
|
-
content: "\00a0";
|
25
|
-
}
|
26
|
-
|
27
|
-
&::after {
|
28
|
-
content: "\00a0";
|
29
|
-
}
|
30
|
-
|
31
19
|
width: 1px if($important, !important, null);
|
32
20
|
height: 1px if($important, !important, null);
|
33
21
|
// If margin is set to a negative value it can cause text to be announced in
|
@@ -36,6 +24,8 @@
|
|
36
24
|
padding: 0 if($important, !important, null);
|
37
25
|
|
38
26
|
overflow: hidden if($important, !important, null);
|
27
|
+
|
28
|
+
// `clip` is needed for IE11 support
|
39
29
|
clip: rect(0 0 0 0) if($important, !important, null);
|
40
30
|
-webkit-clip-path: inset(50%) if($important, !important, null);
|
41
31
|
clip-path: inset(50%) if($important, !important, null);
|
@@ -55,62 +45,40 @@
|
|
55
45
|
user-select: none;
|
56
46
|
}
|
57
47
|
|
58
|
-
/// Hide an element visually, but have it available for screen readers
|
59
|
-
/// allowing the element to be focused when navigated to via the keyboard (e.g.
|
60
|
-
/// for the skip link)
|
61
|
-
///
|
62
|
-
/// This is slightly less opinionated about borders and padding to make it
|
63
|
-
/// easier to style the focussed element.
|
48
|
+
/// Hide an element visually, but have it available for screen readers
|
64
49
|
///
|
65
50
|
/// @param {Boolean} $important [true] - Whether to mark as `!important`
|
66
51
|
///
|
67
52
|
/// @access public
|
68
53
|
|
69
|
-
@mixin govuk-visually-hidden
|
70
|
-
|
71
|
-
|
72
|
-
width: 1px if($important, !important, null);
|
73
|
-
height: 1px if($important, !important, null);
|
74
|
-
// If margin is set to a negative value it can cause text to be announced in
|
75
|
-
// the wrong order in VoiceOver for OSX
|
76
|
-
margin: 0 if($important, !important, null);
|
77
|
-
|
78
|
-
overflow: hidden if($important, !important, null);
|
79
|
-
clip: rect(0 0 0 0) if($important, !important, null);
|
80
|
-
-webkit-clip-path: inset(50%) if($important, !important, null);
|
81
|
-
clip-path: inset(50%) if($important, !important, null);
|
82
|
-
|
83
|
-
// For long content, line feeds are not interpreted as spaces and small width
|
84
|
-
// causes content to wrap 1 word per line:
|
85
|
-
// https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
|
86
|
-
white-space: nowrap if($important, !important, null);
|
87
|
-
|
88
|
-
// Prevent users from selecting or copying visually-hidden text. This prevents
|
89
|
-
// a user unintentionally copying more text than they intended and needing to
|
90
|
-
// manually trim it down again.
|
91
|
-
-webkit-user-select: none;
|
92
|
-
-ms-user-select: none;
|
93
|
-
user-select: none;
|
94
|
-
|
95
|
-
&:active,
|
96
|
-
&:focus {
|
97
|
-
position: static if($important, !important, null);
|
54
|
+
@mixin govuk-visually-hidden($important: true) {
|
55
|
+
@include _govuk-visually-hide-content($important: $important);
|
98
56
|
|
99
|
-
|
100
|
-
|
101
|
-
|
57
|
+
// Absolute positioning has the unintended consequence of removing any
|
58
|
+
// whitespace surrounding visually hidden text from the accessibility tree.
|
59
|
+
// Insert a space character before and after visually hidden text to separate
|
60
|
+
// it from any visible text surrounding it.
|
61
|
+
&::before {
|
62
|
+
content: "\00a0";
|
63
|
+
}
|
102
64
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
65
|
+
&::after {
|
66
|
+
content: "\00a0";
|
67
|
+
}
|
68
|
+
}
|
107
69
|
|
108
|
-
|
70
|
+
/// Hide an element visually, but have it available for screen readers whilst
|
71
|
+
/// allowing the element to be focused when navigated to via the keyboard (e.g.
|
72
|
+
/// for the skip link)
|
73
|
+
///
|
74
|
+
/// @param {Boolean} $important [true] - Whether to mark as `!important`
|
75
|
+
///
|
76
|
+
/// @access public
|
109
77
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
78
|
+
@mixin govuk-visually-hidden-focusable($important: true) {
|
79
|
+
// IE 11 doesn't support the combined `:not(:active, :focus)` syntax.
|
80
|
+
&:not(:active):not(:focus) {
|
81
|
+
@include _govuk-visually-hide-content($important: $important);
|
114
82
|
}
|
115
83
|
}
|
116
84
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_visually-hidden.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_visually-hidden.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,0EAA0E;AAC1E,EAAE;AACF,gFAAgF;AAChF,sEAAsE;AACtE,2HAA2H;AAC3H,uCAAuC;AACvC,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,kBAAkB;;AAElB;EACE,mDAAmD;;EAEnD,2CAA2C;EAC3C,4CAA4C;EAC5C,2EAA2E;EAC3E,sCAAsC;EACtC,0CAA0C;EAC1C,2CAA2C;;EAE3C,iDAAiD;;EAEjD,mCAAmC;EACnC,oDAAoD;EACpD,8DAAsD;UAAtD,sDAAsD;;EAEtD,0CAA0C;;EAE1C,4EAA4E;EAC5E,yCAAyC;EACzC,uFAAuF;EACvF,oDAAoD;;EAEpD,6EAA6E;EAC7E,4EAA4E;EAC5E,8BAA8B;EAC9B,yBAAiB;MAAjB,qBAAiB;UAAjB,iBAAiB;AACnB;;AAEA,qEAAqE;AACrE,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,iBAAiB;;AAEjB;EACE,6DAA6D;;EAE7D,qEAAqE;EACrE,0EAA0E;EAC1E,4EAA4E;EAC5E,0CAA0C;EAC1C;IACE,gBAAgB;EAClB;;EAEA;IACE,gBAAgB;EAClB;AACF;;AAEA,4EAA4E;AAC5E,8EAA8E;AAC9E,qBAAqB;AACrB,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,iBAAiB;;AAEjB;EACE,oEAAoE;EACpE;IACE,6DAA6D;EAC/D;AACF","file":"_visually-hidden.scss","sourcesContent":["////\n/// @group helpers/accessibility\n////\n\n/// Helper function containing the common code for the following two mixins\n///\n/// @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility\n/// - Hiding Content for Accessibility, Jonathan Snook, February 2011\n/// @link https://github.com/h5bp/html5-boilerplate/blob/9f13695d21ff92c55c78dfa9f16bb02a1b6e911f/src/css/main.css#L121-L158\n/// - h5bp/html5-boilerplate - Thanks!\n///\n/// @param {Boolean} $important [true] - Whether to mark as `!important`\n///\n/// @access private\n\n@mixin _govuk-visually-hide-content($important: true) {\n position: absolute if($important, !important, null);\n\n width: 1px if($important, !important, null);\n height: 1px if($important, !important, null);\n // If margin is set to a negative value it can cause text to be announced in\n // the wrong order in VoiceOver for OSX\n margin: 0 if($important, !important, null);\n padding: 0 if($important, !important, null);\n\n overflow: hidden if($important, !important, null);\n\n // `clip` is needed for IE11 support\n clip: rect(0 0 0 0) if($important, !important, null);\n clip-path: inset(50%) if($important, !important, null);\n\n border: 0 if($important, !important, null);\n\n // For long content, line feeds are not interpreted as spaces and small width\n // causes content to wrap 1 word per line:\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n white-space: nowrap if($important, !important, null);\n\n // Prevent users from selecting or copying visually-hidden text. This prevents\n // a user unintentionally copying more text than they intended and needing to\n // manually trim it down again.\n user-select: none;\n}\n\n/// Hide an element visually, but have it available for screen readers\n///\n/// @param {Boolean} $important [true] - Whether to mark as `!important`\n///\n/// @access public\n\n@mixin govuk-visually-hidden($important: true) {\n @include _govuk-visually-hide-content($important: $important);\n\n // Absolute positioning has the unintended consequence of removing any\n // whitespace surrounding visually hidden text from the accessibility tree.\n // Insert a space character before and after visually hidden text to separate\n // it from any visible text surrounding it.\n &::before {\n content: \"\\00a0\";\n }\n\n &::after {\n content: \"\\00a0\";\n }\n}\n\n/// Hide an element visually, but have it available for screen readers whilst\n/// allowing the element to be focused when navigated to via the keyboard (e.g.\n/// for the skip link)\n///\n/// @param {Boolean} $important [true] - Whether to mark as `!important`\n///\n/// @access public\n\n@mixin govuk-visually-hidden-focusable($important: true) {\n // IE 11 doesn't support the combined `:not(:active, :focus)` syntax.\n &:not(:active):not(:focus) {\n @include _govuk-visually-hide-content($important: $important);\n }\n}\n"]}
|