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
|
@@ -224,13 +224,13 @@
|
|
|
224
224
|
|
|
225
225
|
@mixin govuk-link-style-text {
|
|
226
226
|
&:link,
|
|
227
|
-
&:visited
|
|
228
|
-
|
|
227
|
+
&:visited,
|
|
228
|
+
&:active {
|
|
229
|
+
color: govuk-functional-colour(text);
|
|
229
230
|
}
|
|
230
231
|
|
|
231
|
-
&:active,
|
|
232
232
|
&:focus {
|
|
233
|
-
|
|
233
|
+
color: govuk-functional-colour(focus-text);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_links.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,uBAAuB;AACvB,GAAG;;AAEH,qBAAqB;AACrB,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;EAChC,8BAA8B;;EAE9B;IACE,oCAAoC;EACtC;;EAEA;IACE,2BAA2B;EAC7B;AACF;;AAEA,kBAAkB;AAClB,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,iBAAiB;AACjB;EACE,0BAA0B;;EAE1B;IACE,0DAA0D;EAC5D;;EAEA;IACE,mDAAmD;EACrD;AACF;;AAEA,wBAAwB;AACxB,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,gEAAgE;IACh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ACzE,8BAA8B;EAC9B;IACE,0CAA0C;EAC5C;AACF;;AAEA,8BAA8B;AAC9B,EAAE;AACF,0EAA0E;AAC1E,wBAAwB;AACxB,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,yCAAyC;AACzC,8CAA8C;AAC9C,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,qBAAqB;EACvB;AACF;;AAEA,kDAAkD;AAClD,EAAE;AACF,+EAA+E;AAC/E,oDAAoD;AACpD,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE;;;MAGE;QACE,4BAA4B;QAC5B,cAAc;;QAEd,mEAAmE;QACnE,gEAAgE;QAChE,oBAAoB;QACpB,qBAAqB;MACvB;IACF;EACF;AACF;;AAEA,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE,kDAAkD;EAClD,qBAAqB;;EAErB,2EAA2E;EAC3E,cAAc;;EAEd,2BAA2B;EAC3B,qBAAqB;;EAErB;IACE,0BAA0B;EAC5B;AACF","file":"_links.scss","sourcesContent":["////\n/// @group helpers/links\n////\n\n/// Common link styles\n///\n/// Provides the typography and focus state, regardless of link style.\n///\n/// @access public\n\n@mixin govuk-link-common {\n @include govuk-typography-common;\n @include govuk-link-decoration;\n\n &:hover {\n @include govuk-link-hover-decoration;\n }\n\n &:focus {\n @include govuk-focused-text;\n }\n}\n\n/// Link decoration\n///\n/// Provides the text decoration for links, including thickness and underline\n/// offset. Use this mixin only if you cannot use the `govuk-link-common` mixin.\n///\n/// @access public\n@mixin govuk-link-decoration {\n text-decoration: underline;\n\n @if $govuk-link-underline-thickness {\n text-decoration-thickness: $govuk-link-underline-thickness;\n }\n\n @if $govuk-link-underline-offset {\n text-underline-offset: $govuk-link-underline-offset;\n }\n}\n\n/// Link hover decoration\n///\n/// Provides the text decoration for links in their hover state, for you to use\n/// within a `:hover` pseudo-selector. Use this mixin only if you cannot use the\n/// `govuk-link-common` mixin.\n///\n/// @access public\n\n@mixin govuk-link-hover-decoration {\n @if $govuk-link-hover-underline-thickness {\n text-decoration-thickness: $govuk-link-hover-underline-thickness;\n // Disable ink skipping on underlines on hover. Browsers haven't\n // standardised on this part of the spec yet, so set both properties\n text-decoration-skip-ink: none; // Chromium, Firefox\n text-decoration-skip: none; // Safari\n }\n}\n\n/// Default link styles\n///\n/// Makes links use the default unvisited, visited, hover and active colours.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-default {\n &:link {\n color: govuk-functional-colour(link);\n }\n\n &:visited {\n color: govuk-functional-colour(link-visited);\n }\n\n &:hover {\n color: govuk-functional-colour(link-hover);\n }\n\n &:active {\n color: govuk-functional-colour(link-active);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Error link styles\n///\n/// Makes links use the error colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-error;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-error {\n &:link,\n &:visited {\n color: govuk-functional-colour(error);\n }\n\n &:hover {\n color: govuk-colour(\"red\", $variant: \"shade-50\");\n }\n\n &:active {\n color: govuk-functional-colour(error);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Success link styles\n///\n/// Makes links use the success colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-success;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-success {\n &:link,\n &:visited {\n color: govuk-functional-colour(success);\n }\n\n &:hover {\n color: govuk-colour(\"green\", $variant: \"shade-50\");\n }\n\n &:active {\n color: govuk-functional-colour(success);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Muted link styles\n///\n/// Makes links use the secondary text colour. The link will darken if it's\n/// active or a user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-muted;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-muted {\n &:link,\n &:visited {\n color: govuk-functional-colour(secondary-text);\n }\n\n &:hover,\n &:active {\n color: govuk-functional-colour(text);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Text link styles\n///\n/// Makes links use the primary text colour, in all states. Use this mixin for\n/// navigation components, such as breadcrumbs or the back link.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-text;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-text {\n &:link,\n &:visited {\n @include govuk-text-colour;\n }\n\n &:active,\n &:focus {\n @include govuk-text-colour;\n }\n}\n\n/// Inverse link styles\n///\n/// Makes links white, in all states. Use this mixin if you're displaying links\n/// against a dark background.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-inverse;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-inverse {\n &:link,\n &:visited {\n color: govuk-colour(\"white\");\n }\n\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Default link styles, without a visited state\n///\n/// Makes links use the default unvisited, hover and active colours, with no\n/// distinct visited state.\n///\n/// Use this mixin when it's not helpful to distinguish between visited and\n/// non-visited links. For example, when you link to pages with\n/// frequently-changing content, such as the dashboard for an admin interface.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-no-visited-state;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-visited-state {\n &:link {\n color: govuk-functional-colour(link);\n }\n\n &:visited {\n color: govuk-functional-colour(link);\n }\n\n &:hover {\n color: govuk-functional-colour(link-hover);\n }\n\n &:active {\n color: govuk-functional-colour(link-active);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Remove underline from links\n///\n/// Remove underlines from links unless the link is active or a user hovers\n/// their cursor over it.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// @include govuk-link-style-no-underline;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-underline {\n &:not(:hover):not(:active) {\n text-decoration: none;\n }\n}\n\n/// Include link destination when printing the page\n///\n/// If the user prints the page, add the destination URL after the link text, if\n/// the URL starts with `/`, `http://` or `https://`.\n///\n/// @access public\n\n@mixin govuk-link-print-friendly {\n @media print {\n &[href^=\"/\"],\n &[href^=\"http://\"],\n &[href^=\"https://\"] {\n &::after {\n content: \" (\" attr(href) \")\";\n font-size: 90%;\n\n // Because the URLs may be very long, ensure that they may be broken\n // at arbitrary points if there are no otherwise acceptable break\n // points in the line\n word-wrap: break-word;\n }\n }\n }\n}\n\n/// Image link styles\n///\n/// Prepares and provides the focus state for links that only contain images\n/// with no accompanying text.\n///\n/// @access public\n\n@mixin govuk-link-image {\n // Needed to draw the focus around the entire image\n display: inline-block;\n\n // Remove extra space at the bottom of the image that's added by line-height\n line-height: 0;\n\n // Don't render an underline\n text-decoration: none;\n\n &:focus {\n @include govuk-focused-box;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_links.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,uBAAuB;AACvB,GAAG;;AAEH,qBAAqB;AACrB,EAAE;AACF,qEAAqE;AACrE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;EAChC,8BAA8B;;EAE9B;IACE,oCAAoC;EACtC;;EAEA;IACE,2BAA2B;EAC7B;AACF;;AAEA,kBAAkB;AAClB,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,EAAE;AACF,iBAAiB;AACjB;EACE,0BAA0B;;EAE1B;IACE,0DAA0D;EAC5D;;EAEA;IACE,mDAAmD;EACrD;AACF;;AAEA,wBAAwB;AACxB,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,gEAAgE;IAChE,+DAA+D;IAC/D,mEAAmE;IACnE,sCAA8B;YAA9B,8BAA8B,EAAE,mBAAmB;IACnD,kCAA0B;YAA1B,0BAA0B,EAAE,QAAQ;EACtC;AACF;;AAEA,sBAAsB;AACtB,EAAE;AACF,4EAA4E;AAC5E,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,EAAE;AACF,gBAAgB;AAChB,6BAA6B;AAC7B,kCAAkC;AAClC,yCAAyC;AACzC,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE;IACE,oCAAoC;EACtC;;EAEA;IACE,4CAA4C;EAC9C;;EAEA;IACE,0CAA0C;EAC5C;;EAEA;IACE,2CAA2C;EAC7C;;EAEA,yEAAyE;EACzE,8BAA8B;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;IACF;EACF;AACF;;AAEA,oBAAoB;AACpB,EAAE;AACF,2EAA2E;AAC3E,6BAA6B;AAC7B,EAAE;AACF,iBAAiB;;AAEjB;EACE,kDAAkD;EAClD,qBAAqB;;EAErB,2EAA2E;EAC3E,cAAc;;EAEd,2BAA2B;EAC3B,qBAAqB;;EAErB;IACE,0BAA0B;EAC5B;AACF","file":"_links.scss","sourcesContent":["////\n/// @group helpers/links\n////\n\n/// Common link styles\n///\n/// Provides the typography and focus state, regardless of link style.\n///\n/// @access public\n\n@mixin govuk-link-common {\n @include govuk-typography-common;\n @include govuk-link-decoration;\n\n &:hover {\n @include govuk-link-hover-decoration;\n }\n\n &:focus {\n @include govuk-focused-text;\n }\n}\n\n/// Link decoration\n///\n/// Provides the text decoration for links, including thickness and underline\n/// offset. Use this mixin only if you cannot use the `govuk-link-common` mixin.\n///\n/// @access public\n@mixin govuk-link-decoration {\n text-decoration: underline;\n\n @if $govuk-link-underline-thickness {\n text-decoration-thickness: $govuk-link-underline-thickness;\n }\n\n @if $govuk-link-underline-offset {\n text-underline-offset: $govuk-link-underline-offset;\n }\n}\n\n/// Link hover decoration\n///\n/// Provides the text decoration for links in their hover state, for you to use\n/// within a `:hover` pseudo-selector. Use this mixin only if you cannot use the\n/// `govuk-link-common` mixin.\n///\n/// @access public\n\n@mixin govuk-link-hover-decoration {\n @if $govuk-link-hover-underline-thickness {\n text-decoration-thickness: $govuk-link-hover-underline-thickness;\n // Disable ink skipping on underlines on hover. Browsers haven't\n // standardised on this part of the spec yet, so set both properties\n text-decoration-skip-ink: none; // Chromium, Firefox\n text-decoration-skip: none; // Safari\n }\n}\n\n/// Default link styles\n///\n/// Makes links use the default unvisited, visited, hover and active colours.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-default {\n &:link {\n color: govuk-functional-colour(link);\n }\n\n &:visited {\n color: govuk-functional-colour(link-visited);\n }\n\n &:hover {\n color: govuk-functional-colour(link-hover);\n }\n\n &:active {\n color: govuk-functional-colour(link-active);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Error link styles\n///\n/// Makes links use the error colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-error;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-error {\n &:link,\n &:visited {\n color: govuk-functional-colour(error);\n }\n\n &:hover {\n color: govuk-colour(\"red\", $variant: \"shade-50\");\n }\n\n &:active {\n color: govuk-functional-colour(error);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Success link styles\n///\n/// Makes links use the success colour. The link will darken if it's active or a\n/// user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-success;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-success {\n &:link,\n &:visited {\n color: govuk-functional-colour(success);\n }\n\n &:hover {\n color: govuk-colour(\"green\", $variant: \"shade-50\");\n }\n\n &:active {\n color: govuk-functional-colour(success);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Muted link styles\n///\n/// Makes links use the secondary text colour. The link will darken if it's\n/// active or a user hovers their cursor over it.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-muted;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-muted {\n &:link,\n &:visited {\n color: govuk-functional-colour(secondary-text);\n }\n\n &:hover,\n &:active {\n color: govuk-functional-colour(text);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Text link styles\n///\n/// Makes links use the primary text colour, in all states. Use this mixin for\n/// navigation components, such as breadcrumbs or the back link.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-text;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-text {\n &:link,\n &:visited,\n &:active {\n color: govuk-functional-colour(text);\n }\n\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Inverse link styles\n///\n/// Makes links white, in all states. Use this mixin if you're displaying links\n/// against a dark background.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-inverse;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-inverse {\n &:link,\n &:visited {\n color: govuk-colour(\"white\");\n }\n\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Default link styles, without a visited state\n///\n/// Makes links use the default unvisited, hover and active colours, with no\n/// distinct visited state.\n///\n/// Use this mixin when it's not helpful to distinguish between visited and\n/// non-visited links. For example, when you link to pages with\n/// frequently-changing content, such as the dashboard for an admin interface.\n///\n/// If you use this mixin in a component, you must also include the\n/// `govuk-link-common` mixin to get the correct focus and hover states.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-no-visited-state;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-visited-state {\n &:link {\n color: govuk-functional-colour(link);\n }\n\n &:visited {\n color: govuk-functional-colour(link);\n }\n\n &:hover {\n color: govuk-functional-colour(link-hover);\n }\n\n &:active {\n color: govuk-functional-colour(link-active);\n }\n\n // When focussed, the text colour needs to be darker to ensure that colour\n // contrast is still acceptable\n &:focus {\n color: govuk-functional-colour(focus-text);\n }\n}\n\n/// Remove underline from links\n///\n/// Remove underlines from links unless the link is active or a user hovers\n/// their cursor over it.\n///\n/// @example scss\n/// .govuk-component__link {\n/// @include govuk-link-common;\n/// @include govuk-link-style-default;\n/// @include govuk-link-style-no-underline;\n/// }\n///\n/// @access public\n\n@mixin govuk-link-style-no-underline {\n &:not(:hover):not(:active) {\n text-decoration: none;\n }\n}\n\n/// Include link destination when printing the page\n///\n/// If the user prints the page, add the destination URL after the link text, if\n/// the URL starts with `/`, `http://` or `https://`.\n///\n/// @access public\n\n@mixin govuk-link-print-friendly {\n @media print {\n &[href^=\"/\"],\n &[href^=\"http://\"],\n &[href^=\"https://\"] {\n &::after {\n content: \" (\" attr(href) \")\";\n font-size: 90%;\n\n // Because the URLs may be very long, ensure that they may be broken\n // at arbitrary points if there are no otherwise acceptable break\n // points in the line\n word-wrap: break-word;\n }\n }\n }\n}\n\n/// Image link styles\n///\n/// Prepares and provides the focus state for links that only contain images\n/// with no accompanying text.\n///\n/// @access public\n\n@mixin govuk-link-image {\n // Needed to draw the focus around the entire image\n display: inline-block;\n\n // Remove extra space at the bottom of the image that's added by line-height\n line-height: 0;\n\n // Don't render an underline\n text-decoration: none;\n\n &:focus {\n @include govuk-focused-box;\n }\n}\n"]}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
////
|
|
2
2
|
/// @group helpers/layout
|
|
3
3
|
////
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
@use "sass:string";
|
|
4
8
|
|
|
5
9
|
@import "../settings/media-queries";
|
|
6
10
|
@import "../tools/px-to-em";
|
|
@@ -41,9 +45,9 @@
|
|
|
41
45
|
|
|
42
46
|
@function govuk-breakpoint-value($value, $breakpoints: $govuk-breakpoints) {
|
|
43
47
|
// If $value is a number
|
|
44
|
-
@if type-of($value) == "number" {
|
|
48
|
+
@if meta.type-of($value) == "number" {
|
|
45
49
|
// If the number is unitless, coerce it into a pixel value
|
|
46
|
-
@if unitless($value) {
|
|
50
|
+
@if math.is-unitless($value) {
|
|
47
51
|
$value: $value * 1px;
|
|
48
52
|
}
|
|
49
53
|
|
|
@@ -52,8 +56,8 @@
|
|
|
52
56
|
|
|
53
57
|
// If $value is a string and exists as a key in in $breakpoints,
|
|
54
58
|
// look up and use the value of it
|
|
55
|
-
@if type-of($value) == "string" and map
|
|
56
|
-
@return map
|
|
59
|
+
@if meta.type-of($value) == "string" and map.has-key($breakpoints, $value) {
|
|
60
|
+
@return map.get($breakpoints, $value);
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
// If we get this far, we can't use the value, so return an error
|
|
@@ -97,7 +101,7 @@
|
|
|
97
101
|
@function govuk-from-breakpoint($from, $breakpoints: $govuk-breakpoints) {
|
|
98
102
|
$value: govuk-breakpoint-value($from, $breakpoints);
|
|
99
103
|
|
|
100
|
-
@if type-of($value) == "number" and unit($value) == "px" {
|
|
104
|
+
@if meta.type-of($value) == "number" and math.unit($value) == "px" {
|
|
101
105
|
$value: govuk-em($value);
|
|
102
106
|
}
|
|
103
107
|
|
|
@@ -142,13 +146,13 @@
|
|
|
142
146
|
@function govuk-until-breakpoint($until, $breakpoints: $govuk-breakpoints) {
|
|
143
147
|
$value: govuk-breakpoint-value($until, $breakpoints);
|
|
144
148
|
|
|
145
|
-
@if type-of($value) == "number" and unit($value) == "px" {
|
|
149
|
+
@if meta.type-of($value) == "number" and math.unit($value) == "px" {
|
|
146
150
|
// If it's a pixel value, convert it to ems.
|
|
147
151
|
$value: govuk-em($value);
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
// If $value derives from a named breakpoint, additionally subtract .01em
|
|
151
|
-
@if type-of($until) != "number" and unit($value) == "em" {
|
|
155
|
+
@if meta.type-of($until) != "number" and math.unit($value) == "em" {
|
|
152
156
|
$value: $value - 0.01em;
|
|
153
157
|
}
|
|
154
158
|
|
|
@@ -191,26 +195,24 @@
|
|
|
191
195
|
|
|
192
196
|
@mixin govuk-media-query($from: null, $until: null, $and: null, $media-type: "all", $breakpoints: $govuk-breakpoints) {
|
|
193
197
|
$media-query: "";
|
|
194
|
-
$min-width: if($from, govuk-from-breakpoint($from, $breakpoints), null);
|
|
195
|
-
$max-width: if($until, govuk-until-breakpoint($until, $breakpoints), null);
|
|
196
198
|
|
|
197
199
|
// Assemble the media query string
|
|
198
200
|
@if $media-type != "all" {
|
|
199
201
|
$media-query: "#{$media-type}";
|
|
200
202
|
}
|
|
201
|
-
@if $
|
|
202
|
-
$media-query: "#{$media-query} and #{$
|
|
203
|
+
@if $from {
|
|
204
|
+
$media-query: "#{$media-query} and #{govuk-from-breakpoint($from, $breakpoints)}";
|
|
203
205
|
}
|
|
204
|
-
@if $
|
|
205
|
-
$media-query: "#{$media-query} and #{$
|
|
206
|
+
@if $until {
|
|
207
|
+
$media-query: "#{$media-query} and #{govuk-until-breakpoint($until, $breakpoints)}";
|
|
206
208
|
}
|
|
207
209
|
@if $and {
|
|
208
210
|
$media-query: "#{$media-query} and #{$and}";
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
// If $media-query currently begins with an orphaned ' and ', remove it.
|
|
212
|
-
@if
|
|
213
|
-
$media-query:
|
|
214
|
+
@if string.index($media-query, " and ") == 1 {
|
|
215
|
+
$media-query: string.slice($media-query, 6);
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
@media #{$media-query} {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_media-queries.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;
|
|
1
|
+
{"version":3,"sources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C;EAC7C;;EAEA,uEAAuE;EACvE;IACE,2CAA2C;EAC7C;;EAEA;IACE,QAAQ;EACV;AACF","file":"_media-queries.scss","sourcesContent":["////\n/// @group helpers/layout\n////\n@use \"sass:map\";\n@use \"sass:math\";\n@use \"sass:meta\";\n@use \"sass:string\";\n\n@import \"../settings/media-queries\";\n@import \"../tools/px-to-em\";\n\n// =========================================================\n// Helpers\n// =========================================================\n\n/// Get the value of a breakpoint by name.\n///\n/// @param {String | Number} $value - If a string, the name of a breakpoint\n/// in $breakpoints. If a number without units, it will convert to px. If a\n/// number with units, it will return the value unaltered.\n/// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $value.\n/// @returns {Number} - The set (minimum) value of the breakpoint\n///\n/// @example scss\n/// .element {\n/// width: govuk-breakpoint-value(tablet);\n/// @media (min-width: #{govuk-breakpoint-value(desktop)}) {\n/// color: red;\n/// }\n/// @media (min-width: #{govuk-breakpoint-value(400px)}) {\n/// color: green;\n/// }\n/// $custom-breakpoint-map: (\n/// small: 350px,\n/// medium: 769px,\n/// large: 1100px,\n/// extra-large: 1600px\n/// );\n/// @media (orientation: landscape) and (min-width: #{govuk-breakpoint-value(extra-large, $custom-breakpoint-map)}) {\n/// color: blue;\n/// }\n/// }\n///\n/// @access public\n\n@function govuk-breakpoint-value($value, $breakpoints: $govuk-breakpoints) {\n // If $value is a number\n @if meta.type-of($value) == \"number\" {\n // If the number is unitless, coerce it into a pixel value\n @if math.is-unitless($value) {\n $value: $value * 1px;\n }\n\n @return $value;\n }\n\n // If $value is a string and exists as a key in in $breakpoints,\n // look up and use the value of it\n @if meta.type-of($value) == \"string\" and map.has-key($breakpoints, $value) {\n @return map.get($breakpoints, $value);\n }\n\n // If we get this far, we can't use the value, so return an error\n @error \"Could not find a breakpoint given `#{$value}`.\";\n}\n\n/// Generate the `min-width` segment of a media query given a breakpoint key\n///\n/// Pixel values are converted to ems for backwards compatibility with\n/// sass-mq. Unlike sass-mq, non-px and em values can be used as well.\n///\n/// @param {String | Number} $from - If a string, expects the name of a\n/// breakpoint in $breakpoints. If a number, it will use that number.\n/// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $from.\n/// @returns {String} - A `min-width` media query segment\n///\n/// @example scss\n/// .example {\n/// @media #{govuk-from-breakpoint(tablet)} {\n/// color: red;\n/// }\n/// @media #{govuk-from-breakpoint(30em)} {\n/// color: green;\n/// }\n/// @media #{govuk-from-breakpoint(tablet)} and (orientation: landscape) {\n/// color: blue;\n/// }\n/// $custom-breakpoint-map: (\n/// small: 350px,\n/// medium: 769px,\n/// large: 1100px,\n/// extra-large: 1600px\n/// );\n/// @media #{govuk-from-breakpoint(extra-large, $custom-breakpoint-map)} {\n/// color: cyan;\n/// }\n/// }\n///\n/// @access public\n\n@function govuk-from-breakpoint($from, $breakpoints: $govuk-breakpoints) {\n $value: govuk-breakpoint-value($from, $breakpoints);\n\n @if meta.type-of($value) == \"number\" and math.unit($value) == \"px\" {\n $value: govuk-em($value);\n }\n\n @return \"(min-width: #{$value})\";\n}\n\n/// Generate the `max-width` segment of a media query given a breakpoint key\n///\n/// sass-mq converted pixel values to ems, and only performed subtractions on\n/// named breakpoints. These have been retained for backwards compatibility,\n/// though unlike sass-mq, this also supports using non-px and em values.\n///\n/// @param {String | Number} $until - If a string, expects the name of a\n/// breakpoint in $breakpoints. If a number, it will use that number.\n/// @param {Map} $breakpoints [$govuk-breakpoints] - The map to look for $until.\n/// @returns {String} - A `max-width` media query segment\n///\n/// @example scss\n/// .example {\n/// @media #{govuk-until-breakpoint(desktop)} {\n/// color: red;\n/// }\n/// @media #{govuk-until-breakpoint(40em)} {\n/// color: green;\n/// }\n/// @media #{govuk-until-breakpoint(tablet)} and (orientation: landscape) {\n/// color: blue;\n/// }\n/// $custom-breakpoint-map: (\n/// small: 350px,\n/// medium: 769px,\n/// large: 1100px,\n/// extra-large: 1600px\n/// );\n/// @media #{govuk-until-breakpoint(extra-large, $custom-breakpoint-map)} {\n/// color: cyan;\n/// }\n/// }\n///\n/// @access public\n\n@function govuk-until-breakpoint($until, $breakpoints: $govuk-breakpoints) {\n $value: govuk-breakpoint-value($until, $breakpoints);\n\n @if meta.type-of($value) == \"number\" and math.unit($value) == \"px\" {\n // If it's a pixel value, convert it to ems.\n $value: govuk-em($value);\n }\n\n // If $value derives from a named breakpoint, additionally subtract .01em\n @if meta.type-of($until) != \"number\" and math.unit($value) == \"em\" {\n $value: $value - 0.01em;\n }\n\n @return \"(max-width: #{$value})\";\n}\n\n/// Media query\n///\n/// @param {String | Boolean} $from [false] - One of $breakpoints\n/// @param {String | Boolean} $until [false] - One of $breakpoints\n/// @param {String | Boolean} $and [false] - Additional media query parameters\n/// @param {String} $media-type [all] - Override media type: screen, print…\n/// @param {Map} $breakpoints [$govuk-breakpoints] - Map of breakpoints to use\n///\n/// @content styling rules to use for the given media query range\n///\n/// @example scss\n/// .element {\n/// @include govuk-media-query($from: mobile) {\n/// color: red;\n/// }\n/// @include govuk-media-query($until: tablet) {\n/// color: blue;\n/// }\n/// @include govuk-media-query(mobile, tablet) {\n/// color: green;\n/// }\n/// @include govuk-media-query($from: tablet, $and: '(orientation: landscape)') {\n/// color: teal;\n/// }\n/// @include govuk-media-query(950px) {\n/// color: hotpink;\n/// }\n/// @include govuk-media-query(tablet, $media-type: screen) {\n/// color: rebeccapurple;\n/// }\n/// }\n///\n/// @access public\n\n@mixin govuk-media-query($from: null, $until: null, $and: null, $media-type: \"all\", $breakpoints: $govuk-breakpoints) {\n $media-query: \"\";\n\n // Assemble the media query string\n @if $media-type != \"all\" {\n $media-query: \"#{$media-type}\";\n }\n @if $from {\n $media-query: \"#{$media-query} and #{govuk-from-breakpoint($from, $breakpoints)}\";\n }\n @if $until {\n $media-query: \"#{$media-query} and #{govuk-until-breakpoint($until, $breakpoints)}\";\n }\n @if $and {\n $media-query: \"#{$media-query} and #{$and}\";\n }\n\n // If $media-query currently begins with an orphaned ' and ', remove it.\n @if string.index($media-query, \" and \") == 1 {\n $media-query: string.slice($media-query, 6);\n }\n\n @media #{$media-query} {\n @content;\n }\n}\n"]}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@function _govuk-equilateral-height($base) {
|
|
15
15
|
$square-root-of-three: 1.732;
|
|
16
16
|
|
|
17
|
-
@return ($base
|
|
17
|
+
@return ($base * 0.5) * $square-root-of-three;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/// Arrow mixin
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
border-style: solid;
|
|
45
45
|
border-color: transparent; // 1
|
|
46
46
|
|
|
47
|
-
$perpendicular: $base
|
|
47
|
+
$perpendicular: $base * 0.5;
|
|
48
48
|
|
|
49
49
|
@if not $height {
|
|
50
50
|
$height: _govuk-equilateral-height($base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_shape-arrow.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,EAAE;AACF,6DAA6D;AAC7D,qDAAqD;AACrD,kBAAkB;;AAElB;EACE,4BAA4B;;EAE5B,
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_shape-arrow.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,kDAAkD;AAClD,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,EAAE;AACF,6DAA6D;AAC7D,qDAAqD;AACrD,kBAAkB;;AAElB;EACE,4BAA4B;;EAE5B,6CAA6C;AAC/C;;AAEA,cAAc;AACd,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE;AACF,8EAA8E;AAC9E,sEAAsE;AACtE,0DAA0D;AAC1D,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,2EAA2E;AAC3E,6DAA6D;AAC7D,6EAA6E;AAC7E,uEAAuE;AACvE,EAAE;AACF,iBAAiB;;AAEjB;EACE,iBAAiB;;EAEjB,QAAQ;EACR,SAAS;;EAET,mBAAmB;EACnB,yBAAyB,EAAE,GAAG;;EAE9B,2BAA2B;;EAE3B;IACE,yCAAyC;EAC3C;;EAEA;IACE,sDAA8C;YAA9C,8CAA8C,EAAE,GAAG;;IAEnD,sCAAsC;IACtC,4BAA4B,EAAE,GAAG;EACnC,EAAE;IACA,oDAA4C;YAA5C,4CAA4C,EAAE,GAAG;;IAEjD,qDAAqD;IACrD,0BAA0B,EAAE,GAAG;EACjC,EAAE;IACA,oDAA4C;YAA5C,4CAA4C,EAAE,GAAG;;IAEjD,qDAAqD;IACrD,yBAAyB,EAAE,GAAG;EAChC,EAAE;IACA,sDAA8C;YAA9C,8CAA8C,EAAE,GAAG;;IAEnD,qDAAqD;IACrD,2BAA2B,EAAE,GAAG;EAClC,EAAE;IACA,+FAA+F;EACjG;AACF","file":"_shape-arrow.scss","sourcesContent":["////\n/// @group helpers/shapes\n////\n\n/// Calculate the height of an equilateral triangle\n///\n/// Multiplying half the length of the base of an equilateral triangle by the\n/// square root of three gives us its height. We use 1.732 as an approximation.\n///\n/// @param {Number} $base - Length of the base of the triangle\n/// @return {Number} Calculated height of the triangle\n/// @access private\n\n@function _govuk-equilateral-height($base) {\n $square-root-of-three: 1.732;\n\n @return ($base * 0.5) * $square-root-of-three;\n}\n\n/// Arrow mixin\n///\n/// Generate Arrows (triangles) by using a mix of transparent (1) and coloured\n/// borders. The coloured borders inherit the text colour of the element (2).\n///\n/// Ensure the arrow is rendered correctly if browser colours are overridden by\n/// providing a clip path (3). Without this the transparent borders are\n/// overridden to become visible which results in a square.\n///\n/// We need both because older browsers do not support clip-path.\n///\n/// @param {String} $direction - Direction for arrow: up, right, down, left.\n/// @param {Number} $base - Length of the triangle 'base' side\n/// @param {Number} $height [null] - Height of triangle. Omit for equilateral.\n/// @param {String} $display [block] - CSS display property of the arrow\n///\n/// @access public\n\n@mixin govuk-shape-arrow($direction, $base, $height: null, $display: block) {\n display: $display;\n\n width: 0;\n height: 0;\n\n border-style: solid;\n border-color: transparent; // 1\n\n $perpendicular: $base * 0.5;\n\n @if not $height {\n $height: _govuk-equilateral-height($base);\n }\n\n @if $direction == \"up\" {\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3\n\n border-width: 0 $perpendicular $height;\n border-bottom-color: inherit; // 2\n } @else if $direction == \"right\" {\n clip-path: polygon(0% 0%, 100% 50%, 0% 100%); // 3\n\n border-width: $perpendicular 0 $perpendicular $height;\n border-left-color: inherit; // 2\n } @else if $direction == \"down\" {\n clip-path: polygon(0% 0%, 50% 100%, 100% 0%); // 3\n\n border-width: $height $perpendicular 0 $perpendicular;\n border-top-color: inherit; // 2\n } @else if $direction == \"left\" {\n clip-path: polygon(0% 50%, 100% 100%, 100% 0%); // 3\n\n border-width: $perpendicular $height $perpendicular 0;\n border-right-color: inherit; // 2\n } @else {\n @error \"Invalid arrow direction: expected `up`, `right`, `down` or `left`, got `#{$direction}`\";\n }\n}\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
////
|
|
2
2
|
/// @group helpers/spacing
|
|
3
3
|
////
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
|
|
8
|
+
@import "../tools/if";
|
|
9
|
+
@import "../helpers/media-queries";
|
|
4
10
|
|
|
5
11
|
/// Single point spacing
|
|
6
12
|
///
|
|
@@ -29,7 +35,7 @@
|
|
|
29
35
|
/// @access public
|
|
30
36
|
|
|
31
37
|
@function govuk-spacing($spacing-point) {
|
|
32
|
-
$actual-input-type: type-of($spacing-point);
|
|
38
|
+
$actual-input-type: meta.type-of($spacing-point);
|
|
33
39
|
@if $actual-input-type != "number" {
|
|
34
40
|
@error "Expected a number (integer), but got a "
|
|
35
41
|
+ "#{$actual-input-type}.";
|
|
@@ -38,15 +44,15 @@
|
|
|
38
44
|
$is-negative: false;
|
|
39
45
|
@if $spacing-point < 0 {
|
|
40
46
|
$is-negative: true;
|
|
41
|
-
$spacing-point: abs($spacing-point);
|
|
47
|
+
$spacing-point: math.abs($spacing-point);
|
|
42
48
|
}
|
|
43
49
|
|
|
44
|
-
@if not map
|
|
50
|
+
@if not map.has-key($govuk-spacing-points, $spacing-point) {
|
|
45
51
|
@error "Unknown spacing variable `#{$spacing-point}`. Make sure you are using a point from the spacing scale in `_settings/spacing.scss`.";
|
|
46
52
|
}
|
|
47
53
|
|
|
48
|
-
$value: map
|
|
49
|
-
@return if($is-negative, $value * -1, $value);
|
|
54
|
+
$value: map.get($govuk-spacing-points, $spacing-point);
|
|
55
|
+
@return govuk-if($is-negative, $value * -1, $value);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
/// Responsive spacing
|
|
@@ -75,19 +81,19 @@
|
|
|
75
81
|
$important: false,
|
|
76
82
|
$adjustment: false
|
|
77
83
|
) {
|
|
78
|
-
$actual-input-type: type-of($responsive-spacing-point);
|
|
84
|
+
$actual-input-type: meta.type-of($responsive-spacing-point);
|
|
79
85
|
@if $actual-input-type != "number" {
|
|
80
86
|
@error "Expected a number (integer), but got a " + "#{$actual-input-type}.";
|
|
81
87
|
}
|
|
82
88
|
|
|
83
|
-
@if not map
|
|
89
|
+
@if not map.has-key($govuk-spacing-responsive-scale, $responsive-spacing-point) {
|
|
84
90
|
@error "Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the "
|
|
85
91
|
+ "responsive spacing scale in `_settings/spacing.scss`.";
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
// Make sure that the return value from `_settings/spacing.scss` is a map.
|
|
89
|
-
$scale-map: map
|
|
90
|
-
$actual-map-type: type-of($scale-map);
|
|
95
|
+
$scale-map: map.get($govuk-spacing-responsive-scale, $responsive-spacing-point);
|
|
96
|
+
$actual-map-type: meta.type-of($scale-map);
|
|
91
97
|
@if $actual-map-type != "map" {
|
|
92
98
|
@error "Expected a number (integer), but got a "
|
|
93
99
|
+ "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)";
|
|
@@ -102,16 +108,16 @@
|
|
|
102
108
|
// The 'null' breakpoint is for mobile.
|
|
103
109
|
@if not $breakpoint {
|
|
104
110
|
@if $direction == all {
|
|
105
|
-
#{$property}: $breakpoint-value if($important, !important
|
|
111
|
+
#{$property}: $breakpoint-value govuk-if($important, !important);
|
|
106
112
|
} @else {
|
|
107
|
-
#{$property}-#{$direction}: $breakpoint-value if($important, !important
|
|
113
|
+
#{$property}-#{$direction}: $breakpoint-value govuk-if($important, !important);
|
|
108
114
|
}
|
|
109
115
|
} @else {
|
|
110
116
|
@media #{govuk-from-breakpoint($breakpoint)} {
|
|
111
117
|
@if $direction == all {
|
|
112
|
-
#{$property}: $breakpoint-value if($important, !important
|
|
118
|
+
#{$property}: $breakpoint-value govuk-if($important, !important);
|
|
113
119
|
} @else {
|
|
114
|
-
#{$property}-#{$direction}: $breakpoint-value if($important, !important
|
|
120
|
+
#{$property}-#{$direction}: $breakpoint-value govuk-if($important, !important);
|
|
115
121
|
}
|
|
116
122
|
}
|
|
117
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/govuk/helpers/_spacing.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;;
|
|
1
|
+
{"version":3,"sources":["../../../src/govuk/helpers/_spacing.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;AACH,eAAe;AACf,gBAAgB;AAChB,gBAAgB;;AAEhB,qBAAqB;AACrB,kCAAkC;;AAElC,uBAAuB;AACvB,EAAE;AACF,oEAAoE;AACpE,EAAE;AACF,8DAA8D;AAC9D,qCAAqC;AACrC,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,gBAAgB;AAChB,eAAe;AACf,iCAAiC;AACjC,MAAM;AACN,EAAE;AACF,uCAAuC;AACvC,eAAe;AACf,qCAAqC;AACrC,MAAM;AACN,EAAE;AACF,0DAA0D;AAC1D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yCAAyC;AACzC,EAAE;AACF,8EAA8E;AAC9E,kEAAkE;AAClE,iEAAiE;AACjE,8CAA8C;AAC9C,wEAAwE;AACxE,iEAAiE;AACjE,EAAE;AACF,gBAAgB;AAChB,eAAe;AACf,uEAAuE;AACvE,MAAM;AACN,EAAE;AACF,iBAAiB;;AAEjB;EACE,6GAA6G;AAC/G","file":"_spacing.scss","sourcesContent":["////\n/// @group helpers/spacing\n////\n@use \"sass:map\";\n@use \"sass:math\";\n@use \"sass:meta\";\n\n@import \"../tools/if\";\n@import \"../helpers/media-queries\";\n\n/// Single point spacing\n///\n/// Returns measurement corresponding to the spacing point requested.\n///\n/// @param {Number} $spacing-point - Point on the spacing scale\n/// (set in `settings/_spacing.scss`)\n///\n/// @returns {String} Spacing measurement eg. 10px\n///\n/// @example scss\n/// .element {\n/// padding: govuk-spacing(5);\n/// }\n///\n/// @example scss Using negative spacing\n/// .element {\n/// margin-top: govuk-spacing(-1);\n/// }\n///\n/// @example scss Marking spacing declarations as important\n/// .element {\n/// margin-top: govuk-spacing(1) !important;\n/// }\n///\n/// @access public\n\n@function govuk-spacing($spacing-point) {\n $actual-input-type: meta.type-of($spacing-point);\n @if $actual-input-type != \"number\" {\n @error \"Expected a number (integer), but got a \"\n + \"#{$actual-input-type}.\";\n }\n\n $is-negative: false;\n @if $spacing-point < 0 {\n $is-negative: true;\n $spacing-point: math.abs($spacing-point);\n }\n\n @if not map.has-key($govuk-spacing-points, $spacing-point) {\n @error \"Unknown spacing variable `#{$spacing-point}`. Make sure you are using a point from the spacing scale in `_settings/spacing.scss`.\";\n }\n\n $value: map.get($govuk-spacing-points, $spacing-point);\n @return govuk-if($is-negative, $value * -1, $value);\n}\n\n/// Responsive spacing\n///\n/// Adds responsive spacing (either padding or margin, depending on `$property`)\n/// by fetching a 'spacing map' from the responsive spacing scale, which defines\n/// different spacing values at different breakpoints.\n///\n/// To generate responsive spacing, use 'govuk-responsive-margin' or\n/// 'govuk-responsive-padding' mixins\n///\n/// @param {Number} $responsive-spacing-point - Point on the responsive spacing\n/// scale, corresponds to a map of breakpoints and spacing values\n/// @param {String} $property - Property to add spacing to (e.g. 'margin')\n/// @param {String} $direction [all] - Direction to add spacing to\n/// (`top`, `right`, `bottom`, `left`, `all`)\n/// @param {Boolean} $important [false] - Whether to mark as `!important`\n/// @param {Number} $adjustment [false] - Offset to adjust spacing by\n///\n/// @access private\n\n@mixin _govuk-responsive-spacing(\n $responsive-spacing-point,\n $property,\n $direction: \"all\",\n $important: false,\n $adjustment: false\n) {\n $actual-input-type: meta.type-of($responsive-spacing-point);\n @if $actual-input-type != \"number\" {\n @error \"Expected a number (integer), but got a \" + \"#{$actual-input-type}.\";\n }\n\n @if not map.has-key($govuk-spacing-responsive-scale, $responsive-spacing-point) {\n @error \"Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the \"\n + \"responsive spacing scale in `_settings/spacing.scss`.\";\n }\n\n // Make sure that the return value from `_settings/spacing.scss` is a map.\n $scale-map: map.get($govuk-spacing-responsive-scale, $responsive-spacing-point);\n $actual-map-type: meta.type-of($scale-map);\n @if $actual-map-type != \"map\" {\n @error \"Expected a number (integer), but got a \"\n + \"#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)\";\n }\n\n // Loop through each breakpoint in the map\n @each $breakpoint, $breakpoint-value in $scale-map {\n @if $adjustment {\n $breakpoint-value: $breakpoint-value + $adjustment;\n }\n\n // The 'null' breakpoint is for mobile.\n @if not $breakpoint {\n @if $direction == all {\n #{$property}: $breakpoint-value govuk-if($important, !important);\n } @else {\n #{$property}-#{$direction}: $breakpoint-value govuk-if($important, !important);\n }\n } @else {\n @media #{govuk-from-breakpoint($breakpoint)} {\n @if $direction == all {\n #{$property}: $breakpoint-value govuk-if($important, !important);\n } @else {\n #{$property}-#{$direction}: $breakpoint-value govuk-if($important, !important);\n }\n }\n }\n }\n}\n\n/// Responsive margin\n///\n/// Adds responsive margin by fetching a 'spacing map' from the responsive\n/// spacing scale, which defines different spacing values at different\n/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin.\n///\n/// @see {mixin} _govuk-responsive-spacing\n///\n/// @param {Number} $responsive-spacing-point - Point on the responsive spacing\n/// scale, corresponds to a map of breakpoints and spacing values\n/// @param {String} $direction [all] - Direction to add spacing to\n/// (`top`, `right`, `bottom`, `left`, `all`)\n/// @param {Boolean} $important [false] - Whether to mark as `!important`\n/// @param {Number} $adjustment [false] - Offset to adjust spacing by\n///\n/// @example scss\n/// .element {\n/// @include govuk-responsive-margin(6, \"left\", $adjustment: 1px);\n/// }\n///\n/// @access public\n\n@mixin govuk-responsive-margin($responsive-spacing-point, $direction: \"all\", $important: false, $adjustment: false) {\n @include _govuk-responsive-spacing($responsive-spacing-point, \"margin\", $direction, $important, $adjustment);\n}\n\n/// Responsive padding\n///\n/// Adds responsive padding by fetching a 'spacing map' from the responsive\n/// spacing scale, which defines different spacing values at different\n/// breakpoints. Wrapper for the `_govuk-responsive-spacing` mixin.\n///\n/// @see {mixin} _govuk-responsive-spacing\n///\n/// @param {Number} $responsive-spacing-point - Point on the responsive spacing\n/// scale, corresponds to a map of breakpoints and spacing values\n/// @param {String} $direction [all] - Direction to add spacing to\n/// (`top`, `right`, `bottom`, `left`, `all`)\n/// @param {Boolean} $important [false] - Whether to mark as `!important`\n/// @param {Number} $adjustment [false] - Offset to adjust spacing\n///\n/// @example scss\n/// .element {\n/// @include govuk-responsive-padding(6, \"left\", $adjustment: 1px);\n/// }\n///\n/// @access public\n\n@mixin govuk-responsive-padding($responsive-spacing-point, $direction: \"all\", $important: false, $adjustment: false) {\n @include _govuk-responsive-spacing($responsive-spacing-point, \"padding\", $direction, $important, $adjustment);\n}\n"]}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
////
|
|
2
2
|
/// @group helpers/typography
|
|
3
3
|
////
|
|
4
|
-
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
@use "sass:string";
|
|
7
|
+
|
|
8
|
+
@import "../settings/assets";
|
|
9
|
+
@import "../settings/colours-functional";
|
|
10
|
+
@import "../settings/spacing";
|
|
11
|
+
@import "../settings/typography-font";
|
|
12
|
+
@import "../settings/warnings";
|
|
13
|
+
@import "../tools/font-url";
|
|
5
14
|
@import "../tools/px-to-rem";
|
|
15
|
+
@import "../tools/if";
|
|
16
|
+
@import "font-faces";
|
|
17
|
+
@import "media-queries";
|
|
18
|
+
@import "spacing";
|
|
6
19
|
|
|
7
20
|
/// 'Common typography' helper
|
|
8
21
|
///
|
|
@@ -32,14 +45,16 @@
|
|
|
32
45
|
///
|
|
33
46
|
/// Sets the text colour, including a suitable override for print.
|
|
34
47
|
///
|
|
48
|
+
/// @deprecated
|
|
35
49
|
/// @access public
|
|
36
50
|
|
|
37
51
|
@mixin govuk-text-colour {
|
|
38
|
-
|
|
52
|
+
@include _warning(
|
|
53
|
+
"govuk-text-colour",
|
|
54
|
+
"The `govuk-text-colour` mixin is deprecated. Use `color: govuk-colour(text)` instead."
|
|
55
|
+
);
|
|
39
56
|
|
|
40
|
-
|
|
41
|
-
color: govuk-functional-colour(print-text);
|
|
42
|
-
}
|
|
57
|
+
color: govuk-functional-colour(text);
|
|
43
58
|
}
|
|
44
59
|
|
|
45
60
|
/// Regular font weight helper
|
|
@@ -49,7 +64,7 @@
|
|
|
49
64
|
/// @access public
|
|
50
65
|
|
|
51
66
|
@mixin govuk-typography-weight-regular($important: false) {
|
|
52
|
-
font-weight: $govuk-font-weight-regular if($important, !important
|
|
67
|
+
font-weight: $govuk-font-weight-regular govuk-if($important, !important);
|
|
53
68
|
}
|
|
54
69
|
|
|
55
70
|
/// Bold font weight helper
|
|
@@ -59,7 +74,7 @@
|
|
|
59
74
|
/// @access public
|
|
60
75
|
|
|
61
76
|
@mixin govuk-typography-weight-bold($important: false) {
|
|
62
|
-
font-weight: $govuk-font-weight-bold if($important, !important
|
|
77
|
+
font-weight: $govuk-font-weight-bold govuk-if($important, !important);
|
|
63
78
|
}
|
|
64
79
|
|
|
65
80
|
/// Tabular number helper
|
|
@@ -76,7 +91,7 @@
|
|
|
76
91
|
/// @access public
|
|
77
92
|
|
|
78
93
|
@mixin govuk-font-tabular-numbers($important: false) {
|
|
79
|
-
font-variant-numeric: tabular-nums if($important, !important
|
|
94
|
+
font-variant-numeric: tabular-nums govuk-if($important, !important);
|
|
80
95
|
}
|
|
81
96
|
|
|
82
97
|
/// Word break helper
|
|
@@ -90,10 +105,10 @@
|
|
|
90
105
|
|
|
91
106
|
@mixin govuk-text-break-word($important: false) {
|
|
92
107
|
// IE 11 and Edge 16–17 only support the non-standard `word-wrap` property
|
|
93
|
-
word-wrap: break-word if($important, !important
|
|
108
|
+
word-wrap: break-word govuk-if($important, !important);
|
|
94
109
|
|
|
95
110
|
// All other browsers support `overflow-wrap`
|
|
96
|
-
overflow-wrap: break-word if($important, !important
|
|
111
|
+
overflow-wrap: break-word govuk-if($important, !important);
|
|
97
112
|
}
|
|
98
113
|
|
|
99
114
|
/// Convert line-heights specified in pixels into a relative value, unless
|
|
@@ -107,8 +122,8 @@
|
|
|
107
122
|
/// @access private
|
|
108
123
|
|
|
109
124
|
@function _govuk-line-height($line-height, $font-size) {
|
|
110
|
-
@if not unitless($line-height) and unit($line-height) == unit($font-size) {
|
|
111
|
-
$line-height: $line-height
|
|
125
|
+
@if not math.is-unitless($line-height) and math.unit($line-height) == math.unit($font-size) {
|
|
126
|
+
$line-height: math.div($line-height, $font-size);
|
|
112
127
|
}
|
|
113
128
|
|
|
114
129
|
@return $line-height;
|
|
@@ -153,21 +168,21 @@
|
|
|
153
168
|
@mixin govuk-font-size($size, $line-height: false, $important: false) {
|
|
154
169
|
// Flag font sizes that start with underscores so we can suppress warnings on
|
|
155
170
|
// deprecated sizes used internally, for example `govuk-font($size: "_14")`
|
|
156
|
-
$size-internal-use-only:
|
|
171
|
+
$size-internal-use-only: string.slice(#{$size}, 1, 1) == "_";
|
|
157
172
|
|
|
158
173
|
// Remove underscore from font sizes flagged for internal use
|
|
159
174
|
@if $size-internal-use-only {
|
|
160
|
-
$size:
|
|
175
|
+
$size: string.slice(#{$size}, 2);
|
|
161
176
|
}
|
|
162
177
|
|
|
163
178
|
// Check for a font map exactly matching the given size
|
|
164
|
-
$font-map: map
|
|
179
|
+
$font-map: map.get($govuk-typography-scale, $size);
|
|
165
180
|
|
|
166
181
|
// No match? Try with string type (e.g. $size: "16" not 16)
|
|
167
182
|
@if not $font-map {
|
|
168
|
-
@each $font-size in map
|
|
183
|
+
@each $font-size in map.keys($govuk-typography-scale) {
|
|
169
184
|
@if not $font-map and "#{$font-size}" == "#{$size}" {
|
|
170
|
-
$font-map: map
|
|
185
|
+
$font-map: map.get($govuk-typography-scale, $font-size);
|
|
171
186
|
}
|
|
172
187
|
}
|
|
173
188
|
}
|
|
@@ -178,39 +193,46 @@
|
|
|
178
193
|
}
|
|
179
194
|
|
|
180
195
|
// Check for a deprecation within the type scale
|
|
181
|
-
$deprecation: map
|
|
196
|
+
$deprecation: map.get($font-map, "deprecation");
|
|
182
197
|
|
|
183
198
|
@if $deprecation {
|
|
184
199
|
// Warn on deprecated font sizes unless flagged for internal use
|
|
185
200
|
@if not $size-internal-use-only {
|
|
186
|
-
@include _warning(map
|
|
201
|
+
@include _warning(map.get($deprecation, "key"), map.get($deprecation, "message"));
|
|
187
202
|
}
|
|
188
203
|
|
|
189
204
|
// remove the deprecation map keys so they do not break the breakpoint loop
|
|
190
|
-
$font-map: map
|
|
205
|
+
$font-map: map.remove($font-map, "deprecation");
|
|
191
206
|
}
|
|
192
207
|
|
|
193
208
|
@each $breakpoint, $breakpoint-map in $font-map {
|
|
194
|
-
$font-size: map
|
|
209
|
+
$font-size: map.get($breakpoint-map, "font-size");
|
|
195
210
|
$font-size-rem: govuk-px-to-rem($font-size);
|
|
196
211
|
|
|
197
212
|
// $calculated-line-height is a separate variable from $line-height,
|
|
198
213
|
// as otherwise the value would get redefined with each loop and
|
|
199
214
|
// eventually break _govuk-line-height.
|
|
200
|
-
//
|
|
215
|
+
// 1. See if the function was called with a specific line-height
|
|
216
|
+
$calculated-line-height: $line-height;
|
|
217
|
+
// 2. Default to the breakpoint-map if no specific value was given
|
|
218
|
+
@if not $calculated-line-height {
|
|
219
|
+
$calculated-line-height: map.get($breakpoint-map, "line-height");
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// 3. Turn the value into a unitless line-height if possible
|
|
201
223
|
// We continue to call the param $line-height to stay consistent with the
|
|
202
224
|
// naming with govuk-font.
|
|
203
225
|
$calculated-line-height: _govuk-line-height(
|
|
204
|
-
$line-height:
|
|
226
|
+
$line-height: $calculated-line-height,
|
|
205
227
|
$font-size: $font-size
|
|
206
228
|
);
|
|
207
229
|
|
|
208
230
|
// Mark rules as !important if $important is true - this will result in
|
|
209
231
|
// these variables becoming strings, so this needs to happen *after* they
|
|
210
232
|
// are used in calculations
|
|
211
|
-
$font-size: $font-size if($important, !important
|
|
212
|
-
$font-size-rem: $font-size-rem if($important, !important
|
|
213
|
-
$calculated-line-height: $calculated-line-height if($important, !important
|
|
233
|
+
$font-size: $font-size govuk-if($important, !important);
|
|
234
|
+
$font-size-rem: $font-size-rem govuk-if($important, !important);
|
|
235
|
+
$calculated-line-height: $calculated-line-height govuk-if($important, !important);
|
|
214
236
|
|
|
215
237
|
@if not $breakpoint {
|
|
216
238
|
font-size: $font-size-rem;
|