govuk_publishing_components 68.2.0 → 69.0.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/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-form-tracker.js +44 -17
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +98 -139
- data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +26 -16
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +12 -11
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +3 -1
- data/app/assets/javascripts/govuk_publishing_components/lib/trigger-event.js +14 -11
- data/app/assets/stylesheets/component_guide/application.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_add-another.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_app-promo-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_attachment.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +6 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_character-count.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_cross-service-header.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_date-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +6 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_feedback.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_fieldset.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_figure.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +6 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_intervention.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +15 -11
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_notice.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +1 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_pagination.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_password-input.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_phase-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_search-with-autocomplete.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_select-with-search.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +3 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/_sub-navigation-menu.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-banner.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-card.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_tag.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_translation-nav.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_warning-text.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_attachment.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_call-to-action.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +9 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_contact.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_example.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_footnotes.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_form-download.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_images.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_information-callout.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_media-player.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +3 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +5 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_index.scss +0 -1
- data/app/views/govuk_publishing_components/components/_date_input.html.erb +16 -10
- data/app/views/govuk_publishing_components/components/_metadata.html.erb +81 -74
- data/app/views/govuk_publishing_components/components/_option_select.html.erb +9 -20
- data/app/views/govuk_publishing_components/components/docs/date_input.yml +23 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/choices.js/README.md +1 -1
- data/node_modules/choices.js/package.json +5 -9
- data/node_modules/choices.js/public/assets/scripts/choices.js +32 -23
- data/node_modules/choices.js/public/assets/scripts/choices.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.mjs +32 -23
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.js +31 -22
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-basic.mjs +31 -22
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.js +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-kmp.mjs +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.js +30 -21
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.min.js +2 -2
- data/node_modules/choices.js/public/assets/scripts/choices.search-prefix.mjs +30 -21
- data/node_modules/choices.js/public/types/src/scripts/choices.d.ts +3 -3
- data/node_modules/choices.js/public/types/src/scripts/interfaces/templates.d.ts +1 -1
- data/node_modules/choices.js/src/scripts/choices.ts +30 -25
- data/node_modules/choices.js/src/scripts/components/dropdown.ts +7 -3
- data/node_modules/choices.js/src/scripts/interfaces/templates.ts +1 -1
- data/node_modules/choices.js/src/scripts/templates.ts +8 -3
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss +7 -3
- data/node_modules/govuk-frontend/dist/govuk/components/back-link/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +8 -4
- data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss +10 -6
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/date-input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-message/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_hint.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/hint/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/input/_input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/label/_label.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +6 -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/_notification-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +3 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/_panel.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -0
- 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/_password-input.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +3 -1
- 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/_phase-banner.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +14 -10
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_index.scss +7 -3
- 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/_skip-link.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +15 -2
- 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/_summary-list.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/table/_table.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +5 -2
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/_tabs.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tag/_tag.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +6 -2
- 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/_task-list.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +3 -1
- 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/_warning-text.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_global-styles.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss +4 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +10 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/core/_section-break.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +14 -13
- data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.scss.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/helpers/_colour.scss +38 -70
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/helpers/_device-pixels.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +4 -4
- data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +17 -15
- data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss +2 -2
- data/node_modules/govuk-frontend/dist/govuk/helpers/_shape-arrow.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +19 -13
- data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +48 -26
- data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss +13 -11
- data/node_modules/govuk-frontend/dist/govuk/helpers/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss +4 -2
- data/node_modules/govuk-frontend/dist/govuk/objects/_grid.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +10 -9
- data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss +5 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_spacing.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_text-align.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +7 -2
- data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss +18 -0
- data/node_modules/govuk-frontend/dist/govuk/settings/_assets.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss +28 -4
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-functional.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/settings/_links.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss +8 -16
- data/node_modules/govuk-frontend/dist/govuk/settings/_measurements.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +4 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss +15 -2
- data/node_modules/govuk-frontend/dist/govuk/settings/_warnings.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss +3 -2
- data/node_modules/govuk-frontend/dist/govuk/tools/_exports.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss +13 -5
- data/node_modules/govuk-frontend/dist/govuk/tools/_font-url.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss +24 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_if.scss.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss +13 -5
- data/node_modules/govuk-frontend/dist/govuk/tools/_image-url.scss.map +1 -1
- 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/_px-to-em.scss +5 -3
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss +4 -2
- data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-rem.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_clearfix.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_index.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss +3 -0
- data/node_modules/govuk-frontend/dist/govuk/utilities/_visually-hidden.scss.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.scss +3 -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 +1 -1
- data/node_modules/govuk-frontend/package.json +7 -7
- metadata +4 -3
- data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_grid-helper.scss +0 -145
|
@@ -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,oCAAoC;;EAEpC;IACE,0CAA0C;EAC5C;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,oBAAoB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,sCAAsC;IACtC,CAAC;IACD,wEAAwE;IACxE,yBAAyB;IACzB;;;KAGC;;IAED,sEAAsE;IACtE,wEAAwE;IACxE,0BAA0B;IAC1B,uDAAuD;IACvD,+DAA+D;IAC/D,iFAAiF;;IAEjF;MACE,yBAAyB;MACzB,oCAAoC;IACtC,EAAE;MACA;QACE,qBAAqB;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 @media 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-functional-colour(text);\n\n @media print {\n color: govuk-functional-colour(print-text);\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/// 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 @media print {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @media #{govuk-from-breakpoint($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;AACH,eAAe;AACf,gBAAgB;AAChB,kBAAkB;;AAElB,4BAA4B;AAC5B,wCAAwC;AACxC,6BAA6B;AAC7B,qCAAqC;AACrC,8BAA8B;AAC9B,2BAA2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Ac;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@use \"sass:map\";\n@use \"sass:math\";\n@use \"sass:string\";\n\n@import \"../settings/assets\";\n@import \"../settings/colours-functional\";\n@import \"../settings/spacing\";\n@import \"../settings/typography-font\";\n@import \"../settings/warnings\";\n@import \"../tools/font-url\";\n@import \"../tools/px-to-rem\";\n@import \"../tools/if\";\n@import \"font-faces\";\n@import \"media-queries\";\n@import \"spacing\";\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 @media 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/// @deprecated\n/// @access public\n\n@mixin govuk-text-colour {\n @include _warning(\n \"govuk-text-colour\",\n \"The `govuk-text-colour` mixin is deprecated. Use `color: govuk-colour(text)` instead.\"\n );\n\n color: govuk-functional-colour(text);\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 govuk-if($important, !important);\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 govuk-if($important, !important);\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 govuk-if($important, !important);\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 govuk-if($important, !important);\n\n // All other browsers support `overflow-wrap`\n overflow-wrap: break-word govuk-if($important, !important);\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 math.is-unitless($line-height) and math.unit($line-height) == math.unit($font-size) {\n $line-height: math.div($line-height, $font-size);\n }\n\n @return $line-height;\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: string.slice(#{$size}, 1, 1) == \"_\";\n\n // Remove underscore from font sizes flagged for internal use\n @if $size-internal-use-only {\n $size: string.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 // 1. See if the function was called with a specific line-height\n $calculated-line-height: $line-height;\n // 2. Default to the breakpoint-map if no specific value was given\n @if not $calculated-line-height {\n $calculated-line-height: map.get($breakpoint-map, \"line-height\");\n }\n\n // 3. Turn the value into a unitless line-height if possible\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: $calculated-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 govuk-if($important, !important);\n $font-size-rem: $font-size-rem govuk-if($important, !important);\n $calculated-line-height: $calculated-line-height govuk-if($important, !important);\n\n @if not $breakpoint {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n } @else if $breakpoint == \"print\" {\n @media print {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @media #{govuk-from-breakpoint($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,6 +2,8 @@
|
|
|
2
2
|
/// @group helpers/accessibility
|
|
3
3
|
////
|
|
4
4
|
|
|
5
|
+
@import "../tools/if";
|
|
6
|
+
|
|
5
7
|
/// Helper function containing the common code for the following two mixins
|
|
6
8
|
///
|
|
7
9
|
/// @link https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
|
@@ -14,28 +16,28 @@
|
|
|
14
16
|
/// @access private
|
|
15
17
|
|
|
16
18
|
@mixin _govuk-visually-hide-content($important: true) {
|
|
17
|
-
position: absolute if($important, !important
|
|
19
|
+
position: absolute govuk-if($important, !important);
|
|
18
20
|
|
|
19
|
-
width: 1px if($important, !important
|
|
20
|
-
height: 1px if($important, !important
|
|
21
|
+
width: 1px govuk-if($important, !important);
|
|
22
|
+
height: 1px govuk-if($important, !important);
|
|
21
23
|
// If margin is set to a negative value it can cause text to be announced in
|
|
22
24
|
// the wrong order in VoiceOver for OSX
|
|
23
|
-
margin: 0 if($important, !important
|
|
24
|
-
padding: 0 if($important, !important
|
|
25
|
+
margin: 0 govuk-if($important, !important);
|
|
26
|
+
padding: 0 govuk-if($important, !important);
|
|
25
27
|
|
|
26
|
-
overflow: hidden if($important, !important
|
|
28
|
+
overflow: hidden govuk-if($important, !important);
|
|
27
29
|
|
|
28
30
|
// `clip` is needed for IE11 support
|
|
29
|
-
clip: rect(0 0 0 0) if($important, !important
|
|
30
|
-
-webkit-clip-path: inset(50%) if($important, !important
|
|
31
|
-
clip-path: inset(50%) if($important, !important
|
|
31
|
+
clip: rect(0 0 0 0) govuk-if($important, !important);
|
|
32
|
+
-webkit-clip-path: inset(50%) govuk-if($important, !important);
|
|
33
|
+
clip-path: inset(50%) govuk-if($important, !important);
|
|
32
34
|
|
|
33
|
-
border: 0 if($important, !important
|
|
35
|
+
border: 0 govuk-if($important, !important);
|
|
34
36
|
|
|
35
37
|
// For long content, line feeds are not interpreted as spaces and small width
|
|
36
38
|
// causes content to wrap 1 word per line:
|
|
37
39
|
// https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
|
|
38
|
-
white-space: nowrap if($important, !important
|
|
40
|
+
white-space: nowrap govuk-if($important, !important);
|
|
39
41
|
|
|
40
42
|
// Prevent users from selecting or copying visually-hidden text. This prevents
|
|
41
43
|
// a user unintentionally copying more text than they intended and needing to
|
|
@@ -1 +1 @@
|
|
|
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,wEAAwE;EACxE,8DAA8D;EAC9D,oDAAoD;EACpD;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
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_visually-hidden.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,qBAAqB;;AAErB,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,wEAAwE;EACxE,8DAA8D;EAC9D,oDAAoD;EACpD;IACE,6DAA6D;EAC/D;AACF","file":"_visually-hidden.scss","sourcesContent":["////\n/// @group helpers/accessibility\n////\n\n@import \"../tools/if\";\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 govuk-if($important, !important);\n\n width: 1px govuk-if($important, !important);\n height: 1px govuk-if($important, !important);\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 govuk-if($important, !important);\n padding: 0 govuk-if($important, !important);\n\n overflow: hidden govuk-if($important, !important);\n\n // `clip` is needed for IE11 support\n clip: rect(0 0 0 0) govuk-if($important, !important);\n clip-path: inset(50%) govuk-if($important, !important);\n\n border: 0 govuk-if($important, !important);\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 govuk-if($important, !important);\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 // Also allows for ':focus' companion classes from postcss-pseudo-classes\n // which the plugin unfortunately doesn't handle automatically.\n // stylelint-disable-next-line selector-class-pattern\n &:not(:active):not(:focus):not(.\\:focus) {\n @include _govuk-visually-hide-content($important: $important);\n }\n}\n"]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
1
3
|
@import "../base";
|
|
2
4
|
|
|
3
5
|
@include govuk-exports("govuk/objects/grid") {
|
|
@@ -7,7 +9,7 @@
|
|
|
7
9
|
margin-left: -($govuk-gutter-half);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
@each $width in map
|
|
12
|
+
@each $width in map.keys($govuk-grid-widths) {
|
|
11
13
|
.govuk-grid-column-#{$width} {
|
|
12
14
|
@include govuk-grid-column($width);
|
|
13
15
|
}
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
// These *must* be defined in a separate loop as they have the same
|
|
17
19
|
// specificity as the non-breakpoint specific classes, so need to appear after
|
|
18
20
|
// them in the outputted CSS
|
|
19
|
-
@each $width in map
|
|
21
|
+
@each $width in map.keys($govuk-grid-widths) {
|
|
20
22
|
.govuk-grid-column-#{$width}-from-desktop {
|
|
21
23
|
@include govuk-grid-column($width, $at: desktop);
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/objects/_grid.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE;IACE,uBAAuB;IACvB,mCAAmC;IACnC,kCAAkC;EACpC;;EAEA;IACE;MACE,kCAAkC;IACpC;EACF;;EAEA,kEAAkE;EAClE,6EAA6E;EAC7E,2BAA2B;EAC3B;IACE;MACE,gDAAgD;IAClD;EACF;AACF","file":"_grid.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/grid\") {\n .govuk-grid-row {\n @include govuk-clearfix;\n margin-right: -($govuk-gutter-half);\n margin-left: -($govuk-gutter-half);\n }\n\n @each $width in map
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/objects/_grid.scss"],"names":[],"mappings":"AAAA,eAAe;;AAEf,iBAAiB;;AAEjB;EACE;IACE,uBAAuB;IACvB,mCAAmC;IACnC,kCAAkC;EACpC;;EAEA;IACE;MACE,kCAAkC;IACpC;EACF;;EAEA,kEAAkE;EAClE,6EAA6E;EAC7E,2BAA2B;EAC3B;IACE;MACE,gDAAgD;IAClD;EACF;AACF","file":"_grid.scss","sourcesContent":["@use \"sass:map\";\n\n@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/grid\") {\n .govuk-grid-row {\n @include govuk-clearfix;\n margin-right: -($govuk-gutter-half);\n margin-left: -($govuk-gutter-half);\n }\n\n @each $width in map.keys($govuk-grid-widths) {\n .govuk-grid-column-#{$width} {\n @include govuk-grid-column($width);\n }\n }\n\n // These *must* be defined in a separate loop as they have the same\n // specificity as the non-breakpoint specific classes, so need to appear after\n // them in the outputted CSS\n @each $width in map.keys($govuk-grid-widths) {\n .govuk-grid-column-#{$width}-from-desktop {\n @include govuk-grid-column($width, $at: desktop);\n }\n }\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
@import "../base";
|
|
2
|
-
|
|
3
1
|
////
|
|
4
2
|
/// @group objects/layout
|
|
5
3
|
////
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
|
|
6
|
+
@import "../base";
|
|
6
7
|
|
|
7
8
|
/// Width container mixin
|
|
8
9
|
///
|
|
@@ -26,14 +27,14 @@
|
|
|
26
27
|
margin-left: $govuk-gutter-half;
|
|
27
28
|
|
|
28
29
|
// Respect 'display cutout' safe area (avoids notches and rounded corners)
|
|
29
|
-
@supports (margin: unquote("max(calc(0px))")) {
|
|
30
|
+
@supports (margin: string.unquote("max(calc(0px))")) {
|
|
30
31
|
$gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
|
|
31
32
|
$gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
|
|
32
33
|
|
|
33
34
|
// Use max() to pick largest margin, default or with safe area
|
|
34
35
|
// Escaped due to Sass max() vs. CSS native max()
|
|
35
|
-
margin-right: unquote("max(#{$govuk-gutter-half}, #{$gutter-safe-area-right})");
|
|
36
|
-
margin-left: unquote("max(#{$govuk-gutter-half}, #{$gutter-safe-area-left})");
|
|
36
|
+
margin-right: string.unquote("max(#{$govuk-gutter-half}, #{$gutter-safe-area-right})");
|
|
37
|
+
margin-left: string.unquote("max(#{$govuk-gutter-half}, #{$gutter-safe-area-left})");
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
// On tablet, add full width gutters
|
|
@@ -42,14 +43,14 @@
|
|
|
42
43
|
margin-left: $govuk-gutter;
|
|
43
44
|
|
|
44
45
|
// Respect 'display cutout' safe area (avoids notches and rounded corners)
|
|
45
|
-
@supports (margin: unquote("max(calc(0px))")) {
|
|
46
|
+
@supports (margin: string.unquote("max(calc(0px))")) {
|
|
46
47
|
$gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
|
|
47
48
|
$gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
|
|
48
49
|
|
|
49
50
|
// Use max() to pick largest margin, default or with safe area
|
|
50
51
|
// Escaped due to Sass max() vs. CSS native max()
|
|
51
|
-
margin-right: unquote("max(#{$govuk-gutter}, #{$gutter-safe-area-right})");
|
|
52
|
-
margin-left: unquote("max(#{$govuk-gutter}, #{$gutter-safe-area-left})");
|
|
52
|
+
margin-right: string.unquote("max(#{$govuk-gutter}, #{$gutter-safe-area-right})");
|
|
53
|
+
margin-left: string.unquote("max(#{$govuk-gutter}, #{$gutter-safe-area-left})");
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
|
|
62
63
|
// Since a safe area may have previously been set above,
|
|
63
64
|
// we need to duplicate this margin that centers the page.
|
|
64
|
-
@supports (margin: unquote("max(calc(0px))")) {
|
|
65
|
+
@supports (margin: string.unquote("max(calc(0px))")) {
|
|
65
66
|
margin-right: auto;
|
|
66
67
|
margin-left: auto;
|
|
67
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/objects/_width-container.scss"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/objects/_width-container.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;AACH,kBAAkB;;AAElB,iBAAiB;;AAEjB,wBAAwB;AACxB,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,yDAAyD;AACzD,gCAAgC;AAChC,6CAA6C;AAC7C,KAAK;AACL,EAAE;AACF,iBAAiB;;AAEjB;EACE,gEAAgE;EAChE,iBAAiB;;EAEjB,mCAAmC;EACnC,gCAAgC;EAChC,+BAA+B;;EAE/B,yEAAyE;EACzE;IACE,iFAAiF;IACjF,+EAA+E;;IAE/E,6DAA6D;IAC7D,gDAAgD;IAChD,sFAAsF;IACtF,oFAAoF;EACtF;;EAEA,mCAAmC;EACnC;IACE,2BAA2B;IAC3B,0BAA0B;;IAE1B,yEAAyE;IACzE;MACE,iFAAiF;MACjF,+EAA+E;;MAE/E,6DAA6D;MAC7D,gDAAgD;MAChD,iFAAiF;MACjF,+EAA+E;IACjF;EACF;;EAEA,wEAAwE;EACxE,6DAA6D;EAC7D;IACE,kBAAkB;IAClB,iBAAiB;;IAEjB,uDAAuD;IACvD,yDAAyD;IACzD;MACE,kBAAkB;MAClB,iBAAiB;IACnB;EACF;AACF;;AAEA;EACE;IACE,8BAA8B;EAChC;AACF","file":"_width-container.scss","sourcesContent":["////\n/// @group objects/layout\n////\n@use \"sass:string\";\n\n@import \"../base\";\n\n/// Width container mixin\n///\n/// Used to create page width and custom width container classes.\n///\n/// @param {String} $width [$govuk-page-width] - Width in pixels\n///\n/// @example scss - Creating a 1200px wide container class\n/// .app-width-container--wide {\n/// @include govuk-width-container(1200px);\n/// }\n///\n/// @access public\n\n@mixin govuk-width-container($width: $govuk-page-width) {\n // By default, limit the width of the container to the page width\n max-width: $width;\n\n // On mobile, add half width gutters\n margin-right: $govuk-gutter-half;\n margin-left: $govuk-gutter-half;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: string.unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: string.unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-right})\");\n margin-left: string.unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-left})\");\n }\n\n // On tablet, add full width gutters\n @media #{govuk-from-breakpoint(tablet)} {\n margin-right: $govuk-gutter;\n margin-left: $govuk-gutter;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: string.unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: string.unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-right})\");\n margin-left: string.unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-left})\");\n }\n }\n\n // As soon as the viewport is greater than the width of the page plus the\n // gutters, just centre the content instead of adding gutters.\n @media (min-width: #{($width + $govuk-gutter * 2)}) {\n margin-right: auto;\n margin-left: auto;\n\n // Since a safe area may have previously been set above,\n // we need to duplicate this margin that centers the page.\n @supports (margin: string.unquote(\"max(calc(0px))\")) {\n margin-right: auto;\n margin-left: auto;\n }\n }\n}\n\n@include govuk-exports(\"govuk/objects/width-container\") {\n .govuk-width-container {\n @include govuk-width-container;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_display.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,gCAAgC;EAClC;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,wBAAwB;EAC1B;;EAEA;IACE;MACE,wBAAwB;IAC1B;EACF;AACF","file":"_display.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/display\") {\n .govuk-\\!-display-inline {\n display: inline !important;\n }\n\n .govuk-\\!-display-inline-block {\n display: inline-block !important;\n }\n\n .govuk-\\!-display-block {\n display: block !important;\n }\n\n .govuk-\\!-display-none {\n display: none !important;\n }\n\n @media print {\n .govuk-\\!-display-none-print {\n display: none !important;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_display.scss"],"names":[],"mappings":"AAAA,0BAA0B;;AAE1B,4CAA4C;AAC5C;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,gCAAgC;EAClC;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,wBAAwB;EAC1B;;EAEA;IACE;MACE,wBAAwB;IAC1B;EACF;AACF","file":"_display.scss","sourcesContent":["@import \"../tools/exports\";\n\n// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/display\") {\n .govuk-\\!-display-inline {\n display: inline !important;\n }\n\n .govuk-\\!-display-inline-block {\n display: inline-block !important;\n }\n\n .govuk-\\!-display-block {\n display: block !important;\n }\n\n .govuk-\\!-display-none {\n display: none !important;\n }\n\n @media print {\n .govuk-\\!-display-none-print {\n display: none !important;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_index.scss"],"names":[],"mappings":"AAAA,iBAAiB;AACjB,iBAAiB;AACjB,oBAAoB;AACpB,oBAAoB;AACpB,eAAe","file":"_index.scss","sourcesContent":["@import \"display\";\n@import \"spacing\";\n@import \"text-align\";\n@import \"typography\";\n@import \"width\";\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_index.scss"],"names":[],"mappings":"AAAA,6BAA6B;AAC7B,0BAA0B;AAC1B,4BAA4B;AAC5B,iBAAiB;AACjB,iBAAiB;AACjB,oBAAoB;AACpB,oBAAoB;AACpB,eAAe","file":"_index.scss","sourcesContent":["@import \"../settings/spacing\";\n@import \"../tools/exports\";\n@import \"../helpers/spacing\";\n@import \"display\";\n@import \"spacing\";\n@import \"text-align\";\n@import \"typography\";\n@import \"width\";\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
////
|
|
2
2
|
/// @group overrides
|
|
3
3
|
////
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@import "../settings/spacing";
|
|
6
|
+
@import "../tools/exports";
|
|
7
|
+
@import "../helpers/spacing";
|
|
4
8
|
|
|
5
9
|
// stylelint-disable declaration-no-important
|
|
6
10
|
|
|
@@ -62,7 +66,7 @@ $_spacing-directions: ("top", "right", "bottom", "left") !default;
|
|
|
62
66
|
///
|
|
63
67
|
/// @access private
|
|
64
68
|
@mixin _govuk-generate-static-spacing-overrides($property) {
|
|
65
|
-
@each $spacing-point in map
|
|
69
|
+
@each $spacing-point in map.keys($govuk-spacing-points) {
|
|
66
70
|
.govuk-\!-static-#{$property}-#{$spacing-point} {
|
|
67
71
|
#{$property}: govuk-spacing($spacing-point) !important;
|
|
68
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_spacing.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,mBAAmB;AACnB,GAAG;;
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_spacing.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,mBAAmB;AACnB,GAAG;AACH,eAAe;AACf,6BAA6B;AAC7B,0BAA0B;AAC1B,4BAA4B;;AAE5B,4CAA4C;;AAE5C,yBAAyB;AACzB,EAAE;AACF,YAAY;AACZ,kBAAkB;;AAElB,iEAAiE;;AAEjE,+CAA+C;AAC/C,EAAE;AACF,yEAAyE;AACzE,kDAAkD;AAClD,EAAE;AACF,yEAAyE;AACzE,EAAE;AACF,eAAe;AACf,wBAAwB;AACxB,8BAA8B;AAC9B,KAAK;AACL,EAAE;AACF,mCAAmC;AACnC,0BAA0B;AAC1B,gCAAgC;AAChC,OAAO;AACP,KAAK;AACL,EAAE;AACF,kBAAkB;;AAElB;EACE,sEAAsE;EACtE,yCAAyC;EACzC;IACE;MACE,wEAAwE;IAC1E;;IAEA,wDAAwD;IACxD;MACE;QACE,6EAA6E;MAC/E;IACF;EACF;AACF;;AAEA,2CAA2C;AAC3C,EAAE;AACF,yEAAyE;AACzE,sDAAsD;AACtD,EAAE;AACF,yEAAyE;AACzE,EAAE;AACF,eAAe;AACf,gCAAgC;AAChC,gCAAgC;AAChC,MAAM;AACN,EAAE;AACF,kBAAkB;AAClB;EACE;IACE;MACE,sDAAsD;IACxD;;IAEA;MACE;QACE,oEAAoE;MACtE;IACF;EACF;AACF;;AAEA;EACE,+DAA+D;EAC/D,gEAAgE;;EAEhE,2DAA2D;EAC3D,4DAA4D;AAC9D","file":"_spacing.scss","sourcesContent":["////\n/// @group overrides\n////\n@use \"sass:map\";\n@import \"../settings/spacing\";\n@import \"../tools/exports\";\n@import \"../helpers/spacing\";\n\n// stylelint-disable declaration-no-important\n\n/// Directions for spacing\n///\n/// @type Map\n/// @access private\n\n$_spacing-directions: (\"top\", \"right\", \"bottom\", \"left\") !default;\n\n/// Generate responsive spacing override classes\n///\n/// Generate spacing override classes for the given property (e.g. margin)\n/// for each point in the responsive spacing scale.\n///\n/// @param {String} $property - Property to add spacing to (e.g. 'margin')\n///\n/// @example css\n/// .govuk-\\!-margin-4 {\n/// margin: 15px !important;\n/// }\n///\n/// @media (min-width: 40.0625em) {\n/// .govuk-\\!-margin-4 {\n/// margin: 20px !important;\n/// }\n/// }\n///\n/// @access private\n\n@mixin _govuk-generate-responsive-spacing-overrides($property) {\n // For each point in the spacing scale (defined in settings), create an\n // override that affects all directions...\n @each $scale-point, $scale-map in $govuk-spacing-responsive-scale {\n .govuk-\\!-#{$property}-#{$scale-point} {\n @include _govuk-responsive-spacing($scale-point, $property, \"all\", true);\n }\n\n // ... and then an override for each individual direction\n @each $direction in $_spacing-directions {\n .govuk-\\!-#{$property}-#{$direction}-#{$scale-point} {\n @include _govuk-responsive-spacing($scale-point, $property, $direction, true);\n }\n }\n }\n}\n\n/// Generate static spacing override classes\n///\n/// Generate spacing override classes for the given property (e.g. margin)\n/// for each point in the non-responsive spacing scale.\n///\n/// @param {String} $property - Property to add spacing to (e.g. 'margin')\n///\n/// @example css\n/// .govuk-\\!-static-margin-4 {\n/// margin: 20px !important;\n/// }\n///\n/// @access private\n@mixin _govuk-generate-static-spacing-overrides($property) {\n @each $spacing-point in map.keys($govuk-spacing-points) {\n .govuk-\\!-static-#{$property}-#{$spacing-point} {\n #{$property}: govuk-spacing($spacing-point) !important;\n }\n\n @each $direction in $_spacing-directions {\n .govuk-\\!-static-#{$property}-#{$direction}-#{$spacing-point} {\n #{$property}-#{$direction}: govuk-spacing($spacing-point) !important;\n }\n }\n }\n}\n\n@include govuk-exports(\"govuk/overrides/spacing\") {\n @include _govuk-generate-responsive-spacing-overrides(\"margin\");\n @include _govuk-generate-responsive-spacing-overrides(\"padding\");\n\n @include _govuk-generate-static-spacing-overrides(\"margin\");\n @include _govuk-generate-static-spacing-overrides(\"padding\");\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_text-align.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,2BAA2B;EAC7B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,4BAA4B;EAC9B;AACF","file":"_text-align.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/text-align\") {\n .govuk-\\!-text-align-left {\n text-align: left !important;\n }\n\n .govuk-\\!-text-align-centre {\n text-align: center !important;\n }\n\n .govuk-\\!-text-align-right {\n text-align: right !important;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_text-align.scss"],"names":[],"mappings":"AAAA,0BAA0B;;AAE1B,4CAA4C;AAC5C;EACE;IACE,2BAA2B;EAC7B;;EAEA;IACE,6BAA6B;EAC/B;;EAEA;IACE,4BAA4B;EAC9B;AACF","file":"_text-align.scss","sourcesContent":["@import \"../tools/exports\";\n\n// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/text-align\") {\n .govuk-\\!-text-align-left {\n text-align: left !important;\n }\n\n .govuk-\\!-text-align-centre {\n text-align: center !important;\n }\n\n .govuk-\\!-text-align-right {\n text-align: right !important;\n }\n}\n"]}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@import "../settings/typography-responsive";
|
|
3
|
+
@import "../tools/exports";
|
|
4
|
+
@import "../helpers/typography";
|
|
5
|
+
|
|
1
6
|
@include govuk-exports("govuk/overrides/typography") {
|
|
2
7
|
// Font size and line height
|
|
3
8
|
|
|
@@ -5,10 +10,10 @@
|
|
|
5
10
|
// typography scale eg .govuk-\!-font-size-80
|
|
6
11
|
@each $size, $font-map in $govuk-typography-scale {
|
|
7
12
|
.govuk-\!-font-size-#{$size} {
|
|
8
|
-
$font-map: map
|
|
13
|
+
$font-map: map.get($govuk-typography-scale, $size);
|
|
9
14
|
|
|
10
15
|
// Add underscore to deprecated typography scale keys
|
|
11
|
-
@if map
|
|
16
|
+
@if map.has-key($font-map, "deprecation") {
|
|
12
17
|
$size: _#{$size};
|
|
13
18
|
}
|
|
14
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_typography.scss"],"names":[],"mappings":"AAAA;EACE,2BAA2B;;EAE3B,0EAA0E;EAC1E,4CAA4C;EAC5C;IACE;MACE,kDAAkD;;MAElD,oDAAoD;MACpD;QACE,gBAAgB;MAClB;;MAEA,iDAAiD;IACnD;EACF;;EAEA,SAAS;;EAET;IACE,0DAA0D;EAC5D;;EAEA;IACE,uDAAuD;EACzD;;EAEA,oBAAoB;;EAEpB;IACE,qDAAqD;EACvD;;EAEA;IACE,gDAAgD;EAClD;AACF","file":"_typography.scss","sourcesContent":["@include govuk-exports(\"govuk/overrides/typography\") {\n // Font size and line height\n\n // Generate typography override classes for each responsive font map in the\n // typography scale eg .govuk-\\!-font-size-80\n @each $size, $font-map in $govuk-typography-scale {\n .govuk-\\!-font-size-#{$size} {\n $font-map: map
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_typography.scss"],"names":[],"mappings":"AAAA,eAAe;AACf,2CAA2C;AAC3C,0BAA0B;AAC1B,+BAA+B;;AAE/B;EACE,2BAA2B;;EAE3B,0EAA0E;EAC1E,4CAA4C;EAC5C;IACE;MACE,kDAAkD;;MAElD,oDAAoD;MACpD;QACE,gBAAgB;MAClB;;MAEA,iDAAiD;IACnD;EACF;;EAEA,SAAS;;EAET;IACE,0DAA0D;EAC5D;;EAEA;IACE,uDAAuD;EACzD;;EAEA,oBAAoB;;EAEpB;IACE,qDAAqD;EACvD;;EAEA;IACE,gDAAgD;EAClD;AACF","file":"_typography.scss","sourcesContent":["@use \"sass:map\";\n@import \"../settings/typography-responsive\";\n@import \"../tools/exports\";\n@import \"../helpers/typography\";\n\n@include govuk-exports(\"govuk/overrides/typography\") {\n // Font size and line height\n\n // Generate typography override classes for each responsive font map in the\n // typography scale eg .govuk-\\!-font-size-80\n @each $size, $font-map in $govuk-typography-scale {\n .govuk-\\!-font-size-#{$size} {\n $font-map: map.get($govuk-typography-scale, $size);\n\n // Add underscore to deprecated typography scale keys\n @if map.has-key($font-map, \"deprecation\") {\n $size: _#{$size};\n }\n\n @include govuk-font-size($size, $important: true);\n }\n }\n\n // Weights\n\n .govuk-\\!-font-weight-regular {\n @include govuk-typography-weight-regular($important: true);\n }\n\n .govuk-\\!-font-weight-bold {\n @include govuk-typography-weight-bold($important: true);\n }\n\n // Typography helpers\n\n .govuk-\\!-font-tabular-numbers {\n @include govuk-font-tabular-numbers($important: true);\n }\n\n .govuk-\\!-text-break-word {\n @include govuk-text-break-word($important: true);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/overrides/_width.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,sBAAsB;EACxB;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;AACF","file":"_width.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/width\") {\n .govuk-\\!-width-full {\n width: 100% !important;\n }\n\n .govuk-\\!-width-three-quarters {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 75% !important;\n }\n }\n\n .govuk-\\!-width-two-thirds {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 66.66% !important;\n }\n }\n\n .govuk-\\!-width-one-half {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 50% !important;\n }\n }\n\n .govuk-\\!-width-one-third {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 33.33% !important;\n }\n }\n\n .govuk-\\!-width-one-quarter {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 25% !important;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/overrides/_width.scss"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,kCAAkC;;AAElC,4CAA4C;AAC5C;EACE;IACE,sBAAsB;EACxB;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;AACF","file":"_width.scss","sourcesContent":["@import \"../tools/exports\";\n@import \"../helpers/media-queries\";\n\n// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/width\") {\n .govuk-\\!-width-full {\n width: 100% !important;\n }\n\n .govuk-\\!-width-three-quarters {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 75% !important;\n }\n }\n\n .govuk-\\!-width-two-thirds {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 66.66% !important;\n }\n }\n\n .govuk-\\!-width-one-half {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 50% !important;\n }\n }\n\n .govuk-\\!-width-one-third {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 33.33% !important;\n }\n }\n\n .govuk-\\!-width-one-quarter {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 25% !important;\n }\n }\n}\n"]}
|
|
@@ -50,6 +50,15 @@ $govuk-fonts-path: "#{$govuk-assets-path}fonts/" !default;
|
|
|
50
50
|
///
|
|
51
51
|
/// $govuk-image-url-function: 'my-url-handler';
|
|
52
52
|
///
|
|
53
|
+
/// @example scss - From an external module
|
|
54
|
+
///
|
|
55
|
+
/// @use "sass:meta";
|
|
56
|
+
/// // Include the module containing the handler function
|
|
57
|
+
/// @use "url-handlers";
|
|
58
|
+
///
|
|
59
|
+
/// // Then pass the handler function using `meta.get-function`
|
|
60
|
+
/// $govuk-image-url-function: meta.get-function("image-url", $module: "url-handlers");
|
|
61
|
+
///
|
|
53
62
|
/// @access public
|
|
54
63
|
|
|
55
64
|
$govuk-image-url-function: false !default;
|
|
@@ -77,6 +86,15 @@ $govuk-image-url-function: false !default;
|
|
|
77
86
|
///
|
|
78
87
|
/// $govuk-font-url-function: 'my-url-handler';
|
|
79
88
|
///
|
|
89
|
+
/// @example scss - From an external module
|
|
90
|
+
///
|
|
91
|
+
/// @use "sass:meta";
|
|
92
|
+
/// // Include the module containing the handler function
|
|
93
|
+
/// @use "url-handlers";
|
|
94
|
+
///
|
|
95
|
+
/// // Then pass the handler function using `meta.get-function`
|
|
96
|
+
/// $govuk-font-url-function: meta.get-function("font-url", $module: "url-handlers");
|
|
97
|
+
///
|
|
80
98
|
/// @access public
|
|
81
99
|
|
|
82
100
|
$govuk-font-url-function: false !default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/settings/_assets.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;;AAEH,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sBAAsB;AACtB,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,uCAAuC;;AAEvC,kDAAkD;AAClD,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,2DAA2D;;AAE3D,iDAAiD;AACjD,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,yDAAyD;;AAEzD,4BAA4B;AAC5B,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,eAAe;AACf,EAAE;AACF,uCAAuC;AACvC,4CAA4C;AAC5C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,0CAA0C;AAC1C,kCAAkC;AAClC,kCAAkC;AAClC,MAAM;AACN,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,iBAAiB;;AAEjB,yCAAyC;;AAEzC,2BAA2B;AAC3B,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,eAAe;AACf,EAAE;AACF,uCAAuC;AACvC,0CAA0C;AAC1C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,0CAA0C;AAC1C,kCAAkC;AAClC,mCAAmC;AACnC,MAAM;AACN,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,iBAAiB;;AAEjB,wCAAwC","file":"_assets.scss","sourcesContent":["////\n/// @group settings/assets\n////\n\n/// Path to the assets directory, with trailing slash.\n///\n/// This is the directory where the images and fonts subdirectories live. You\n/// will need to make this directory available via your application – see the\n/// README for details.\n///\n/// @type String\n/// @access public\n\n$govuk-assets-path: \"/assets/\" !default;\n\n/// Path to the images folder, with trailing slash.\n///\n/// @type String\n/// @access public\n\n$govuk-images-path: \"#{$govuk-assets-path}images/\" !default;\n\n/// Path to the fonts folder, with trailing slash.\n///\n/// @type String\n/// @access public\n\n$govuk-fonts-path: \"#{$govuk-assets-path}fonts/\" !default;\n\n/// Custom image URL function\n///\n/// If the built-in image URL helper does not meet your needs, you can specify\n/// the name of a custom handler – either built in or by writing your own\n/// function.\n///\n/// If you are writing your own handler, ensure that it returns a string wrapped\n/// with `url()`\n///\n/// @type String\n///\n/// @example scss - Rails asset handling\n/// $govuk-image-url-function: 'image-url';\n///\n/// @example scss - Custom asset handling\n///\n/// @function my-url-handler($filename) {\n/// // Some custom URL handling\n/// @return url('example.jpg');\n/// }\n///\n/// $govuk-image-url-function: 'my-url-handler';\n///\n/// @access public\n\n$govuk-image-url-function: false !default;\n\n/// Custom font URL function\n///\n/// If the built-in font URL helper does not meet your needs, you can specify\n/// the name of a custom handler – either built in or by writing your own\n/// function.\n///\n/// If you are writing your own handler, ensure that it returns a string wrapped\n/// with `url()`\n///\n/// @type String\n///\n/// @example scss - Rails asset handling\n/// $govuk-font-url-function: 'font-url';\n///\n/// @example scss - Custom asset handling\n///\n/// @function my-url-handler($filename) {\n/// // Some custom URL handling\n/// @return url('example.woff');\n/// }\n///\n/// $govuk-font-url-function: 'my-url-handler';\n///\n/// @access public\n\n$govuk-font-url-function: false !default;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/settings/_assets.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;;AAEH,qDAAqD;AACrD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sBAAsB;AACtB,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,uCAAuC;;AAEvC,kDAAkD;AAClD,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,2DAA2D;;AAE3D,iDAAiD;AACjD,EAAE;AACF,eAAe;AACf,iBAAiB;;AAEjB,yDAAyD;;AAEzD,4BAA4B;AAC5B,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,eAAe;AACf,EAAE;AACF,uCAAuC;AACvC,4CAA4C;AAC5C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,0CAA0C;AAC1C,kCAAkC;AAClC,kCAAkC;AAClC,MAAM;AACN,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,sBAAsB;AACtB,0DAA0D;AAC1D,yBAAyB;AACzB,EAAE;AACF,gEAAgE;AAChE,wFAAwF;AACxF,EAAE;AACF,iBAAiB;;AAEjB,yCAAyC;;AAEzC,2BAA2B;AAC3B,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,eAAe;AACf,EAAE;AACF,uCAAuC;AACvC,0CAA0C;AAC1C,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,0CAA0C;AAC1C,kCAAkC;AAClC,mCAAmC;AACnC,MAAM;AACN,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,sBAAsB;AACtB,0DAA0D;AAC1D,yBAAyB;AACzB,EAAE;AACF,gEAAgE;AAChE,sFAAsF;AACtF,EAAE;AACF,iBAAiB;;AAEjB,wCAAwC","file":"_assets.scss","sourcesContent":["////\n/// @group settings/assets\n////\n\n/// Path to the assets directory, with trailing slash.\n///\n/// This is the directory where the images and fonts subdirectories live. You\n/// will need to make this directory available via your application – see the\n/// README for details.\n///\n/// @type String\n/// @access public\n\n$govuk-assets-path: \"/assets/\" !default;\n\n/// Path to the images folder, with trailing slash.\n///\n/// @type String\n/// @access public\n\n$govuk-images-path: \"#{$govuk-assets-path}images/\" !default;\n\n/// Path to the fonts folder, with trailing slash.\n///\n/// @type String\n/// @access public\n\n$govuk-fonts-path: \"#{$govuk-assets-path}fonts/\" !default;\n\n/// Custom image URL function\n///\n/// If the built-in image URL helper does not meet your needs, you can specify\n/// the name of a custom handler – either built in or by writing your own\n/// function.\n///\n/// If you are writing your own handler, ensure that it returns a string wrapped\n/// with `url()`\n///\n/// @type String\n///\n/// @example scss - Rails asset handling\n/// $govuk-image-url-function: 'image-url';\n///\n/// @example scss - Custom asset handling\n///\n/// @function my-url-handler($filename) {\n/// // Some custom URL handling\n/// @return url('example.jpg');\n/// }\n///\n/// $govuk-image-url-function: 'my-url-handler';\n///\n/// @example scss - From an external module\n///\n/// @use \"sass:meta\";\n/// // Include the module containing the handler function\n/// @use \"url-handlers\";\n///\n/// // Then pass the handler function using `meta.get-function`\n/// $govuk-image-url-function: meta.get-function(\"image-url\", $module: \"url-handlers\");\n///\n/// @access public\n\n$govuk-image-url-function: false !default;\n\n/// Custom font URL function\n///\n/// If the built-in font URL helper does not meet your needs, you can specify\n/// the name of a custom handler – either built in or by writing your own\n/// function.\n///\n/// If you are writing your own handler, ensure that it returns a string wrapped\n/// with `url()`\n///\n/// @type String\n///\n/// @example scss - Rails asset handling\n/// $govuk-font-url-function: 'font-url';\n///\n/// @example scss - Custom asset handling\n///\n/// @function my-url-handler($filename) {\n/// // Some custom URL handling\n/// @return url('example.woff');\n/// }\n///\n/// $govuk-font-url-function: 'my-url-handler';\n///\n/// @example scss - From an external module\n///\n/// @use \"sass:meta\";\n/// // Include the module containing the handler function\n/// @use \"url-handlers\";\n///\n/// // Then pass the handler function using `meta.get-function`\n/// $govuk-font-url-function: meta.get-function(\"font-url\", $module: \"url-handlers\");\n///\n/// @access public\n\n$govuk-font-url-function: false !default;\n"]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
////
|
|
2
2
|
/// @group settings/colours
|
|
3
3
|
////
|
|
4
|
+
@use "sass:list";
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "sass:meta";
|
|
4
7
|
|
|
5
|
-
@import "../
|
|
8
|
+
@import "../settings/warnings";
|
|
6
9
|
|
|
7
10
|
/// Default definitions of the functional colours
|
|
8
11
|
///
|
|
@@ -99,6 +102,27 @@ $govuk-default-functional-colours: (
|
|
|
99
102
|
)
|
|
100
103
|
);
|
|
101
104
|
|
|
105
|
+
/// Validates and merges functional colour overrides with defaults.
|
|
106
|
+
///
|
|
107
|
+
/// Throws an error if any provided colour name does not exist in the default
|
|
108
|
+
/// functional colours map.
|
|
109
|
+
///
|
|
110
|
+
/// @param {Map} $colours Functional colour overrides.
|
|
111
|
+
/// @param {Map} $defaults Default functional colours.
|
|
112
|
+
/// @return {Map} Merged functional colours.
|
|
113
|
+
/// @access private
|
|
114
|
+
@function _govuk-define-functional-colours($colours, $defaults) {
|
|
115
|
+
$existing-colours: map.keys($defaults);
|
|
116
|
+
|
|
117
|
+
@each $colour-name, $colour in $colours {
|
|
118
|
+
@if not list.index($existing-colours, $colour-name) {
|
|
119
|
+
@error 'Unknown colour `#{$colour-name}` (available colours: #{$existing-colours})';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@return map.merge($defaults, $colours);
|
|
124
|
+
}
|
|
125
|
+
|
|
102
126
|
/// Functional colours for the GOV.UK palette.
|
|
103
127
|
///
|
|
104
128
|
/// Each functional colour is represented by a name (for example `'brand'`) to
|
|
@@ -156,14 +180,14 @@ $_govuk-deprecated-applied-colour-variables: () !default;
|
|
|
156
180
|
/// @param {String} Name of variable to check
|
|
157
181
|
/// @access private
|
|
158
182
|
@mixin _warn-if-applied-colour-variable-set($functional-colour-name) {
|
|
159
|
-
@if not index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {
|
|
160
|
-
@if variable-exists("govuk-#{$functional-colour-name}-colour") {
|
|
183
|
+
@if not list.index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {
|
|
184
|
+
@if meta.variable-exists("govuk-#{$functional-colour-name}-colour") {
|
|
161
185
|
$deprecation-message: "Setting \`$govuk-#{$functional-colour-name}-colour\` no longer has any effect. Use \`$govuk-functional-colours: (#{$functional-colour-name}: <NEW_COLOUR_VALUE>);\` instead.";
|
|
162
186
|
|
|
163
187
|
@include _warning("applied-colour-variables", $deprecation-message);
|
|
164
188
|
}
|
|
165
189
|
|
|
166
|
-
$_govuk-deprecated-applied-colour-variables: append(
|
|
190
|
+
$_govuk-deprecated-applied-colour-variables: list.append(
|
|
167
191
|
$_govuk-deprecated-applied-colour-variables,
|
|
168
192
|
$functional-colour-name
|
|
169
193
|
) !global;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/settings/_colours-functional.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,0BAA0B;AAC1B,GAAG;;AAE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AAChB,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,yDAAyD;AACzD,qDAAqD;;AAErD,2DAA2D;AAC3D,sBAAsB;AACtB,EAAE;AACF,oCAAoC;AACpC,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,+DAA+D;AAC/D,iEAAiE;;AAEjE,oDAAoD;AACpD,qBAAqB;AACrB,EAAE;AACF,yCAAyC;AACzC,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,wDAAwD;AACxD,mDAAmD;;AAEnD,mDAAmD;AACnD,cAAc;AACd,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,uDAAuD;AACvD,iDAAiD;;AAEjD,2DAA2D;AAC3D,sBAAsB;AACtB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,+DAA+D;AAC/D,iEAAiE;;AAEjE,yDAAyD;AACzD,oBAAoB;AACpB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,6DAA6D;AAC7D,6DAA6D;;AAE7D,0DAA0D;AAC1D,qBAAqB;AACrB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,8DAA8D;AAC9D,+DAA+D","file":"_colours-functional.scss","sourcesContent":["////\n/// @group settings/colours\n////\n\n@import \"../helpers/colour\";\n\n/// Default definitions of the functional colours\n///\n/// @type Map\n///\n/// @see {variable} $govuk-functional-colours\n///\n/// @access public\n$govuk-default-functional-colours: (\n (\n \"brand\": (\n name: \"blue\"\n ),\n \"text\": (\n name: \"black\"\n ),\n // The background colour of the template. This is intended to be the same\n // as `surface-background` for the purposes of making the Footer and Cookie\n // banner components merge seamlessly with the template.\n \"template-background\": (\n name: \"blue\",\n variant: \"tint-95\"\n ),\n \"body-background\": (\n name: \"white\"\n ),\n // Use 'true black' to avoid printers using colour ink to print body text\n \"print-text\": #000000,\n // Used in for example 'muted' text and help text.\n \"secondary-text\": (\n name: \"black\",\n variant: \"tint-25\"\n ),\n // Used for outline (and background, where appropriate) when interactive\n // elements (links, form controls) have keyboard focus.\n \"focus\": (\n name: \"yellow\"\n ),\n // Ensure that the contrast between the text and background colour passes\n // WCAG Level AA contrast requirements.\n \"focus-text\": (\n name: \"black\"\n ),\n // Used to highlight error messages and form controls in an error state\n \"error\": (\n name: \"red\"\n ),\n // Used to highlight success messages and banners\n \"success\": (\n name: \"green\"\n ),\n // Used in for example borders, separators, rules and keylines.\n \"border\": (\n name: \"black\",\n variant: \"tint-80\"\n ),\n // Used for form inputs and controls\n \"input-border\": (\n name: \"black\"\n ),\n // Used for hover states on form controls\n \"hover\": (\n name: \"black\",\n variant: \"tint-80\"\n ),\n // Standard links (on white)\n \"link\": (\n name: \"blue\",\n variant: \"shade-10\"\n ),\n \"link-visited\": (\n name: \"purple\"\n ),\n \"link-hover\": (\n name: \"blue\",\n variant: \"shade-50\"\n ),\n \"link-active\": (\n name: \"black\"\n ),\n // 'Surfaces' are our name for components that have different colour\n // palettes to typical page content. This is the generic surface.\n \"surface-background\": (\n name: \"blue\",\n variant: \"tint-95\"\n ),\n \"surface-text\": (\n name: \"black\"\n ),\n \"surface-border\": (\n name: \"blue\",\n variant: \"tint-50\"\n )\n )\n);\n\n/// Functional colours for the GOV.UK palette.\n///\n/// Each functional colour is represented by a name (for example `'brand'`) to\n/// which the map associates either:\n///\n/// - a Sass colour (like `#1d70b8`)\n/// - a Sass map with a `name` and an optional `variant` properties, referring\n/// to one of the colours in the colour palette (like `(name: 'blue',\n/// variant: 'primary')`). `variant` defaults to `'primary'` if omitted.\n///\n/// Use the `govuk-functional-colour` function to access these colours.\n///\n/// Customise functional colours by defining $govuk-functional-colours with a\n/// map of the colours that you want to change before importing GOV.UK Frontend.\n/// These will then be merged with the default colours. You can only redefine\n/// existing colours.\n///\n/// @example scss – Redefining functional colours by setting them before import\n///\n/// // These will be merged with the default functional colours\n/// $govuk-functional-colours: (\n/// // set the 'brand' colour to the 'primary' variant of 'purple'\n/// brand: (name: 'purple'),\n/// // set the 'template-background' colour to the 'tint-95' variant of 'purple'\n/// template-background: (name: 'purple', variant: 'tint-95'),\n/// // set the 'text' colour to an arbitrary colour `#221133`\n/// text: #221133\n/// );\n///\n/// @see {function} govuk-functional-colour\n///\n/// @type Map\n///\n/// @access public\n$govuk-functional-colours: $govuk-default-functional-colours !default;\n$govuk-functional-colours: _govuk-define-functional-colours(\n $govuk-functional-colours,\n $defaults: $govuk-default-functional-colours\n);\n\n// =============================================================================\n// Legacy variables\n//\n// To help migrate to `govuk-functional-colour`, we're keeping the variables\n// which were previously storing the functional colours. This should reduce\n// breakage as teams upgrade\n// =============================================================================\n\n// Because the file may be imported multiple times, subsequent imports will see\n// the legacy variable and warn when they shouldn't so we need to track those\n$_govuk-deprecated-applied-colour-variables: () !default;\n\n/// Warn if a given legacy applied colour variable is set\n///\n/// @param {String} Name of variable to check\n/// @access private\n@mixin _warn-if-applied-colour-variable-set($functional-colour-name) {\n @if not index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {\n @if variable-exists(\"govuk-#{$functional-colour-name}-colour\") {\n $deprecation-message: \"Setting \\`$govuk-#{$functional-colour-name}-colour\\` no longer has any effect. Use \\`$govuk-functional-colours: (#{$functional-colour-name}: <NEW_COLOUR_VALUE>);\\` instead.\";\n\n @include _warning(\"applied-colour-variables\", $deprecation-message);\n }\n\n $_govuk-deprecated-applied-colour-variables: append(\n $_govuk-deprecated-applied-colour-variables,\n $functional-colour-name\n ) !global;\n }\n}\n\n@include _warn-if-applied-colour-variable-set(brand);\n/// Brand colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(brand)`.\n$govuk-brand-colour: govuk-functional-colour(brand);\n\n@include _warn-if-applied-colour-variable-set(text);\n/// Text colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(text)`.\n$govuk-text-colour: govuk-functional-colour(text);\n\n@include _warn-if-applied-colour-variable-set(template-background);\n/// Template background colour\n///\n/// Used by components that want to give the illusion of extending\n/// the template background (such as the footer and cookie banner).\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(template-background)`.\n$govuk-template-background-colour: govuk-functional-colour(template-background);\n\n@include _warn-if-applied-colour-variable-set(body-background);\n/// Body background colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(body-background)`.\n$govuk-body-background-colour: govuk-functional-colour(body-background);\n\n@include _warn-if-applied-colour-variable-set(print-text);\n/// Text colour for print media\n///\n/// Use 'true black' to avoid printers using colour ink to print body text\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(print-text)`.\n$govuk-print-text-colour: govuk-functional-colour(print-text);\n\n@include _warn-if-applied-colour-variable-set(secondary-text);\n/// Secondary text colour\n///\n/// Used in for example 'muted' text and help text.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(secondary-text)`.\n$govuk-secondary-text-colour: govuk-functional-colour(secondary-text);\n\n@include _warn-if-applied-colour-variable-set(focus);\n/// Focus colour\n///\n/// Used for outline (and background, where appropriate) when interactive\n/// elements (links, form controls) have keyboard focus.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(focus)`.\n$govuk-focus-colour: govuk-functional-colour(focus);\n\n@include _warn-if-applied-colour-variable-set(focus-text);\n/// Focused text colour\n///\n/// Ensure that the contrast between the text and background colour passes\n/// WCAG Level AA contrast requirements.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(focus-text)`.\n$govuk-focus-text-colour: govuk-functional-colour(focus-text);\n\n@include _warn-if-applied-colour-variable-set(error);\n/// Error colour\n///\n/// Used to highlight error messages and form controls in an error state\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(error)`.\n$govuk-error-colour: govuk-functional-colour(error);\n\n@include _warn-if-applied-colour-variable-set(success);\n/// Success colour\n///\n/// Used to highlight success messages and banners\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(error)`.\n$govuk-success-colour: govuk-functional-colour(success);\n\n@include _warn-if-applied-colour-variable-set(border);\n/// Border colour\n///\n/// Used in for example borders, separators, rules and keylines.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(border)`.\n$govuk-border-colour: govuk-functional-colour(border);\n\n@include _warn-if-applied-colour-variable-set(input-border);\n/// Input border colour\n///\n/// Used for form inputs and controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(input-border)`.\n$govuk-input-border-colour: govuk-functional-colour(input-border);\n\n@include _warn-if-applied-colour-variable-set(hover);\n/// Input hover colour\n///\n/// Used for hover states on form controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(hover)`.\n$govuk-hover-colour: govuk-functional-colour(hover);\n\n@include _warn-if-applied-colour-variable-set(link);\n/// Link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link)`.\n$govuk-link-colour: govuk-functional-colour(link);\n\n@include _warn-if-applied-colour-variable-set(link-visited);\n/// Visited link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-visited)`.\n$govuk-link-visited-colour: govuk-functional-colour(link-visited);\n\n@include _warn-if-applied-colour-variable-set(link-hover);\n/// Link hover colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-hover)`.\n$govuk-link-hover-colour: govuk-functional-colour(link-hover);\n\n@include _warn-if-applied-colour-variable-set(link-active);\n/// Active link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-active)`.\n$govuk-link-active-colour: govuk-functional-colour(link-active);\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/settings/_colours-functional.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,0BAA0B;AAC1B,GAAG;AACH,gBAAgB;AAChB,eAAe;AACf,gBAAgB;;AAEhB,8BAA8B;;AAE9B,gDAAgD;AAChD,EAAE;AACF,YAAY;AACZ,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,iBAAiB;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFC;;AAED,kEAAkE;AAClE,EAAE;AACF,4EAA4E;AAC5E,0BAA0B;AAC1B,EAAE;AACF,qDAAqD;AACrD,qDAAqD;AACrD,2CAA2C;AAC3C,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2D;AAC3D,sBAAsB;AACtB,EAAE;AACF,oCAAoC;AACpC,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,+DAA+D;AAC/D,iEAAiE;;AAEjE,oDAAoD;AACpD,qBAAqB;AACrB,EAAE;AACF,yCAAyC;AACzC,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,wDAAwD;AACxD,mDAAmD;;AAEnD,mDAAmD;AACnD,cAAc;AACd,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,uDAAuD;AACvD,iDAAiD;;AAEjD,2DAA2D;AAC3D,sBAAsB;AACtB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,+DAA+D;AAC/D,iEAAiE;;AAEjE,yDAAyD;AACzD,oBAAoB;AACpB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,6DAA6D;AAC7D,6DAA6D;;AAE7D,0DAA0D;AAC1D,qBAAqB;AACrB,EAAE;AACF,eAAe;AACf,iBAAiB;AACjB,cAAc;AACd,2FAA2F;AAC3F,8DAA8D;AAC9D,+DAA+D","file":"_colours-functional.scss","sourcesContent":["////\n/// @group settings/colours\n////\n@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n\n@import \"../settings/warnings\";\n\n/// Default definitions of the functional colours\n///\n/// @type Map\n///\n/// @see {variable} $govuk-functional-colours\n///\n/// @access public\n$govuk-default-functional-colours: (\n (\n \"brand\": (\n name: \"blue\"\n ),\n \"text\": (\n name: \"black\"\n ),\n // The background colour of the template. This is intended to be the same\n // as `surface-background` for the purposes of making the Footer and Cookie\n // banner components merge seamlessly with the template.\n \"template-background\": (\n name: \"blue\",\n variant: \"tint-95\"\n ),\n \"body-background\": (\n name: \"white\"\n ),\n // Use 'true black' to avoid printers using colour ink to print body text\n \"print-text\": #000000,\n // Used in for example 'muted' text and help text.\n \"secondary-text\": (\n name: \"black\",\n variant: \"tint-25\"\n ),\n // Used for outline (and background, where appropriate) when interactive\n // elements (links, form controls) have keyboard focus.\n \"focus\": (\n name: \"yellow\"\n ),\n // Ensure that the contrast between the text and background colour passes\n // WCAG Level AA contrast requirements.\n \"focus-text\": (\n name: \"black\"\n ),\n // Used to highlight error messages and form controls in an error state\n \"error\": (\n name: \"red\"\n ),\n // Used to highlight success messages and banners\n \"success\": (\n name: \"green\"\n ),\n // Used in for example borders, separators, rules and keylines.\n \"border\": (\n name: \"black\",\n variant: \"tint-80\"\n ),\n // Used for form inputs and controls\n \"input-border\": (\n name: \"black\"\n ),\n // Used for hover states on form controls\n \"hover\": (\n name: \"black\",\n variant: \"tint-80\"\n ),\n // Standard links (on white)\n \"link\": (\n name: \"blue\",\n variant: \"shade-10\"\n ),\n \"link-visited\": (\n name: \"purple\"\n ),\n \"link-hover\": (\n name: \"blue\",\n variant: \"shade-50\"\n ),\n \"link-active\": (\n name: \"black\"\n ),\n // 'Surfaces' are our name for components that have different colour\n // palettes to typical page content. This is the generic surface.\n \"surface-background\": (\n name: \"blue\",\n variant: \"tint-95\"\n ),\n \"surface-text\": (\n name: \"black\"\n ),\n \"surface-border\": (\n name: \"blue\",\n variant: \"tint-50\"\n )\n )\n);\n\n/// Validates and merges functional colour overrides with defaults.\n///\n/// Throws an error if any provided colour name does not exist in the default\n/// functional colours map.\n///\n/// @param {Map} $colours Functional colour overrides.\n/// @param {Map} $defaults Default functional colours.\n/// @return {Map} Merged functional colours.\n/// @access private\n@function _govuk-define-functional-colours($colours, $defaults) {\n $existing-colours: map.keys($defaults);\n\n @each $colour-name, $colour in $colours {\n @if not list.index($existing-colours, $colour-name) {\n @error 'Unknown colour `#{$colour-name}` (available colours: #{$existing-colours})';\n }\n }\n\n @return map.merge($defaults, $colours);\n}\n\n/// Functional colours for the GOV.UK palette.\n///\n/// Each functional colour is represented by a name (for example `'brand'`) to\n/// which the map associates either:\n///\n/// - a Sass colour (like `#1d70b8`)\n/// - a Sass map with a `name` and an optional `variant` properties, referring\n/// to one of the colours in the colour palette (like `(name: 'blue',\n/// variant: 'primary')`). `variant` defaults to `'primary'` if omitted.\n///\n/// Use the `govuk-functional-colour` function to access these colours.\n///\n/// Customise functional colours by defining $govuk-functional-colours with a\n/// map of the colours that you want to change before importing GOV.UK Frontend.\n/// These will then be merged with the default colours. You can only redefine\n/// existing colours.\n///\n/// @example scss – Redefining functional colours by setting them before import\n///\n/// // These will be merged with the default functional colours\n/// $govuk-functional-colours: (\n/// // set the 'brand' colour to the 'primary' variant of 'purple'\n/// brand: (name: 'purple'),\n/// // set the 'template-background' colour to the 'tint-95' variant of 'purple'\n/// template-background: (name: 'purple', variant: 'tint-95'),\n/// // set the 'text' colour to an arbitrary colour `#221133`\n/// text: #221133\n/// );\n///\n/// @see {function} govuk-functional-colour\n///\n/// @type Map\n///\n/// @access public\n$govuk-functional-colours: $govuk-default-functional-colours !default;\n$govuk-functional-colours: _govuk-define-functional-colours(\n $govuk-functional-colours,\n $defaults: $govuk-default-functional-colours\n);\n\n// =============================================================================\n// Legacy variables\n//\n// To help migrate to `govuk-functional-colour`, we're keeping the variables\n// which were previously storing the functional colours. This should reduce\n// breakage as teams upgrade\n// =============================================================================\n\n// Because the file may be imported multiple times, subsequent imports will see\n// the legacy variable and warn when they shouldn't so we need to track those\n$_govuk-deprecated-applied-colour-variables: () !default;\n\n/// Warn if a given legacy applied colour variable is set\n///\n/// @param {String} Name of variable to check\n/// @access private\n@mixin _warn-if-applied-colour-variable-set($functional-colour-name) {\n @if not list.index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {\n @if meta.variable-exists(\"govuk-#{$functional-colour-name}-colour\") {\n $deprecation-message: \"Setting \\`$govuk-#{$functional-colour-name}-colour\\` no longer has any effect. Use \\`$govuk-functional-colours: (#{$functional-colour-name}: <NEW_COLOUR_VALUE>);\\` instead.\";\n\n @include _warning(\"applied-colour-variables\", $deprecation-message);\n }\n\n $_govuk-deprecated-applied-colour-variables: list.append(\n $_govuk-deprecated-applied-colour-variables,\n $functional-colour-name\n ) !global;\n }\n}\n\n@include _warn-if-applied-colour-variable-set(brand);\n/// Brand colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(brand)`.\n$govuk-brand-colour: govuk-functional-colour(brand);\n\n@include _warn-if-applied-colour-variable-set(text);\n/// Text colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(text)`.\n$govuk-text-colour: govuk-functional-colour(text);\n\n@include _warn-if-applied-colour-variable-set(template-background);\n/// Template background colour\n///\n/// Used by components that want to give the illusion of extending\n/// the template background (such as the footer and cookie banner).\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(template-background)`.\n$govuk-template-background-colour: govuk-functional-colour(template-background);\n\n@include _warn-if-applied-colour-variable-set(body-background);\n/// Body background colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(body-background)`.\n$govuk-body-background-colour: govuk-functional-colour(body-background);\n\n@include _warn-if-applied-colour-variable-set(print-text);\n/// Text colour for print media\n///\n/// Use 'true black' to avoid printers using colour ink to print body text\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(print-text)`.\n$govuk-print-text-colour: govuk-functional-colour(print-text);\n\n@include _warn-if-applied-colour-variable-set(secondary-text);\n/// Secondary text colour\n///\n/// Used in for example 'muted' text and help text.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(secondary-text)`.\n$govuk-secondary-text-colour: govuk-functional-colour(secondary-text);\n\n@include _warn-if-applied-colour-variable-set(focus);\n/// Focus colour\n///\n/// Used for outline (and background, where appropriate) when interactive\n/// elements (links, form controls) have keyboard focus.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(focus)`.\n$govuk-focus-colour: govuk-functional-colour(focus);\n\n@include _warn-if-applied-colour-variable-set(focus-text);\n/// Focused text colour\n///\n/// Ensure that the contrast between the text and background colour passes\n/// WCAG Level AA contrast requirements.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(focus-text)`.\n$govuk-focus-text-colour: govuk-functional-colour(focus-text);\n\n@include _warn-if-applied-colour-variable-set(error);\n/// Error colour\n///\n/// Used to highlight error messages and form controls in an error state\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(error)`.\n$govuk-error-colour: govuk-functional-colour(error);\n\n@include _warn-if-applied-colour-variable-set(success);\n/// Success colour\n///\n/// Used to highlight success messages and banners\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(error)`.\n$govuk-success-colour: govuk-functional-colour(success);\n\n@include _warn-if-applied-colour-variable-set(border);\n/// Border colour\n///\n/// Used in for example borders, separators, rules and keylines.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(border)`.\n$govuk-border-colour: govuk-functional-colour(border);\n\n@include _warn-if-applied-colour-variable-set(input-border);\n/// Input border colour\n///\n/// Used for form inputs and controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(input-border)`.\n$govuk-input-border-colour: govuk-functional-colour(input-border);\n\n@include _warn-if-applied-colour-variable-set(hover);\n/// Input hover colour\n///\n/// Used for hover states on form controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(hover)`.\n$govuk-hover-colour: govuk-functional-colour(hover);\n\n@include _warn-if-applied-colour-variable-set(link);\n/// Link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link)`.\n$govuk-link-colour: govuk-functional-colour(link);\n\n@include _warn-if-applied-colour-variable-set(link-visited);\n/// Visited link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-visited)`.\n$govuk-link-visited-colour: govuk-functional-colour(link-visited);\n\n@include _warn-if-applied-colour-variable-set(link-hover);\n/// Link hover colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-hover)`.\n$govuk-link-hover-colour: govuk-functional-colour(link-hover);\n\n@include _warn-if-applied-colour-variable-set(link-active);\n/// Active link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n/// Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n/// function instead: `govuk-functional-colour(link-active)`.\n$govuk-link-active-colour: govuk-functional-colour(link-active);\n"]}
|