@nationalarchives/frontend 0.1.15-prerelease → 0.1.17-prerelease
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.
- package/LICENCE +21 -0
- package/nationalarchives/all.css +13 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.scss +2 -3
- package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +13 -41
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +8 -4
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +9 -30
- package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
- package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
- package/nationalarchives/components/breadcrumbs/template.njk +17 -12
- package/nationalarchives/components/button/_button-group.scss +18 -0
- package/nationalarchives/components/button/_index.scss +25 -9
- package/nationalarchives/components/button/button.stories.js +64 -8
- package/nationalarchives/components/button/fixtures.json +3 -3
- package/nationalarchives/components/button/macro-options.json +13 -1
- package/nationalarchives/components/button/template.njk +7 -2
- package/nationalarchives/components/card/_index.scss +67 -51
- package/nationalarchives/components/card/card.stories.js +123 -10
- package/nationalarchives/components/card/fixtures.json +62 -10
- package/nationalarchives/components/card/macro-options.json +9 -3
- package/nationalarchives/components/card/template.njk +12 -8
- package/nationalarchives/components/filters/_index.scss +19 -14
- package/nationalarchives/components/filters/filters.stories.js +3 -4
- package/nationalarchives/components/footer/_index.scss +195 -72
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +82 -74
- package/nationalarchives/components/footer/macro-options.json +34 -8
- package/nationalarchives/components/footer/template.njk +110 -53
- package/nationalarchives/components/grid/_index.scss +2 -2
- package/nationalarchives/components/grid/grid.stories.js +2 -3
- package/nationalarchives/components/header/_index.scss +57 -23
- package/nationalarchives/components/header/header.stories.js +2 -3
- package/nationalarchives/components/hero/_index.scss +4 -8
- package/nationalarchives/components/hero/hero.stories.js +2 -3
- package/nationalarchives/components/index-grid/_index.scss +28 -7
- package/nationalarchives/components/index-grid/index-grid.stories.js +27 -4
- package/nationalarchives/components/index-grid/macro-options.json +12 -0
- package/nationalarchives/components/index-grid/template.njk +9 -11
- package/nationalarchives/components/message/_index.scss +12 -6
- package/nationalarchives/components/message/phase-banner.stories.js +2 -3
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
- package/nationalarchives/components/picture/_index.scss +5 -5
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +2 -0
- package/nationalarchives/components/picture/picture.stories.js +2 -3
- package/nationalarchives/components/profile/profile.stories.js +2 -3
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
- package/nationalarchives/components/skip-link/_index.scss +63 -0
- package/nationalarchives/components/skip-link/fixtures.json +11 -0
- package/nationalarchives/{patterns/featured-collection → components/skip-link}/macro-options.json +10 -4
- package/nationalarchives/components/skip-link/macro.njk +3 -0
- package/nationalarchives/{patterns/featured-collection/featured-collection.stories.js → components/skip-link/skip-link.stories.js} +7 -10
- package/nationalarchives/components/skip-link/template.njk +4 -0
- package/nationalarchives/components/tabs/_index.scss +7 -5
- package/nationalarchives/components/tabs/tabs.stories.js +8 -9
- package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
- package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
- package/nationalarchives/lib/font-awesome/_core.scss +42 -0
- package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
- package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
- package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
- package/nationalarchives/lib/font-awesome/_list.scss +20 -0
- package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
- package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
- package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
- package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
- package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
- package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
- package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
- package/nationalarchives/lib/font-awesome/brands.scss +34 -0
- package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
- package/nationalarchives/lib/font-awesome/regular.scss +28 -0
- package/nationalarchives/lib/font-awesome/solid.scss +28 -0
- package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +494 -91
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
- package/nationalarchives/stories/utilities/overrides/overrides.stories.js +8 -14
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
- package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
- package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
- package/nationalarchives/templates/layouts/_generic.njk +10 -8
- package/nationalarchives/tools/_colour.scss +163 -49
- package/nationalarchives/tools/_index.scss +0 -1
- package/nationalarchives/tools/_typography.scss +13 -0
- package/nationalarchives/utilities/_debug.scss +41 -1
- package/nationalarchives/utilities/_font-awesome.scss +5 -0
- package/nationalarchives/utilities/_global.scss +75 -26
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +54 -9
- package/nationalarchives/utilities/_typography.scss +203 -65
- package/nationalarchives/variables/_assets.scss +1 -1
- package/nationalarchives/variables/_colour.scss +93 -93
- package/nationalarchives/variables/_grid.scss +1 -1
- package/nationalarchives/variables/_media.scss +23 -23
- package/nationalarchives/variables/_spacing.scss +12 -2
- package/nationalarchives/variables/_typography.scss +4 -1
- package/package.json +14 -14
- package/nationalarchives/patterns/_index.scss +0 -1
- package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
- package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
- package/nationalarchives/patterns/featured-collection/template.njk +0 -96
- package/nationalarchives/tools/_assets.scss +0 -5
@@ -5,62 +5,42 @@ import * as OverrideStories from './overrides.stories';
|
|
5
5
|
|
6
6
|
# Overrides
|
7
7
|
|
8
|
-
##
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- `
|
22
|
-
- `
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
###
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- `tna-!--padding-top-l`
|
46
|
-
- `tna-!--padding-top-xl`
|
47
|
-
|
48
|
-
### Bottom
|
49
|
-
|
50
|
-
- `tna-!--no-padding-bottom`
|
51
|
-
- `tna-!--padding-bottom-xs`
|
52
|
-
- `tna-!--padding-bottom-s`
|
53
|
-
- `tna-!--padding-bottom-m`
|
54
|
-
- `tna-!--padding-bottom-l`
|
55
|
-
- `tna-!--padding-bottom-xl`
|
56
|
-
|
57
|
-
### Vertical (top and bottom)
|
58
|
-
|
59
|
-
- `tna-!--no-padding-vertical`
|
60
|
-
- `tna-!--padding-vertical-xs`
|
61
|
-
- `tna-!--padding-vertical-s`
|
62
|
-
- `tna-!--padding-vertical-m`
|
63
|
-
- `tna-!--padding-vertical-l`
|
64
|
-
- `tna-!--padding-vertical-xl`
|
8
|
+
## Properties
|
9
|
+
|
10
|
+
Property options: `margin`, `padding`
|
11
|
+
|
12
|
+
```css
|
13
|
+
tna-!--no-[property]-[direction]
|
14
|
+
```
|
15
|
+
|
16
|
+
### No margin/padding
|
17
|
+
|
18
|
+
Direction options:
|
19
|
+
|
20
|
+
- `top`
|
21
|
+
- `bottom`
|
22
|
+
- `vertical` - `top` and `bottom`
|
23
|
+
|
24
|
+
```css
|
25
|
+
tna-!--no-[property]-[direction]
|
26
|
+
```
|
27
|
+
|
28
|
+
### Sizes
|
29
|
+
|
30
|
+
Size options: `xs`, `s`, `m`, `l`, `xl`, `xxl`
|
31
|
+
|
32
|
+
```css
|
33
|
+
tna-!--[property]-[direction]-[size]
|
34
|
+
```
|
35
|
+
|
36
|
+
### Responsive
|
37
|
+
|
38
|
+
Device options: `medium`, `small`, `tiny`
|
39
|
+
|
40
|
+
```css
|
41
|
+
tna-!--no-[property]-[direction]-[device]
|
42
|
+
tna-!--[property]-[direction]-[size]-[device]
|
43
|
+
```
|
44
|
+
|
65
45
|
|
66
46
|
|
@@ -1,14 +1,7 @@
|
|
1
1
|
const argTypes = {
|
2
2
|
marginTop: {
|
3
3
|
control: "radio",
|
4
|
-
options: [
|
5
|
-
"none",
|
6
|
-
// "xs",
|
7
|
-
"s",
|
8
|
-
"m",
|
9
|
-
"l",
|
10
|
-
"xl",
|
11
|
-
],
|
4
|
+
options: ["none", "xs", "s", "m", "l", "xl"],
|
12
5
|
},
|
13
6
|
};
|
14
7
|
|
@@ -22,12 +15,13 @@ const Template = ({ marginTop }) => {
|
|
22
15
|
marginTop === "none"
|
23
16
|
? `tna-!--no-margin-top`
|
24
17
|
: `tna-!--margin-top-${marginTop}`;
|
25
|
-
return `<p class="tna-!--
|
26
|
-
<p class="tna-!--
|
27
|
-
<p class="tna-!--
|
28
|
-
<p class="tna-!--
|
29
|
-
<p class="tna-!--
|
30
|
-
<p class="tna-!--no-margin-bottom
|
18
|
+
return `<p class="tna-!--margin-bottom-xl">Lorem ipsum (tna-!--margin-bottom-xl)</p>
|
19
|
+
<p class="tna-!--margin-bottom-l">Lorem ipsum (tna-!--margin-bottom-l)</p>
|
20
|
+
<p class="tna-!--margin-bottom-m">Lorem ipsum (tna-!--margin-bottom-m)</p>
|
21
|
+
<p class="tna-!--margin-bottom-s">Lorem ipsum (tna-!--margin-bottom-s)</p>
|
22
|
+
<p class="tna-!--margin-bottom-xs">Lorem ipsum (tna-!--margin-bottom-xs)</p>
|
23
|
+
<p class="tna-!--no-margin-bottom">Lorem ipsum (tna-!--no-margin-bottom)</p>
|
24
|
+
<p class="${marginClass}">Lorem ipsum (${marginClass})</p>`;
|
31
25
|
};
|
32
26
|
|
33
27
|
export const Margin = Template.bind({});
|
@@ -22,7 +22,7 @@ const Template = ({
|
|
22
22
|
? `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
23
23
|
<h${level} class="tna-hgroup__title">
|
24
24
|
<span class="tna-hgroup__supertitle">${supertitle}</span>
|
25
|
-
|
25
|
+
<span class="tna-hgroup__title">${title}</span>
|
26
26
|
</h${level}>
|
27
27
|
</hgroup>`
|
28
28
|
: `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
@@ -13,6 +13,7 @@ We use a set of typefaces...
|
|
13
13
|
## Headings
|
14
14
|
|
15
15
|
<Canvas of={HeadingStories.Headings} />
|
16
|
+
<Canvas of={TypographyStories.HeadingLink} />
|
16
17
|
|
17
18
|
## Heading groups
|
18
19
|
|
@@ -30,6 +31,7 @@ In the second example, the heading will be read as two separate sentences; `Reco
|
|
30
31
|
|
31
32
|
<Canvas of={TypographyStories.Paragraph} />
|
32
33
|
<Canvas of={TypographyStories.Blockquote} />
|
34
|
+
<Canvas of={TypographyStories.SceneSetter} />
|
33
35
|
<Canvas of={ListStories.UnorderedList} />
|
34
36
|
<Canvas of={ListStories.UnorderedListPlain} />
|
35
37
|
<Canvas of={ListStories.OrderedList} />
|
@@ -18,6 +18,25 @@ Paragraph.args = {
|
|
18
18
|
],
|
19
19
|
};
|
20
20
|
|
21
|
+
const HeadingLinkTemplate = ({ text, href }) =>
|
22
|
+
`<h2 class="tna-heading">
|
23
|
+
<a href="${href}">${text}</a>
|
24
|
+
</h2>`;
|
25
|
+
export const HeadingLink = HeadingLinkTemplate.bind({});
|
26
|
+
HeadingLink.args = {
|
27
|
+
text: "Reaerching with The National Archives",
|
28
|
+
href: "#",
|
29
|
+
};
|
30
|
+
|
31
|
+
const SceneSetterTemplate = ({ text, href }) =>
|
32
|
+
`<p class="tna-scene-setter">
|
33
|
+
${text}
|
34
|
+
</p>`;
|
35
|
+
export const SceneSetter = SceneSetterTemplate.bind({});
|
36
|
+
SceneSetter.args = {
|
37
|
+
text: `We are the official archive of England and Wales. Discover 1,000 years of history through <a href="#">fascinating stories</a> from the past or <a href="#">start your own research</a> and <a href="#">search our catalogue</a> of 32 million records. <a href="#">Plan a visit</a> to access original historic documents from our collections then enjoy the grounds, café, and <a href="#">free exhibitions</a>.`,
|
38
|
+
};
|
39
|
+
|
21
40
|
const BlockquoteTemplate = ({
|
22
41
|
html,
|
23
42
|
author,
|
@@ -26,7 +45,7 @@ const BlockquoteTemplate = ({
|
|
26
45
|
${html}
|
27
46
|
</div>
|
28
47
|
<p class="tna-blockquote__author">${author}</p>
|
29
|
-
</
|
48
|
+
</blockquote>`;
|
30
49
|
export const Blockquote = BlockquoteTemplate.bind({});
|
31
50
|
Blockquote.args = {
|
32
51
|
html: "<p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
{# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
|
2
|
-
{
|
2
|
+
{% from "./components/skip-link/macro.njk" import tnaSkipLink -%}
|
3
3
|
<!DOCTYPE html>
|
4
4
|
<html lang="{{ htmlLang | default('en-GB') }}" class="tna-template {{ htmlClasses }}">
|
5
5
|
<head>
|
@@ -23,15 +23,17 @@
|
|
23
23
|
{% block stylesheets %}{% endblock %}
|
24
24
|
</head>
|
25
25
|
<body class="tna-template__body {{ bodyClasses }}" {%- for attribute, value in bodyAttributes %} {{attribute}}="{{value}}"{% endfor %}>
|
26
|
-
{% block
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
{% block bodyStart %}
|
27
|
+
{% block cookies %}{% endblock %}
|
28
|
+
|
29
|
+
{% block skipLink %}
|
30
|
+
{{ tnaSkipLink({
|
31
|
+
href: '#main-content',
|
32
|
+
text: 'Skip to main content'
|
33
|
+
}) }}
|
34
|
+
{% endblock %}
|
31
35
|
{% endblock %}
|
32
36
|
|
33
|
-
{% block bodyStart %}{% endblock %}
|
34
|
-
|
35
37
|
{% block header %}{% endblock %}
|
36
38
|
|
37
39
|
{% block main %}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
@use "sass:map";
|
2
2
|
@use "../features";
|
3
3
|
@use "../variables/colour";
|
4
|
+
@use "../tools/media";
|
5
|
+
|
6
|
+
@function brand-colour($colour) {
|
7
|
+
@return map.get(colour.$colour-palette-brand, $colour);
|
8
|
+
}
|
4
9
|
|
5
10
|
@mixin colour-css-vars() {
|
6
11
|
@each $name, $value in colour.$colour-palette-default {
|
@@ -26,46 +31,132 @@
|
|
26
31
|
}
|
27
32
|
}
|
28
33
|
|
29
|
-
@mixin
|
30
|
-
|
31
|
-
|
32
|
-
|
34
|
+
@mixin accent-css-vars($colour) {
|
35
|
+
@if $colour == "yellow" {
|
36
|
+
--accent: #{brand-colour("yellow")} !important;
|
37
|
+
--accent-background: #{brand-colour("yellow")} !important;
|
38
|
+
--accent-background-light: #{brand-colour("cream")} !important;
|
39
|
+
--accent-font-base: #{brand-colour("black")} !important;
|
40
|
+
--accent-font-dark: #{brand-colour("black")} !important;
|
41
|
+
--accent-font-light: #{rgba(brand-colour("black"), 0.7)} !important;
|
42
|
+
--accent-link: #{brand-colour("black")} !important;
|
43
|
+
--accent-link-visited: #{brand-colour("black")} !important;
|
44
|
+
--accent-keyline: #{rgba(brand-colour("black"), 0.5)} !important;
|
45
|
+
--accent-keyline-dark: #{rgba(brand-colour("black"), 0.8)} !important;
|
46
|
+
--button-accent-background: #{brand-colour("yellow")} !important;
|
33
47
|
} @else {
|
34
|
-
|
48
|
+
--accent-font-base: #{brand-colour("white")} !important;
|
49
|
+
--accent-font-dark: #{brand-colour("white")} !important;
|
50
|
+
--accent-font-light: #{rgba(brand-colour("white"), 0.7)} !important;
|
51
|
+
--accent-link: #{brand-colour("white")} !important;
|
52
|
+
--accent-link-visited: #{brand-colour("white")} !important;
|
53
|
+
--accent-keyline: #{rgba(brand-colour("white"), 0.5)} !important;
|
54
|
+
--accent-keyline-dark: #{rgba(brand-colour("white"), 0.8)} !important;
|
55
|
+
|
56
|
+
@if $colour == "black" {
|
57
|
+
// --accent: #{brand-colour("light-grey")} !important;
|
58
|
+
// --accent-background: #{brand-colour("black")} !important;
|
59
|
+
// --accent-background-light: #{brand-colour("light-grey")} !important;
|
60
|
+
// --button-accent-text: #{brand-colour("black")} !important;
|
61
|
+
// --button-accent-background: #{brand-colour("grey")} !important;
|
62
|
+
} @else {
|
63
|
+
--button-accent-text: #{brand-colour("white")} !important;
|
64
|
+
@if $colour == "pink" {
|
65
|
+
--accent: #{brand-colour("pink")} !important;
|
66
|
+
--accent-background: #{brand-colour("maroon")} !important;
|
67
|
+
--accent-background-light: #{brand-colour("pastel-pink")} !important;
|
68
|
+
--button-accent-background: #{brand-colour("maroon")} !important;
|
69
|
+
} @else if $colour == "orange" {
|
70
|
+
--accent: #{brand-colour("orange")} !important;
|
71
|
+
--accent-background: #{brand-colour("chestnut")} !important;
|
72
|
+
--accent-background-light: #{brand-colour("pastel-orange")} !important;
|
73
|
+
--button-accent-background: #{brand-colour("chestnut")} !important;
|
74
|
+
} @else if $colour == "green" {
|
75
|
+
--accent: #{brand-colour("green")} !important;
|
76
|
+
--accent-background: #{brand-colour("forest")} !important;
|
77
|
+
--accent-background-light: #{brand-colour("pastel-green")} !important;
|
78
|
+
--button-accent-background: #{brand-colour("forest")} !important;
|
79
|
+
} @else if $colour == "blue" {
|
80
|
+
--accent: #{brand-colour("blue")} !important;
|
81
|
+
--accent-background: #{brand-colour("navy")} !important;
|
82
|
+
--accent-background-light: #{brand-colour("pastel-blue")} !important;
|
83
|
+
--button-accent-background: #{brand-colour("navy")} !important;
|
84
|
+
}
|
85
|
+
}
|
35
86
|
}
|
36
87
|
}
|
37
88
|
|
38
|
-
@mixin colour-
|
89
|
+
@mixin colour-font($colour, $important: false) {
|
90
|
+
color: map.get(colour.$colour-palette-default, $colour);
|
91
|
+
color: var(--#{$colour}) if($important, !important, null);
|
92
|
+
}
|
93
|
+
|
94
|
+
@mixin colour-background($colour, $important: false) {
|
39
95
|
background-color: map.get(colour.$colour-palette-default, $colour);
|
40
|
-
|
41
|
-
background-color: var(--#{$colour}, var(--accent-default));
|
42
|
-
} @else {
|
43
|
-
background-color: var(--#{$colour});
|
44
|
-
}
|
96
|
+
background-color: var(--#{$colour}) if($important, !important, null);
|
45
97
|
}
|
46
98
|
|
47
|
-
@mixin colour-border(
|
48
|
-
|
49
|
-
|
99
|
+
@mixin colour-border(
|
100
|
+
$colour,
|
101
|
+
$width: "",
|
102
|
+
$style: solid,
|
103
|
+
$direction: "",
|
104
|
+
$important: false
|
105
|
+
) {
|
106
|
+
@if $direction != "" {
|
107
|
+
@if $width != "" {
|
108
|
+
$property: border-#{$direction};
|
109
|
+
border-#{$direction}: $width
|
110
|
+
map.get(colour.$colour-palette-default, $colour)
|
111
|
+
$style
|
112
|
+
if($important, !important, null);
|
113
|
+
border-#{$direction}: $width
|
114
|
+
var(--#{$colour})
|
115
|
+
$style
|
116
|
+
if($important, !important, null);
|
117
|
+
} @else {
|
118
|
+
border-#{$direction}-color: map.get(
|
119
|
+
colour.$colour-palette-default,
|
120
|
+
$colour
|
121
|
+
)
|
122
|
+
if($important, !important, null);
|
123
|
+
border-#{$direction}-color: var(--#{$colour})
|
124
|
+
if($important, !important, null);
|
125
|
+
}
|
126
|
+
} @else {
|
127
|
+
@if $width != "" {
|
128
|
+
border: $width
|
129
|
+
map.get(colour.$colour-palette-default, $colour)
|
130
|
+
$style
|
131
|
+
if($important, !important, null);
|
132
|
+
border: $width var(--#{$colour}) $style if($important, !important, null);
|
133
|
+
} @else {
|
134
|
+
border-color: map.get(colour.$colour-palette-default, $colour)
|
135
|
+
if($important, !important, null);
|
136
|
+
border-color: var(--#{$colour}) if($important, !important, null);
|
137
|
+
}
|
138
|
+
}
|
50
139
|
}
|
51
140
|
|
52
|
-
@mixin colour-outline($colour) {
|
53
|
-
outline-color: map.get(colour.$colour-palette-default, $colour)
|
54
|
-
|
141
|
+
@mixin colour-outline($colour, $important: false) {
|
142
|
+
outline-color: map.get(colour.$colour-palette-default, $colour)
|
143
|
+
if($important, !important, null);
|
144
|
+
outline-color: var(--#{$colour}) if($important, !important, null);
|
55
145
|
}
|
56
146
|
|
57
|
-
@mixin colour-fill($colour) {
|
58
|
-
fill: map.get(colour.$colour-palette-default, $colour)
|
59
|
-
|
147
|
+
@mixin colour-fill($colour, $important: false) {
|
148
|
+
fill: map.get(colour.$colour-palette-default, $colour)
|
149
|
+
if($important, !important, null);
|
150
|
+
fill: var(--#{$colour}) if($important, !important, null);
|
60
151
|
}
|
61
152
|
|
62
153
|
@mixin fixed {
|
63
154
|
@include colour-css-vars;
|
64
155
|
|
65
|
-
@include colour-font("font-base");
|
156
|
+
// @include colour-font("font-base");
|
66
157
|
}
|
67
158
|
|
68
|
-
|
159
|
+
%invert {
|
69
160
|
--font-base: var(--contrast-font-base);
|
70
161
|
--font-dark: var(--contrast-font-dark);
|
71
162
|
--font-light: var(--contrast-font-light);
|
@@ -74,44 +165,67 @@
|
|
74
165
|
--keyline: var(--contrast-keyline);
|
75
166
|
--keyline-dark: var(--contrast-keyline-dark);
|
76
167
|
|
77
|
-
@include colour-font("contrast-font-base");
|
78
168
|
@include colour-background("contrast-background");
|
79
|
-
}
|
80
169
|
|
81
|
-
@
|
82
|
-
|
170
|
+
@include colour-font("font-base");
|
171
|
+
}
|
83
172
|
|
84
|
-
|
85
|
-
|
173
|
+
@mixin invert {
|
174
|
+
@extend %invert;
|
175
|
+
}
|
86
176
|
|
87
|
-
|
88
|
-
|
89
|
-
|
177
|
+
%invert-on-mobile {
|
178
|
+
@include media.on-mobile {
|
179
|
+
--font-base: var(--contrast-font-base);
|
180
|
+
--font-dark: var(--contrast-font-dark);
|
181
|
+
--font-light: var(--contrast-font-light);
|
182
|
+
--link: var(--contrast-link);
|
183
|
+
--link-visited: var(--contrast-link-visited);
|
184
|
+
--keyline: var(--contrast-keyline);
|
185
|
+
--keyline-dark: var(--contrast-keyline-dark);
|
90
186
|
|
91
|
-
@
|
92
|
-
@include colour-css-vars-high-contrast;
|
93
|
-
}
|
187
|
+
@include colour-background("contrast-background");
|
94
188
|
|
95
|
-
@
|
96
|
-
@include colour-css-vars-high-contrast-dark;
|
97
|
-
}
|
189
|
+
@include colour-font("font-base");
|
98
190
|
}
|
191
|
+
}
|
99
192
|
|
100
|
-
|
101
|
-
|
102
|
-
|
193
|
+
@mixin invert-on-mobile {
|
194
|
+
@extend %invert-on-mobile;
|
195
|
+
}
|
103
196
|
|
104
|
-
|
105
|
-
|
106
|
-
|
197
|
+
%accent {
|
198
|
+
--font-base: var(--accent-font-base, var(--accent-font-base));
|
199
|
+
--font-dark: var(--accent-font-dark, var(--accent-font-dark));
|
200
|
+
--font-light: var(--accent-font-light, var(--accent-font-light));
|
201
|
+
--link: var(--accent-link, var(--accent-link));
|
202
|
+
--link-visited: var(--accent-link-visited, var(--accent-link-visited));
|
203
|
+
--keyline: var(--accent-keyline, var(--accent-keyline));
|
204
|
+
--keyline-dark: var(--accent-keyline-dark, var(--accent-keyline-dark));
|
107
205
|
|
108
|
-
|
109
|
-
@include colour-css-vars-high-contrast;
|
110
|
-
}
|
206
|
+
@include colour-background("accent-background");
|
111
207
|
|
112
|
-
|
113
|
-
|
114
|
-
|
208
|
+
@include colour-font("font-base");
|
209
|
+
}
|
210
|
+
|
211
|
+
@mixin accent {
|
212
|
+
@extend %accent;
|
213
|
+
}
|
214
|
+
|
215
|
+
%accent-background {
|
216
|
+
@include colour-background("accent-background");
|
217
|
+
}
|
218
|
+
|
219
|
+
@mixin accent-background {
|
220
|
+
@extend %accent-background;
|
221
|
+
}
|
222
|
+
|
223
|
+
%light-accent-background {
|
224
|
+
@include colour-background("accent-background-light");
|
225
|
+
}
|
226
|
+
|
227
|
+
@mixin light-accent-background {
|
228
|
+
@extend %light-accent-background;
|
115
229
|
}
|
116
230
|
|
117
231
|
@mixin on-high-contrast {
|
@@ -5,6 +5,11 @@
|
|
5
5
|
font-size: #{math.div($fontSizePx, typography.$base-font-size-px)}rem;
|
6
6
|
}
|
7
7
|
|
8
|
+
@mixin interacted-text-decoration {
|
9
|
+
text-decoration: underline;
|
10
|
+
text-decoration-thickness: typography.$interactive-text-decoration-thickness;
|
11
|
+
}
|
12
|
+
|
8
13
|
@mixin main-font-weight {
|
9
14
|
font-weight: typography.$font-weight-main;
|
10
15
|
}
|
@@ -26,6 +31,14 @@
|
|
26
31
|
@mixin detail-font {
|
27
32
|
font-family: typography.$font-family-detail;
|
28
33
|
font-weight: typography.$font-weight-detail;
|
34
|
+
}
|
35
|
+
|
36
|
+
@mixin detail-font-weight-bold {
|
37
|
+
font-weight: typography.$font-weight-detail-bold;
|
38
|
+
}
|
39
|
+
|
40
|
+
@mixin detail-font-small {
|
41
|
+
@include detail-font;
|
29
42
|
@include relative-font-size(14);
|
30
43
|
text-transform: uppercase;
|
31
44
|
line-height: #{math.div(typography.$base-font-size-px, 14)};
|
@@ -1,11 +1,51 @@
|
|
1
1
|
@use "../features";
|
2
2
|
|
3
|
+
/*
|
4
|
+
* ==========================================
|
5
|
+
* WCAG 2.2 SC 2.5.8
|
6
|
+
* https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum
|
7
|
+
* ------------------------------------------
|
8
|
+
* AA - Small green circles should not intersect
|
9
|
+
* ------------------------------------------
|
10
|
+
*/
|
3
11
|
@if features.$debug-interactable-areas {
|
4
12
|
a,
|
5
13
|
button,
|
6
14
|
label[for] {
|
7
15
|
background-color: rgba(#f0a, 0.25) !important;
|
8
16
|
|
9
|
-
box-shadow:
|
17
|
+
box-shadow:
|
18
|
+
0 0 0 2px #f0a,
|
19
|
+
0 0 0.5rem #f0a !important;
|
20
|
+
|
21
|
+
position: relative;
|
22
|
+
|
23
|
+
&::before {
|
24
|
+
width: 20px;
|
25
|
+
height: 20px;
|
26
|
+
|
27
|
+
display: block;
|
28
|
+
|
29
|
+
position: absolute;
|
30
|
+
top: 50%;
|
31
|
+
left: 50%;
|
32
|
+
|
33
|
+
background-color: rgba(#0f3, 0.25) !important;
|
34
|
+
|
35
|
+
border-radius: 100%;
|
36
|
+
outline: 2px #0f3 solid;
|
37
|
+
outline-offset: 10px;
|
38
|
+
|
39
|
+
box-shadow:
|
40
|
+
0 0 0 2px #0f3,
|
41
|
+
0 0 0.5rem #0f3 !important;
|
42
|
+
|
43
|
+
transform: translateX(-50%) translateY(-50%);
|
44
|
+
|
45
|
+
content: "";
|
46
|
+
}
|
47
|
+
|
48
|
+
.tna-template--dark-theme & {
|
49
|
+
}
|
10
50
|
}
|
11
51
|
}
|