govuk_publishing_components 9.3.6 → 9.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -0
- data/app/assets/stylesheets/component_guide/application.scss +10 -0
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +13 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +66 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +1 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-admin.scss +1 -0
- data/app/models/govuk_publishing_components/component_doc.rb +12 -0
- data/app/views/govuk_publishing_components/component_guide/component_doc/_preview.html.erb +7 -5
- data/app/views/govuk_publishing_components/component_guide/show.html.erb +22 -0
- data/app/views/govuk_publishing_components/components/_highlight_boxes.html.erb +39 -0
- data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +26 -0
- data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +10 -0
- data/app/views/govuk_publishing_components/components/docs/highlight_boxes.yml +142 -0
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +12 -0
- data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +28 -0
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -0
- data/app/views/layouts/govuk_publishing_components/application.html.erb +5 -0
- data/config/initializers/assets.rb +12 -0
- data/lib/govuk_publishing_components.rb +1 -0
- data/lib/govuk_publishing_components/presenters/highlight_boxes_helper.rb +13 -0
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/govuk-frontend/README.md +96 -0
- data/node_modules/govuk-frontend/all-ie8.scss +6 -0
- data/node_modules/govuk-frontend/all.js +1720 -0
- data/node_modules/govuk-frontend/all.scss +11 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/node_modules/govuk-frontend/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-apple-touch-icon.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-crest.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-logotype-crown.png +0 -0
- data/node_modules/govuk-frontend/assets/images/govuk-mask-icon.svg +7 -0
- data/node_modules/govuk-frontend/assets/images/govuk-opengraph-image.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-arrow-left.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-important.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer-2x.png +0 -0
- data/node_modules/govuk-frontend/assets/images/icon-pointer.png +0 -0
- data/node_modules/govuk-frontend/common.js +39 -0
- data/node_modules/govuk-frontend/components/_all.scss +26 -0
- data/node_modules/govuk-frontend/components/back-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/back-link/_back-link.scss +54 -0
- data/node_modules/govuk-frontend/components/back-link/back-link.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/back-link/template.njk +2 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/README.md +335 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/_breadcrumbs.scss +119 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/breadcrumbs.njk +14 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +13 -0
- data/node_modules/govuk-frontend/components/button/README.md +319 -0
- data/node_modules/govuk-frontend/components/button/_button.scss +185 -0
- data/node_modules/govuk-frontend/components/button/button.js +548 -0
- data/node_modules/govuk-frontend/components/button/button.njk +3 -0
- data/node_modules/govuk-frontend/components/button/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/button/template.njk +35 -0
- data/node_modules/govuk-frontend/components/checkboxes/README.md +782 -0
- data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +151 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.js +730 -0
- data/node_modules/govuk-frontend/components/checkboxes/checkboxes.njk +27 -0
- data/node_modules/govuk-frontend/components/checkboxes/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/checkboxes/template.njk +86 -0
- data/node_modules/govuk-frontend/components/date-input/README.md +640 -0
- data/node_modules/govuk-frontend/components/date-input/_date-input.scss +35 -0
- data/node_modules/govuk-frontend/components/date-input/date-input.njk +23 -0
- data/node_modules/govuk-frontend/components/date-input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/date-input/template.njk +76 -0
- data/node_modules/govuk-frontend/components/details/README.md +237 -0
- data/node_modules/govuk-frontend/components/details/_details.scss +86 -0
- data/node_modules/govuk-frontend/components/details/details.js +836 -0
- data/node_modules/govuk-frontend/components/details/details.njk +7 -0
- data/node_modules/govuk-frontend/components/details/implementation.md +43 -0
- data/node_modules/govuk-frontend/components/details/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/details/template.njk +10 -0
- data/node_modules/govuk-frontend/components/error-message/README.md +143 -0
- data/node_modules/govuk-frontend/components/error-message/_error-message.scss +15 -0
- data/node_modules/govuk-frontend/components/error-message/error-message.njk +7 -0
- data/node_modules/govuk-frontend/components/error-message/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-message/template.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/README.md +215 -0
- data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +68 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.js +520 -0
- data/node_modules/govuk-frontend/components/error-summary/error-summary.njk +17 -0
- data/node_modules/govuk-frontend/components/error-summary/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/error-summary/template.njk +25 -0
- data/node_modules/govuk-frontend/components/fieldset/README.md +213 -0
- data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +58 -0
- data/node_modules/govuk-frontend/components/fieldset/fieldset.njk +13 -0
- data/node_modules/govuk-frontend/components/fieldset/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/fieldset/template.njk +17 -0
- data/node_modules/govuk-frontend/components/file-upload/README.md +332 -0
- data/node_modules/govuk-frontend/components/file-upload/_file-upload.scss +19 -0
- data/node_modules/govuk-frontend/components/file-upload/file-upload.njk +9 -0
- data/node_modules/govuk-frontend/components/file-upload/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/file-upload/template.njk +42 -0
- data/node_modules/govuk-frontend/components/footer/README.md +284 -0
- data/node_modules/govuk-frontend/components/footer/_footer.scss +216 -0
- data/node_modules/govuk-frontend/components/footer/footer.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/footer/template.njk +80 -0
- data/node_modules/govuk-frontend/components/header/README.md +524 -0
- data/node_modules/govuk-frontend/components/header/_header.scss +285 -0
- data/node_modules/govuk-frontend/components/header/header.js +717 -0
- data/node_modules/govuk-frontend/components/header/header.njk +3 -0
- data/node_modules/govuk-frontend/components/header/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/header/template.njk +82 -0
- data/node_modules/govuk-frontend/components/hint/README.md +157 -0
- data/node_modules/govuk-frontend/components/hint/_hint.scss +29 -0
- data/node_modules/govuk-frontend/components/hint/hint.njk +7 -0
- data/node_modules/govuk-frontend/components/hint/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/hint/template.njk +4 -0
- data/node_modules/govuk-frontend/components/input/README.md +416 -0
- data/node_modules/govuk-frontend/components/input/_input.scss +62 -0
- data/node_modules/govuk-frontend/components/input/input.njk +9 -0
- data/node_modules/govuk-frontend/components/input/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/input/template.njk +42 -0
- data/node_modules/govuk-frontend/components/inset-text/README.md +157 -0
- data/node_modules/govuk-frontend/components/inset-text/_inset-text.scss +28 -0
- data/node_modules/govuk-frontend/components/inset-text/inset-text.njk +7 -0
- data/node_modules/govuk-frontend/components/inset-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/inset-text/template.njk +4 -0
- data/node_modules/govuk-frontend/components/label/README.md +193 -0
- data/node_modules/govuk-frontend/components/label/_label.scss +45 -0
- data/node_modules/govuk-frontend/components/label/label.njk +6 -0
- data/node_modules/govuk-frontend/components/label/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/label/template.njk +15 -0
- data/node_modules/govuk-frontend/components/panel/README.md +151 -0
- data/node_modules/govuk-frontend/components/panel/_panel.scss +42 -0
- data/node_modules/govuk-frontend/components/panel/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/panel/panel.njk +7 -0
- data/node_modules/govuk-frontend/components/panel/template.njk +12 -0
- data/node_modules/govuk-frontend/components/phase-banner/README.md +152 -0
- data/node_modules/govuk-frontend/components/phase-banner/_phase-banner.scss +31 -0
- data/node_modules/govuk-frontend/components/phase-banner/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/phase-banner/phase-banner.njk +7 -0
- data/node_modules/govuk-frontend/components/phase-banner/template.njk +17 -0
- data/node_modules/govuk-frontend/components/radios/README.md +686 -0
- data/node_modules/govuk-frontend/components/radios/_radios.scss +157 -0
- data/node_modules/govuk-frontend/components/radios/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/radios/radios.js +730 -0
- data/node_modules/govuk-frontend/components/radios/radios.njk +27 -0
- data/node_modules/govuk-frontend/components/radios/template.njk +85 -0
- data/node_modules/govuk-frontend/components/select/README.md +387 -0
- data/node_modules/govuk-frontend/components/select/_select.scss +35 -0
- data/node_modules/govuk-frontend/components/select/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/select/select.njk +24 -0
- data/node_modules/govuk-frontend/components/select/template.njk +44 -0
- data/node_modules/govuk-frontend/components/skip-link/README.md +142 -0
- data/node_modules/govuk-frontend/components/skip-link/_skip-link.scss +15 -0
- data/node_modules/govuk-frontend/components/skip-link/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/skip-link.njk +3 -0
- data/node_modules/govuk-frontend/components/skip-link/template.njk +3 -0
- data/node_modules/govuk-frontend/components/table/README.md +585 -0
- data/node_modules/govuk-frontend/components/table/_table.scss +50 -0
- data/node_modules/govuk-frontend/components/table/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/table/table.njk +45 -0
- data/node_modules/govuk-frontend/components/table/template.njk +39 -0
- data/node_modules/govuk-frontend/components/tabs/README.md +375 -0
- data/node_modules/govuk-frontend/components/tabs/_tabs.scss +120 -0
- data/node_modules/govuk-frontend/components/tabs/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.js +1302 -0
- data/node_modules/govuk-frontend/components/tabs/tabs.njk +3 -0
- data/node_modules/govuk-frontend/components/tabs/template.njk +29 -0
- data/node_modules/govuk-frontend/components/tag/README.md +150 -0
- data/node_modules/govuk-frontend/components/tag/_tag.scss +23 -0
- data/node_modules/govuk-frontend/components/tag/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/tag/tag.njk +7 -0
- data/node_modules/govuk-frontend/components/tag/template.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/README.md +350 -0
- data/node_modules/govuk-frontend/components/textarea/_textarea.scss +31 -0
- data/node_modules/govuk-frontend/components/textarea/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/textarea/template.njk +41 -0
- data/node_modules/govuk-frontend/components/textarea/textarea.njk +11 -0
- data/node_modules/govuk-frontend/components/warning-text/README.md +148 -0
- data/node_modules/govuk-frontend/components/warning-text/_warning-text.scss +50 -0
- data/node_modules/govuk-frontend/components/warning-text/macro.njk +3 -0
- data/node_modules/govuk-frontend/components/warning-text/template.njk +9 -0
- data/node_modules/govuk-frontend/components/warning-text/warning-text.njk +9 -0
- data/node_modules/govuk-frontend/core/_all.scss +6 -0
- data/node_modules/govuk-frontend/core/_global-styles.scss +19 -0
- data/node_modules/govuk-frontend/core/_links.scss +40 -0
- data/node_modules/govuk-frontend/core/_lists.scss +63 -0
- data/node_modules/govuk-frontend/core/_section-break.scss +56 -0
- data/node_modules/govuk-frontend/core/_template.scss +16 -0
- data/node_modules/govuk-frontend/core/_typography.scss +186 -0
- data/node_modules/govuk-frontend/helpers/_all.scss +12 -0
- data/node_modules/govuk-frontend/helpers/_clearfix.scss +15 -0
- data/node_modules/govuk-frontend/helpers/_colour.scss +51 -0
- data/node_modules/govuk-frontend/helpers/_device-pixels.scss +38 -0
- data/node_modules/govuk-frontend/helpers/_focusable.scss +34 -0
- data/node_modules/govuk-frontend/helpers/_font-faces.scss +67 -0
- data/node_modules/govuk-frontend/helpers/_grid.scss +100 -0
- data/node_modules/govuk-frontend/helpers/_links.scss +149 -0
- data/node_modules/govuk-frontend/helpers/_media-queries.scss +95 -0
- data/node_modules/govuk-frontend/helpers/_shape-arrow.scss +80 -0
- data/node_modules/govuk-frontend/helpers/_spacing.scss +152 -0
- data/node_modules/govuk-frontend/helpers/_typography.scss +153 -0
- data/node_modules/govuk-frontend/helpers/_visually-hidden.scss +76 -0
- data/node_modules/govuk-frontend/objects/_all.scss +4 -0
- data/node_modules/govuk-frontend/objects/_form-group.scss +21 -0
- data/node_modules/govuk-frontend/objects/_grid.scss +10 -0
- data/node_modules/govuk-frontend/objects/_main-wrapper.scss +37 -0
- data/node_modules/govuk-frontend/objects/_width-container.scss +28 -0
- data/node_modules/govuk-frontend/overrides/_all.scss +4 -0
- data/node_modules/govuk-frontend/overrides/_display.scss +14 -0
- data/node_modules/govuk-frontend/overrides/_spacing.scss +58 -0
- data/node_modules/govuk-frontend/overrides/_typography.scss +21 -0
- data/node_modules/govuk-frontend/overrides/_width.scss +41 -0
- data/node_modules/govuk-frontend/package.json +89 -0
- data/node_modules/govuk-frontend/settings/_all.scss +21 -0
- data/node_modules/govuk-frontend/settings/_assets.scss +82 -0
- data/node_modules/govuk-frontend/settings/_colours-applied.scss +130 -0
- data/node_modules/govuk-frontend/settings/_colours-organisations.scss +136 -0
- data/node_modules/govuk-frontend/settings/_colours-palette.scss +37 -0
- data/node_modules/govuk-frontend/settings/_compatibility.scss +51 -0
- data/node_modules/govuk-frontend/settings/_global-styles.scss +13 -0
- data/node_modules/govuk-frontend/settings/_ie8.scss +18 -0
- data/node_modules/govuk-frontend/settings/_measurements.scss +85 -0
- data/node_modules/govuk-frontend/settings/_media-queries.scss +23 -0
- data/node_modules/govuk-frontend/settings/_spacing.scss +80 -0
- data/node_modules/govuk-frontend/settings/_typography-font-families.scss +22 -0
- data/node_modules/govuk-frontend/settings/_typography-font.scss +48 -0
- data/node_modules/govuk-frontend/settings/_typography-responsive.scss +138 -0
- data/node_modules/govuk-frontend/template.njk +56 -0
- data/node_modules/govuk-frontend/tools/_all.scss +7 -0
- data/node_modules/govuk-frontend/tools/_compatibility.scss +36 -0
- data/node_modules/govuk-frontend/tools/_exports.scss +33 -0
- data/node_modules/govuk-frontend/tools/_font-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_ie8.scss +51 -0
- data/node_modules/govuk-frontend/tools/_iff.scss +15 -0
- data/node_modules/govuk-frontend/tools/_image-url.scss +28 -0
- data/node_modules/govuk-frontend/tools/_px-to-em.scss +20 -0
- data/node_modules/govuk-frontend/utilities/_all.scss +2 -0
- data/node_modules/govuk-frontend/utilities/_clearfix.scss +5 -0
- data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +9 -0
- data/node_modules/govuk-frontend/vendor/_sass-mq.scss +351 -0
- data/node_modules/govuk-frontend/vendor/polyfills/DOMTokenList.js +272 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Document.js +34 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element.js +147 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Element/prototype/classList.js +449 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Event.js +504 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Function/prototype/bind.js +252 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Object/defineProperty.js +94 -0
- data/node_modules/govuk-frontend/vendor/polyfills/Window.js +28 -0
- metadata +249 -2
@@ -0,0 +1,56 @@
|
|
1
|
+
{% from "./components/skip-link/macro.njk" import govukSkipLink %}
|
2
|
+
{% from "./components/header/macro.njk" import govukHeader %}
|
3
|
+
{% from "./components/footer/macro.njk" import govukFooter %}
|
4
|
+
<!DOCTYPE html>
|
5
|
+
<html lang="{{ htmlLang | default('en') }}" class="govuk-template {{ htmlClasses }}">
|
6
|
+
<head>
|
7
|
+
<meta charset="utf-8" />
|
8
|
+
<title>{% block pageTitle %}GOV.UK - The best place to find government services and information{% endblock %}</title>
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
+
<meta name="theme-color" content="{{ themeColor | default('#0b0c0c') }}" /> {# Hardcoded value of $govuk-black #}
|
11
|
+
|
12
|
+
{% block headIcons %}
|
13
|
+
<link rel="shortcut icon" href="{{ assetPath | default('/assets') }}/images/favicon.ico" type="image/x-icon" />
|
14
|
+
<link rel="mask-icon" href="{{ assetPath | default('/assets') }}/images/govuk-mask-icon.svg" color="{{ themeColor | default('#0b0c0c') }}"> {# Hardcoded value of $govuk-black #}
|
15
|
+
<link rel="apple-touch-icon" sizes="180x180" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-180x180.png">
|
16
|
+
<link rel="apple-touch-icon" sizes="167x167" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-167x167.png">
|
17
|
+
<link rel="apple-touch-icon" sizes="152x152" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon-152x152.png">
|
18
|
+
<link rel="apple-touch-icon" href="{{ assetPath | default('/assets') }}/images/govuk-apple-touch-icon.png">
|
19
|
+
{% endblock %}
|
20
|
+
|
21
|
+
{% block head %}{% endblock %}
|
22
|
+
|
23
|
+
{# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #}
|
24
|
+
<meta property="og:image" content="{{ assetPath | default('/assets') }}/images/govuk-opengraph-image.png">
|
25
|
+
</head>
|
26
|
+
<body class="govuk-template__body {{ bodyClasses }}">
|
27
|
+
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
28
|
+
{% block bodyStart %}{% endblock %}
|
29
|
+
|
30
|
+
{% block skipLink %}
|
31
|
+
{{ govukSkipLink({
|
32
|
+
href: '#main-content',
|
33
|
+
text: 'Skip to main content'
|
34
|
+
}) }}
|
35
|
+
{% endblock %}
|
36
|
+
|
37
|
+
{% block header %}
|
38
|
+
{{ govukHeader({}) }}
|
39
|
+
{% endblock %}
|
40
|
+
|
41
|
+
{% block main %}
|
42
|
+
<div class="govuk-width-container">
|
43
|
+
{% block beforeContent %}{% endblock %}
|
44
|
+
<main class="govuk-main-wrapper {{ mainClasses }}" id="main-content" role="main">
|
45
|
+
{% block content %}{% endblock %}
|
46
|
+
</main>
|
47
|
+
</div>
|
48
|
+
{% endblock %}
|
49
|
+
|
50
|
+
{% block footer %}
|
51
|
+
{{ govukFooter({}) }}
|
52
|
+
{% endblock %}
|
53
|
+
|
54
|
+
{% block bodyEnd %}{% endblock %}
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Conditional Compatibility Mixin
|
6
|
+
///
|
7
|
+
/// Selectively output a block (available to the mixin as @content) if a given
|
8
|
+
/// $product is also identified as being used in the project.
|
9
|
+
///
|
10
|
+
/// This can then be used to include styles that are only needed to override
|
11
|
+
/// styles provided by those other products (e.g. where govuk_template has a
|
12
|
+
/// very specific link selector that otherwise affects buttons).
|
13
|
+
///
|
14
|
+
/// @example scss
|
15
|
+
/// // Override .my-class if GOV.UK Template is also being used
|
16
|
+
/// @include govuk-compatibility(govuk_template) {
|
17
|
+
/// .my-class {
|
18
|
+
/// color: inherit;
|
19
|
+
/// }
|
20
|
+
/// }
|
21
|
+
///
|
22
|
+
/// @param {String} $product - Name of product that we are 'defending' against.
|
23
|
+
/// @content Passed content is outputted only if Frontend is being used with
|
24
|
+
/// this product
|
25
|
+
/// @throw Errors if product name is not recognised
|
26
|
+
/// @access public
|
27
|
+
|
28
|
+
@mixin govuk-compatibility($product) {
|
29
|
+
@if map-has-key($_govuk-compatibility, $product) {
|
30
|
+
@if map-get($_govuk-compatibility, $product) == true {
|
31
|
+
@content;
|
32
|
+
}
|
33
|
+
} @else {
|
34
|
+
@error "Non existent product '#{$product}'";
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
/// List of modules which have already been exported
|
6
|
+
///
|
7
|
+
/// @type List
|
8
|
+
/// @access private
|
9
|
+
|
10
|
+
$_govuk-imported-modules: () !default;
|
11
|
+
|
12
|
+
/// Export module
|
13
|
+
///
|
14
|
+
/// Ensure that the modules of CSS that we define throughout Frontend are only
|
15
|
+
/// included in the generated CSS once, no matter how many times they are
|
16
|
+
/// imported across the individual components.
|
17
|
+
///
|
18
|
+
/// @param {String} $name - Name of module - must be unique within the codebase
|
19
|
+
/// @content The passed content will only be outputted if a module of the same
|
20
|
+
/// $name has not already been outputted
|
21
|
+
/// @access public
|
22
|
+
|
23
|
+
@mixin govuk-exports($name) {
|
24
|
+
// If the mixin is not in the list of modules already exported...
|
25
|
+
@if (index($_govuk-imported-modules, $name) == null) {
|
26
|
+
// ... then add it to the list
|
27
|
+
$_govuk-imported-modules: append($_govuk-imported-modules, $name) !global;
|
28
|
+
// ... and output the CSS for that module
|
29
|
+
@content;
|
30
|
+
}
|
31
|
+
// The next time exports is called for the module of the same name, it will be
|
32
|
+
// found in the list and so nothing will be outputted.
|
33
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
// Disable indentation linting in this file only
|
6
|
+
// sass-lint:disable indentation
|
7
|
+
|
8
|
+
/// Font URL
|
9
|
+
///
|
10
|
+
/// If a custom font-url handler is defined ($govuk-font-url-function) then
|
11
|
+
/// it will be called, otherwise a url will be returned with the filename
|
12
|
+
/// appended to the font path.
|
13
|
+
///
|
14
|
+
/// @param {String} $filename - Font filename
|
15
|
+
/// @return {String} URL for the filename, wrapped in `url()`
|
16
|
+
/// @access public
|
17
|
+
|
18
|
+
@function govuk-font-url($filename) {
|
19
|
+
$use-custom-function: variable-exists("govuk-font-url-function")
|
20
|
+
and $govuk-font-url-function
|
21
|
+
and function-exists($govuk-font-url-function);
|
22
|
+
|
23
|
+
@if ($use-custom-function) {
|
24
|
+
@return call($govuk-font-url-function, $filename);
|
25
|
+
} @else {
|
26
|
+
@return url($govuk-fonts-path + $filename);
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Conditionally include rules only for IE8
|
6
|
+
///
|
7
|
+
/// @content Passed content is only outputted if we're compiling a stylesheet
|
8
|
+
/// that targets IE8 (if `$govuk-is-ie8` is true)
|
9
|
+
///
|
10
|
+
/// @example scss - Usage
|
11
|
+
///
|
12
|
+
/// .foo {
|
13
|
+
/// min-width: 100px;
|
14
|
+
/// // Specify width for IE8 only
|
15
|
+
/// @include govuk-if-ie8 {
|
16
|
+
/// width: 100px;
|
17
|
+
/// }
|
18
|
+
/// }
|
19
|
+
///
|
20
|
+
/// @access public
|
21
|
+
|
22
|
+
@mixin govuk-if-ie8 {
|
23
|
+
@if $govuk-is-ie8 {
|
24
|
+
@content;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
/// Conditionally exclude rules for IE8
|
29
|
+
///
|
30
|
+
/// @content Passed content is only outputted if we're not compiling a
|
31
|
+
/// stylesheet that targets IE8 (if `$govuk-is-ie8` is false)
|
32
|
+
///
|
33
|
+
/// @example scss - Usage
|
34
|
+
///
|
35
|
+
/// .foo {
|
36
|
+
/// font-weight: bold;
|
37
|
+
///
|
38
|
+
/// // Enhance foo only for modern browsers (not IE8)
|
39
|
+
/// @include govuk-not-ie8 {
|
40
|
+
/// font-family: "Comic Sans MS", "Curlz MT" cursive, sans-serif;
|
41
|
+
/// color: #FF69B4;
|
42
|
+
/// }
|
43
|
+
/// }
|
44
|
+
///
|
45
|
+
/// @access public
|
46
|
+
|
47
|
+
@mixin govuk-not-ie8 {
|
48
|
+
@if not $govuk-is-ie8 {
|
49
|
+
@content;
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Syntactic sugar around Sass' built-in `if` function that does not require
|
6
|
+
/// you to pass a value for `$if-false`.
|
7
|
+
///
|
8
|
+
/// @param {Boolean} $condition - Whether to return the value of `$if-true`
|
9
|
+
/// @param {Mixed} $if-true - Value to return if `$condition` is truthy
|
10
|
+
/// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null
|
11
|
+
/// @access public
|
12
|
+
|
13
|
+
@function iff($condition, $if-true) {
|
14
|
+
@return if($condition, $if-true, null);
|
15
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
// Disable indentation linting in this file only
|
6
|
+
// sass-lint:disable indentation
|
7
|
+
|
8
|
+
/// Image URL
|
9
|
+
///
|
10
|
+
/// If a custom image-url handler is defined ($govuk-image-url-function) then
|
11
|
+
/// it will be called, otherwise a url will be returned with the filename
|
12
|
+
/// appended to the image path.
|
13
|
+
///
|
14
|
+
/// @param {String} Filename for the image to load
|
15
|
+
/// @return {String} URL for the filename, wrapped in `url()`
|
16
|
+
/// @access public
|
17
|
+
|
18
|
+
@function govuk-image-url($filename) {
|
19
|
+
$use-custom-function: variable-exists("govuk-image-url-function")
|
20
|
+
and $govuk-image-url-function
|
21
|
+
and function-exists($govuk-image-url-function);
|
22
|
+
|
23
|
+
@if ($use-custom-function) {
|
24
|
+
@return call($govuk-image-url-function, $filename);
|
25
|
+
} @else {
|
26
|
+
@return url($govuk-images-path + $filename);
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
////
|
2
|
+
/// @group tools
|
3
|
+
////
|
4
|
+
|
5
|
+
/// Convert pixels to em
|
6
|
+
///
|
7
|
+
/// @param {Number} $value - Length in pixels
|
8
|
+
/// @param {Number} $context-font-size - Font size of element
|
9
|
+
/// @return {Number} Length in ems
|
10
|
+
/// @access public
|
11
|
+
|
12
|
+
@function govuk-em($value, $context-font-size) {
|
13
|
+
@if (unitless($value)) {
|
14
|
+
$value: $value * 1px;
|
15
|
+
}
|
16
|
+
@if (unitless($context-font-size)) {
|
17
|
+
$context-font-size: $context-font-size * 1px;
|
18
|
+
}
|
19
|
+
@return $value / $context-font-size * 1em;
|
20
|
+
}
|
@@ -0,0 +1,351 @@
|
|
1
|
+
// mq() v4.0.2
|
2
|
+
// sass-mq/sass-mq
|
3
|
+
|
4
|
+
// sass-lint:disable-all
|
5
|
+
|
6
|
+
@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
|
7
|
+
// See https://github.com/sass-mq/sass-mq/pull/10
|
8
|
+
|
9
|
+
/// Base font size on the `<body>` element
|
10
|
+
/// @type Number (unit)
|
11
|
+
$mq-base-font-size: 16px !default;
|
12
|
+
|
13
|
+
/// Responsive mode
|
14
|
+
///
|
15
|
+
/// Set to `false` to enable support for browsers that do not support @media queries,
|
16
|
+
/// (IE <= 8, Firefox <= 3, Opera <= 9)
|
17
|
+
///
|
18
|
+
/// You could create a stylesheet served exclusively to older browsers,
|
19
|
+
/// where @media queries are rasterized
|
20
|
+
///
|
21
|
+
/// @example scss
|
22
|
+
/// // old-ie.scss
|
23
|
+
/// $mq-responsive: false;
|
24
|
+
/// @import 'main'; // @media queries in this file will be rasterized up to $mq-static-breakpoint
|
25
|
+
/// // larger breakpoints will be ignored
|
26
|
+
///
|
27
|
+
/// @type Boolean
|
28
|
+
/// @link https://github.com/sass-mq/sass-mq#responsive-mode-off Disabled responsive mode documentation
|
29
|
+
$mq-responsive: true !default;
|
30
|
+
|
31
|
+
/// Breakpoint list
|
32
|
+
///
|
33
|
+
/// Name your breakpoints in a way that creates a ubiquitous language
|
34
|
+
/// across team members. It will improve communication between
|
35
|
+
/// stakeholders, designers, developers, and testers.
|
36
|
+
///
|
37
|
+
/// @type Map
|
38
|
+
/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint Full documentation and examples
|
39
|
+
$mq-breakpoints: (
|
40
|
+
mobile: 320px,
|
41
|
+
tablet: 740px,
|
42
|
+
desktop: 980px,
|
43
|
+
wide: 1300px
|
44
|
+
) !default;
|
45
|
+
|
46
|
+
/// Static breakpoint (for fixed-width layouts)
|
47
|
+
///
|
48
|
+
/// Define the breakpoint from $mq-breakpoints that should
|
49
|
+
/// be used as the target width for the fixed-width layout
|
50
|
+
/// (i.e. when $mq-responsive is set to 'false') in a old-ie.scss
|
51
|
+
///
|
52
|
+
/// @example scss
|
53
|
+
/// // tablet-only.scss
|
54
|
+
/// //
|
55
|
+
/// // Ignore all styles above tablet breakpoint,
|
56
|
+
/// // and fix the styles (e.g. layout) at tablet width
|
57
|
+
/// $mq-responsive: false;
|
58
|
+
/// $mq-static-breakpoint: tablet;
|
59
|
+
/// @import 'main'; // @media queries in this file will be rasterized up to tablet
|
60
|
+
/// // larger breakpoints will be ignored
|
61
|
+
///
|
62
|
+
/// @type String
|
63
|
+
/// @link https://github.com/sass-mq/sass-mq#adding-custom-breakpoints Full documentation and examples
|
64
|
+
$mq-static-breakpoint: desktop !default;
|
65
|
+
|
66
|
+
/// Show breakpoints in the top right corner
|
67
|
+
///
|
68
|
+
/// If you want to display the currently active breakpoint in the top
|
69
|
+
/// right corner of your site during development, add the breakpoints
|
70
|
+
/// to this list, ordered by width, e.g. (mobile, tablet, desktop).
|
71
|
+
///
|
72
|
+
/// @type map
|
73
|
+
$mq-show-breakpoints: () !default;
|
74
|
+
|
75
|
+
/// Customize the media type (e.g. `@media screen` or `@media print`)
|
76
|
+
/// By default sass-mq uses an "all" media type (`@media all and …`)
|
77
|
+
///
|
78
|
+
/// @type String
|
79
|
+
/// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and examples
|
80
|
+
$mq-media-type: all !default;
|
81
|
+
|
82
|
+
/// Convert pixels to ems
|
83
|
+
///
|
84
|
+
/// @param {Number} $px - value to convert
|
85
|
+
/// @param {Number} $base-font-size ($mq-base-font-size) - `<body>` font size
|
86
|
+
///
|
87
|
+
/// @example scss
|
88
|
+
/// $font-size-in-ems: mq-px2em(16px);
|
89
|
+
/// p { font-size: mq-px2em(16px); }
|
90
|
+
///
|
91
|
+
/// @requires $mq-base-font-size
|
92
|
+
/// @returns {Number}
|
93
|
+
@function mq-px2em($px, $base-font-size: $mq-base-font-size) {
|
94
|
+
@if unitless($px) {
|
95
|
+
@warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
|
96
|
+
@return mq-px2em($px * 1px, $base-font-size);
|
97
|
+
} @else if unit($px) == em {
|
98
|
+
@return $px;
|
99
|
+
}
|
100
|
+
@return ($px / $base-font-size) * 1em;
|
101
|
+
}
|
102
|
+
|
103
|
+
/// Get a breakpoint's width
|
104
|
+
///
|
105
|
+
/// @param {String} $name - Name of the breakpoint. One of $mq-breakpoints
|
106
|
+
///
|
107
|
+
/// @example scss
|
108
|
+
/// $tablet-width: mq-get-breakpoint-width(tablet);
|
109
|
+
/// @media (min-width: mq-get-breakpoint-width(desktop)) {}
|
110
|
+
///
|
111
|
+
/// @requires {Variable} $mq-breakpoints
|
112
|
+
///
|
113
|
+
/// @returns {Number} Value in pixels
|
114
|
+
@function mq-get-breakpoint-width($name, $breakpoints: $mq-breakpoints) {
|
115
|
+
@if map-has-key($breakpoints, $name) {
|
116
|
+
@return map-get($breakpoints, $name);
|
117
|
+
} @else {
|
118
|
+
@warn "Breakpoint #{$name} wasn't found in $breakpoints.";
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
/// Media Query mixin
|
123
|
+
///
|
124
|
+
/// @param {String | Boolean} $from (false) - One of $mq-breakpoints
|
125
|
+
/// @param {String | Boolean} $until (false) - One of $mq-breakpoints
|
126
|
+
/// @param {String | Boolean} $and (false) - Additional media query parameters
|
127
|
+
/// @param {String} $media-type ($mq-media-type) - Media type: screen, print…
|
128
|
+
///
|
129
|
+
/// @ignore Undocumented API, for advanced use only:
|
130
|
+
/// @ignore @param {Map} $breakpoints ($mq-breakpoints)
|
131
|
+
/// @ignore @param {String} $static-breakpoint ($mq-static-breakpoint)
|
132
|
+
///
|
133
|
+
/// @content styling rules, wrapped into a @media query when $responsive is true
|
134
|
+
///
|
135
|
+
/// @requires {Variable} $mq-media-type
|
136
|
+
/// @requires {Variable} $mq-breakpoints
|
137
|
+
/// @requires {Variable} $mq-static-breakpoint
|
138
|
+
/// @requires {function} mq-px2em
|
139
|
+
/// @requires {function} mq-get-breakpoint-width
|
140
|
+
///
|
141
|
+
/// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
|
142
|
+
///
|
143
|
+
/// @example scss
|
144
|
+
/// .element {
|
145
|
+
/// @include mq($from: mobile) {
|
146
|
+
/// color: red;
|
147
|
+
/// }
|
148
|
+
/// @include mq($until: tablet) {
|
149
|
+
/// color: blue;
|
150
|
+
/// }
|
151
|
+
/// @include mq(mobile, tablet) {
|
152
|
+
/// color: green;
|
153
|
+
/// }
|
154
|
+
/// @include mq($from: tablet, $and: '(orientation: landscape)') {
|
155
|
+
/// color: teal;
|
156
|
+
/// }
|
157
|
+
/// @include mq(950px) {
|
158
|
+
/// color: hotpink;
|
159
|
+
/// }
|
160
|
+
/// @include mq(tablet, $media-type: screen) {
|
161
|
+
/// color: hotpink;
|
162
|
+
/// }
|
163
|
+
/// // Advanced use:
|
164
|
+
/// $my-breakpoints: (L: 900px, XL: 1200px);
|
165
|
+
/// @include mq(L, $breakpoints: $my-breakpoints, $static-breakpoint: L) {
|
166
|
+
/// color: hotpink;
|
167
|
+
/// }
|
168
|
+
/// }
|
169
|
+
@mixin mq(
|
170
|
+
$from: false,
|
171
|
+
$until: false,
|
172
|
+
$and: false,
|
173
|
+
$media-type: $mq-media-type,
|
174
|
+
$breakpoints: $mq-breakpoints,
|
175
|
+
$responsive: $mq-responsive,
|
176
|
+
$static-breakpoint: $mq-static-breakpoint
|
177
|
+
) {
|
178
|
+
$min-width: 0;
|
179
|
+
$max-width: 0;
|
180
|
+
$media-query: '';
|
181
|
+
|
182
|
+
// From: this breakpoint (inclusive)
|
183
|
+
@if $from {
|
184
|
+
@if type-of($from) == number {
|
185
|
+
$min-width: mq-px2em($from);
|
186
|
+
} @else {
|
187
|
+
$min-width: mq-px2em(mq-get-breakpoint-width($from, $breakpoints));
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
// Until: that breakpoint (exclusive)
|
192
|
+
@if $until {
|
193
|
+
@if type-of($until) == number {
|
194
|
+
$max-width: mq-px2em($until);
|
195
|
+
} @else {
|
196
|
+
$max-width: mq-px2em(mq-get-breakpoint-width($until, $breakpoints)) - .01em;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
// Responsive support is disabled, rasterize the output outside @media blocks
|
201
|
+
// The browser will rely on the cascade itself.
|
202
|
+
@if $responsive == false {
|
203
|
+
$static-breakpoint-width: mq-get-breakpoint-width($static-breakpoint, $breakpoints);
|
204
|
+
$target-width: mq-px2em($static-breakpoint-width);
|
205
|
+
|
206
|
+
// Output only rules that start at or span our target width
|
207
|
+
@if (
|
208
|
+
$and == false
|
209
|
+
and $min-width <= $target-width
|
210
|
+
and (
|
211
|
+
$until == false or $max-width >= $target-width
|
212
|
+
)
|
213
|
+
and $media-type != 'print'
|
214
|
+
) {
|
215
|
+
@content;
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
// Responsive support is enabled, output rules inside @media queries
|
220
|
+
@else {
|
221
|
+
@if $min-width != 0 { $media-query: '#{$media-query} and (min-width: #{$min-width})'; }
|
222
|
+
@if $max-width != 0 { $media-query: '#{$media-query} and (max-width: #{$max-width})'; }
|
223
|
+
@if $and { $media-query: '#{$media-query} and #{$and}'; }
|
224
|
+
|
225
|
+
// Remove unnecessary media query prefix 'all and '
|
226
|
+
@if ($media-type == 'all' and $media-query != '') {
|
227
|
+
$media-type: '';
|
228
|
+
$media-query: str-slice(unquote($media-query), 6);
|
229
|
+
}
|
230
|
+
|
231
|
+
@media #{$media-type + $media-query} {
|
232
|
+
@content;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
|
237
|
+
/// Quick sort
|
238
|
+
///
|
239
|
+
/// @author Sam Richards
|
240
|
+
/// @access private
|
241
|
+
/// @param {List} $list - List to sort
|
242
|
+
/// @returns {List} Sorted List
|
243
|
+
@function _mq-quick-sort($list) {
|
244
|
+
$less: ();
|
245
|
+
$equal: ();
|
246
|
+
$large: ();
|
247
|
+
|
248
|
+
@if length($list) > 1 {
|
249
|
+
$seed: nth($list, ceil(length($list) / 2));
|
250
|
+
|
251
|
+
@each $item in $list {
|
252
|
+
@if ($item == $seed) {
|
253
|
+
$equal: append($equal, $item);
|
254
|
+
} @else if ($item < $seed) {
|
255
|
+
$less: append($less, $item);
|
256
|
+
} @else if ($item > $seed) {
|
257
|
+
$large: append($large, $item);
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
@return join(join(_mq-quick-sort($less), $equal), _mq-quick-sort($large));
|
262
|
+
}
|
263
|
+
|
264
|
+
@return $list;
|
265
|
+
}
|
266
|
+
|
267
|
+
/// Sort a map by values (works with numbers only)
|
268
|
+
///
|
269
|
+
/// @access private
|
270
|
+
/// @param {Map} $map - Map to sort
|
271
|
+
/// @returns {Map} Map sorted by value
|
272
|
+
@function _mq-map-sort-by-value($map) {
|
273
|
+
$map-sorted: ();
|
274
|
+
$map-keys: map-keys($map);
|
275
|
+
$map-values: map-values($map);
|
276
|
+
$map-values-sorted: _mq-quick-sort($map-values);
|
277
|
+
|
278
|
+
// Reorder key/value pairs based on key values
|
279
|
+
@each $value in $map-values-sorted {
|
280
|
+
$index: index($map-values, $value);
|
281
|
+
$key: nth($map-keys, $index);
|
282
|
+
$map-sorted: map-merge($map-sorted, ($key: $value));
|
283
|
+
|
284
|
+
// Unset the value in $map-values to prevent the loop
|
285
|
+
// from finding the same index twice
|
286
|
+
$map-values: set-nth($map-values, $index, 0);
|
287
|
+
}
|
288
|
+
|
289
|
+
@return $map-sorted;
|
290
|
+
}
|
291
|
+
|
292
|
+
/// Add a breakpoint
|
293
|
+
///
|
294
|
+
/// @param {String} $name - Name of the breakpoint
|
295
|
+
/// @param {Number} $width - Width of the breakpoint
|
296
|
+
///
|
297
|
+
/// @requires {Variable} $mq-breakpoints
|
298
|
+
///
|
299
|
+
/// @example scss
|
300
|
+
/// @include mq-add-breakpoint(tvscreen, 1920px);
|
301
|
+
/// @include mq(tvscreen) {}
|
302
|
+
@mixin mq-add-breakpoint($name, $width) {
|
303
|
+
$new-breakpoint: ($name: $width);
|
304
|
+
$mq-breakpoints: map-merge($mq-breakpoints, $new-breakpoint) !global;
|
305
|
+
$mq-breakpoints: _mq-map-sort-by-value($mq-breakpoints) !global;
|
306
|
+
}
|
307
|
+
|
308
|
+
/// Show the active breakpoint in the top right corner of the viewport
|
309
|
+
/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
|
310
|
+
///
|
311
|
+
/// @param {List} $show-breakpoints ($mq-show-breakpoints) - List of breakpoints to show in the top right corner
|
312
|
+
/// @param {Map} $breakpoints ($mq-breakpoints) - Breakpoint names and sizes
|
313
|
+
///
|
314
|
+
/// @requires {Variable} $mq-breakpoints
|
315
|
+
/// @requires {Variable} $mq-show-breakpoints
|
316
|
+
///
|
317
|
+
/// @example scss
|
318
|
+
/// // Show breakpoints using global settings
|
319
|
+
/// @include mq-show-breakpoints;
|
320
|
+
///
|
321
|
+
/// // Show breakpoints using custom settings
|
322
|
+
/// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px));
|
323
|
+
@mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) {
|
324
|
+
body:before {
|
325
|
+
background-color: #FCF8E3;
|
326
|
+
border-bottom: 1px solid #FBEED5;
|
327
|
+
border-left: 1px solid #FBEED5;
|
328
|
+
color: #C09853;
|
329
|
+
font: small-caption;
|
330
|
+
padding: 3px 6px;
|
331
|
+
pointer-events: none;
|
332
|
+
position: fixed;
|
333
|
+
right: 0;
|
334
|
+
top: 0;
|
335
|
+
z-index: 100;
|
336
|
+
|
337
|
+
// Loop through the breakpoints that should be shown
|
338
|
+
@each $show-breakpoint in $show-breakpoints {
|
339
|
+
$width: mq-get-breakpoint-width($show-breakpoint, $breakpoints);
|
340
|
+
@include mq($show-breakpoint, $breakpoints: $breakpoints) {
|
341
|
+
content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})";
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
@if length($mq-show-breakpoints) > 0 {
|
348
|
+
@include mq-show-breakpoints;
|
349
|
+
}
|
350
|
+
|
351
|
+
// sass-lint:enable-all
|