@nationalarchives/frontend 0.1.15-prerelease → 0.1.16-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.
Files changed (66) hide show
  1. package/LICENCE +21 -0
  2. package/nationalarchives/all.css +1 -1
  3. package/nationalarchives/all.css.map +1 -1
  4. package/nationalarchives/all.js +1 -1
  5. package/nationalarchives/all.js.map +1 -1
  6. package/nationalarchives/components/_index.scss +1 -0
  7. package/nationalarchives/components/breadcrumbs/_index.scss +11 -39
  8. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +8 -4
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +9 -30
  12. package/nationalarchives/components/breadcrumbs/fixtures.json +23 -1
  13. package/nationalarchives/components/breadcrumbs/macro-options.json +6 -0
  14. package/nationalarchives/components/breadcrumbs/template.njk +17 -12
  15. package/nationalarchives/components/button/_index.scss +1 -2
  16. package/nationalarchives/components/button/button.stories.js +2 -3
  17. package/nationalarchives/components/card/_index.scss +10 -9
  18. package/nationalarchives/components/card/card.stories.js +67 -5
  19. package/nationalarchives/components/card/fixtures.json +13 -0
  20. package/nationalarchives/components/card/macro-options.json +0 -6
  21. package/nationalarchives/components/card/template.njk +1 -1
  22. package/nationalarchives/components/filters/filters.stories.js +3 -4
  23. package/nationalarchives/components/footer/_index.scss +5 -16
  24. package/nationalarchives/components/footer/footer.stories.js +2 -3
  25. package/nationalarchives/components/grid/_index.scss +2 -2
  26. package/nationalarchives/components/grid/grid.stories.js +2 -3
  27. package/nationalarchives/components/header/_index.scss +17 -19
  28. package/nationalarchives/components/header/header.stories.js +2 -3
  29. package/nationalarchives/components/hero/_index.scss +3 -7
  30. package/nationalarchives/components/hero/hero.stories.js +2 -3
  31. package/nationalarchives/components/index-grid/_index.scss +1 -2
  32. package/nationalarchives/components/index-grid/index-grid.stories.js +2 -3
  33. package/nationalarchives/components/message/_index.scss +4 -6
  34. package/nationalarchives/components/message/phase-banner.stories.js +2 -3
  35. package/nationalarchives/components/phase-banner/phase-banner.stories.js +2 -3
  36. package/nationalarchives/components/picture/_index.scss +3 -5
  37. package/nationalarchives/components/picture/picture.stories.js +2 -3
  38. package/nationalarchives/components/profile/profile.stories.js +2 -3
  39. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +3 -4
  40. package/nationalarchives/components/skip-link/_index.scss +63 -0
  41. package/nationalarchives/components/skip-link/fixtures.json +11 -0
  42. package/nationalarchives/components/skip-link/macro-options.json +26 -0
  43. package/nationalarchives/components/skip-link/macro.njk +3 -0
  44. package/nationalarchives/components/skip-link/skip-link.stories.js +31 -0
  45. package/nationalarchives/components/skip-link/template.njk +4 -0
  46. package/nationalarchives/components/tabs/_index.scss +1 -2
  47. package/nationalarchives/components/tabs/tabs.stories.js +2 -3
  48. package/nationalarchives/patterns/featured-collection/_index.scss +2 -2
  49. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +2 -3
  50. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +19 -2
  51. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +8 -14
  52. package/nationalarchives/templates/layouts/_generic.njk +10 -8
  53. package/nationalarchives/tools/_colour.scss +87 -18
  54. package/nationalarchives/tools/_index.scss +0 -1
  55. package/nationalarchives/utilities/_debug.scss +41 -1
  56. package/nationalarchives/utilities/_global.scss +5 -0
  57. package/nationalarchives/utilities/_overrides.scss +17 -4
  58. package/nationalarchives/utilities/_typography.scss +6 -7
  59. package/nationalarchives/variables/_colour.scss +78 -84
  60. package/nationalarchives/variables/_grid.scss +1 -1
  61. package/nationalarchives/variables/_index.scss +0 -1
  62. package/nationalarchives/variables/_media.scss +23 -23
  63. package/nationalarchives/variables/_spacing.scss +10 -2
  64. package/package.json +2 -2
  65. package/nationalarchives/tools/_assets.scss +0 -5
  66. package/nationalarchives/variables/_assets.scss +0 -1
@@ -22,8 +22,8 @@ export default {
22
22
  argTypes,
23
23
  };
24
24
 
25
- const Template = ({ phase, message, classes, attributes }) => {
26
- return PhaseBanner({
25
+ const Template = ({ phase, message, classes, attributes }) =>
26
+ PhaseBanner({
27
27
  params: {
28
28
  phase,
29
29
  message,
@@ -31,7 +31,6 @@ const Template = ({ phase, message, classes, attributes }) => {
31
31
  attributes,
32
32
  },
33
33
  });
34
- };
35
34
 
36
35
  export const Discovery = Template.bind({});
37
36
  Discovery.args = {
@@ -50,13 +50,11 @@
50
50
 
51
51
  text-align: center;
52
52
 
53
- border-bottom: 1px solid;
54
- @include colour.colour-border("keyline");
53
+ @include colour.colour-border("keyline", 1px, solid, bottom);
55
54
  }
56
55
 
57
56
  @include colour.on-high-contrast {
58
- border-width: 1px 1px 0;
59
- @include colour.colour-border("keyline-dark");
60
- border-style: solid;
57
+ @include colour.colour-border("keyline-dark", 1px);
58
+ border-bottom-width: 0;
61
59
  }
62
60
  }
@@ -34,8 +34,8 @@ const Template = ({
34
34
  translation,
35
35
  classes,
36
36
  attributes,
37
- }) => {
38
- return Picture({
37
+ }) =>
38
+ Picture({
39
39
  params: {
40
40
  src,
41
41
  width,
@@ -48,7 +48,6 @@ const Template = ({
48
48
  attributes,
49
49
  },
50
50
  });
51
- };
52
51
 
53
52
  export const Standard = Template.bind({});
54
53
  Standard.args = {
@@ -17,14 +17,13 @@ export default {
17
17
  argTypes,
18
18
  };
19
19
 
20
- const Template = ({ classes, attributes }) => {
21
- return Profile({
20
+ const Template = ({ classes, attributes }) =>
21
+ Profile({
22
22
  params: {
23
23
  classes,
24
24
  attributes,
25
25
  },
26
26
  });
27
- };
28
27
 
29
28
  export const Standard = Template.bind({});
30
29
  Standard.args = {
@@ -19,12 +19,12 @@ Object.keys(argTypes).forEach((argType) => {
19
19
  });
20
20
 
21
21
  export default {
22
- title: "Components/Experimental/Sensitive image",
22
+ title: "Components/Sensitive image",
23
23
  argTypes,
24
24
  };
25
25
 
26
- const Template = ({ image, warning, action, classes, attributes }) => {
27
- return SensitiveImage({
26
+ const Template = ({ image, warning, action, classes, attributes }) =>
27
+ SensitiveImage({
28
28
  params: {
29
29
  image,
30
30
  warning,
@@ -33,7 +33,6 @@ const Template = ({ image, warning, action, classes, attributes }) => {
33
33
  attributes,
34
34
  },
35
35
  });
36
- };
37
36
 
38
37
  export const Standard = Template.bind({});
39
38
  Standard.args = {
@@ -0,0 +1,63 @@
1
+ @use "../../tools/colour";
2
+
3
+ .tna-skip-link {
4
+ width: 1px !important;
5
+ height: 1px !important;
6
+ margin: 0 !important;
7
+ padding: 1rem !important;
8
+
9
+ display: block !important;
10
+
11
+ position: absolute !important;
12
+
13
+ overflow: hidden !important;
14
+
15
+ white-space: nowrap !important;
16
+
17
+ clip: rect(0 0 0 0) !important;
18
+ -webkit-clip-path: inset(50%) !important;
19
+ clip-path: inset(50%) !important;
20
+
21
+ &,
22
+ &:link,
23
+ &:visited {
24
+ @include colour.colour-font("button-primary-text", $important: true);
25
+ }
26
+
27
+ &:active,
28
+ &:focus {
29
+ width: auto !important;
30
+ height: auto !important;
31
+ margin: inherit !important;
32
+
33
+ position: static !important;
34
+
35
+ overflow: visible !important;
36
+
37
+ white-space: inherit !important;
38
+
39
+ clip: auto !important;
40
+ -webkit-clip-path: none !important;
41
+ clip-path: none !important;
42
+ }
43
+
44
+ &:focus {
45
+ @include colour.colour-background(
46
+ "button-primary-background",
47
+ $important: true
48
+ );
49
+
50
+ @include colour.colour-border("focus-outline", 0.3125rem, $important: true);
51
+
52
+ outline: none !important;
53
+ }
54
+
55
+ &:hover {
56
+ @include colour.colour-font("button-primary-hover-text", $important: true);
57
+
58
+ @include colour.colour-background(
59
+ "button-primary-hover-background",
60
+ $important: true
61
+ );
62
+ }
63
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "component": "skip link",
3
+ "fixtures": [
4
+ {
5
+ "name": "minimal",
6
+ "options": {},
7
+ "html": "<a href=\"#main-content\" class=\"tna-skip-link \">Skip to main content</a>",
8
+ "hidden": false
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": false,
6
+ "description": ""
7
+ },
8
+ {
9
+ "name": "href",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": ""
13
+ },
14
+ {
15
+ "name": "classes",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "Classes to add to the skip link."
19
+ },
20
+ {
21
+ "name": "attributes",
22
+ "type": "object",
23
+ "required": false,
24
+ "description": "HTML attributes (for example data attributes) to add to the skip link."
25
+ }
26
+ ]
@@ -0,0 +1,3 @@
1
+ {% macro tnaSkipLink(params) %}
2
+ {%- include "nationalarchives/components/skip-link/template.njk" -%}
3
+ {% endmacro %}
@@ -0,0 +1,31 @@
1
+ import SkipLink from "./template.njk";
2
+ import macroOptions from "./macro-options.json";
3
+
4
+ const argTypes = {
5
+ classes: { control: "text" },
6
+ attributes: { control: "object" },
7
+ };
8
+
9
+ Object.keys(argTypes).forEach((argType) => {
10
+ argTypes[argType].description = macroOptions.find(
11
+ (option) => option.name === argType,
12
+ )?.description;
13
+ });
14
+
15
+ export default {
16
+ title: "Components/Skip link",
17
+ argTypes,
18
+ };
19
+
20
+ const Template = ({ classes, attributes }) =>
21
+ `${SkipLink({
22
+ params: {
23
+ classes,
24
+ attributes,
25
+ },
26
+ })}<p>To view the skip link component tab to this example, or click inside this example and press tab.</p>`;
27
+
28
+ export const Standard = Template.bind({});
29
+ Standard.args = {
30
+ classes: "tna-skip-link--demo",
31
+ };
@@ -0,0 +1,4 @@
1
+ {%- set containerClasses = [params.classes] if params.classes else [] -%}
2
+ <a href="#{{ params.href if params.href else 'main-content' }}" class="tna-skip-link {{ containerClasses | join(' ') }}" {%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor %}>
3
+ {{ params.text if params.text else 'Skip to main content' }}
4
+ </a>
@@ -135,8 +135,7 @@
135
135
 
136
136
  overflow: hidden;
137
137
 
138
- border: 1px transparent solid;
139
- @include colour.colour-border("keyline-dark");
138
+ @include colour.colour-border("keyline-dark", 1px);
140
139
  }
141
140
  }
142
141
  }
@@ -22,8 +22,8 @@ export default {
22
22
  argTypes,
23
23
  };
24
24
 
25
- const Template = ({ title, items, sticky, classes, attributes }) => {
26
- return Tabs({
25
+ const Template = ({ title, items, sticky, classes, attributes }) =>
26
+ Tabs({
27
27
  params: {
28
28
  title,
29
29
  items,
@@ -32,7 +32,6 @@ const Template = ({ title, items, sticky, classes, attributes }) => {
32
32
  attributes,
33
33
  },
34
34
  });
35
- };
36
35
 
37
36
  export const Standard = Template.bind({});
38
37
  Standard.args = {
@@ -1,10 +1,10 @@
1
- @use "../../variables/colour" as colourVars; // TODO
1
+ @use "../../tools/colour";
2
2
 
3
3
  .tna-featured-collection {
4
4
  padding-top: 2rem;
5
5
  padding-bottom: 2rem;
6
6
 
7
- background-color: colourVars.$tna-cream;
7
+ background-color: colour.brand-colour("cream");
8
8
 
9
9
  .tna-card {
10
10
  margin-top: 1rem;
@@ -18,15 +18,14 @@ export default {
18
18
  argTypes,
19
19
  };
20
20
 
21
- const Template = ({ heading, classes, attributes }) => {
22
- return FeaturedCollection({
21
+ const Template = ({ heading, classes, attributes }) =>
22
+ FeaturedCollection({
23
23
  params: {
24
24
  heading,
25
25
  classes,
26
26
  attributes,
27
27
  },
28
28
  });
29
- };
30
29
 
31
30
  export const Standard = Template.bind({});
32
31
  Standard.args = {
@@ -1,3 +1,4 @@
1
+ import SkipLink from "../../../components/skip-link/template.njk";
1
2
  import Header from "../../../components/header/template.njk";
2
3
  import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
3
4
  import Card from "../../../components/card/template.njk";
@@ -41,8 +42,17 @@ const Template = ({ theme }) => {
41
42
  : ""
42
43
  }">
43
44
  <div class="tna-template__body tna-template__body--padded">
45
+ ${SkipLink({
46
+ params: {
47
+ href: "main-content",
48
+ },
49
+ })}
44
50
  ${Header({
45
51
  params: {
52
+ logo: {
53
+ strapline: "Colours",
54
+ href: "#/",
55
+ },
46
56
  navigation: [
47
57
  {
48
58
  text: "Alpha",
@@ -87,7 +97,7 @@ const Template = ({ theme }) => {
87
97
  ],
88
98
  },
89
99
  })}
90
- <article>
100
+ <main id="main-content" role="main">
91
101
  ${Hero({
92
102
  params: {
93
103
  heading: "Title",
@@ -185,6 +195,13 @@ const Template = ({ theme }) => {
185
195
  },
186
196
  label: "New",
187
197
  body: "<p>Card body</p>",
198
+ actions: [
199
+ {
200
+ text: "Card action",
201
+ href: "#",
202
+ title: "Go and do the action",
203
+ },
204
+ ],
188
205
  featured: true,
189
206
  classes: "tna-card--demo",
190
207
  },
@@ -267,7 +284,7 @@ const Template = ({ theme }) => {
267
284
  columnsTiny: 1,
268
285
  },
269
286
  })}
270
- <article>
287
+ </main>
271
288
  ${Footer({})}
272
289
  </div>
273
290
  </div>`;
@@ -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-!--no-margin-bottom">Lorem ipsum</p>
26
- <p class="tna-!--no-margin-bottom tna-!--margin-top-s">Lorem ipsum (tna-!--margin-top-s)</p>
27
- <p class="tna-!--no-margin-bottom tna-!--margin-top-m">Lorem ipsum (tna-!--margin-top-m)</p>
28
- <p class="tna-!--no-margin-bottom tna-!--margin-top-l">Lorem ipsum (tna-!--margin-top-l)</p>
29
- <p class="tna-!--no-margin-bottom tna-!--margin-top-xl">Lorem ipsum (tna-!--margin-top-xl)</p>
30
- <p class="tna-!--no-margin-bottom ${marginClass}">Lorem ipsum (${marginClass})</p>`;
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({});
@@ -1,5 +1,5 @@
1
1
  {# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
2
- {#% from "./components/skip-link/macro.njk" import tnaSkipLink -%#}
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 skipLink %}
27
- {#{ govukSkipLink({
28
- href: '#main-content',
29
- text: 'Skip to main content'
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,87 @@
26
31
  }
27
32
  }
28
33
 
29
- @mixin colour-font($colour) {
34
+ @mixin colour-font($colour, $important: false) {
30
35
  color: map.get(colour.$colour-palette-default, $colour);
31
36
  @if $colour == "accent" {
32
- color: var(--#{$colour}, var(--accent-default));
37
+ color: var(--#{$colour}, var(--accent-default))
38
+ if($important, !important, null);
33
39
  } @else {
34
- color: var(--#{$colour});
40
+ color: var(--#{$colour}) if($important, !important, null);
35
41
  }
36
42
  }
37
43
 
38
- @mixin colour-background($colour) {
44
+ @mixin colour-background($colour, $important: false) {
39
45
  background-color: map.get(colour.$colour-palette-default, $colour);
40
46
  @if $colour == "accent" {
41
- background-color: var(--#{$colour}, var(--accent-default));
47
+ background-color: var(--#{$colour}, var(--accent-default))
48
+ if($important, !important, null);
42
49
  } @else {
43
- background-color: var(--#{$colour});
50
+ background-color: var(--#{$colour}) if($important, !important, null);
44
51
  }
45
52
  }
46
53
 
47
- @mixin colour-border($colour) {
48
- border-color: map.get(colour.$colour-palette-default, $colour);
49
- border-color: var(--#{$colour});
54
+ @mixin colour-border(
55
+ $colour,
56
+ $width: "",
57
+ $style: solid,
58
+ $direction: "",
59
+ $important: false
60
+ ) {
61
+ @if $direction != "" {
62
+ @if $width != "" {
63
+ $property: border-#{$direction};
64
+ border-#{$direction}: $width
65
+ map.get(colour.$colour-palette-default, $colour)
66
+ $style
67
+ if($important, !important, null);
68
+ border-#{$direction}: $width
69
+ var(--#{$colour})
70
+ $style
71
+ if($important, !important, null);
72
+ } @else {
73
+ border-#{$direction}-color: map.get(
74
+ colour.$colour-palette-default,
75
+ $colour
76
+ )
77
+ if($important, !important, null);
78
+ border-#{$direction}-color: var(--#{$colour})
79
+ if($important, !important, null);
80
+ }
81
+ } @else {
82
+ @if $width != "" {
83
+ border: $width
84
+ map.get(colour.$colour-palette-default, $colour)
85
+ $style
86
+ if($important, !important, null);
87
+ border: $width var(--#{$colour}) $style if($important, !important, null);
88
+ } @else {
89
+ border-color: map.get(colour.$colour-palette-default, $colour)
90
+ if($important, !important, null);
91
+ border-color: var(--#{$colour}) if($important, !important, null);
92
+ }
93
+ }
50
94
  }
51
95
 
52
- @mixin colour-outline($colour) {
53
- outline-color: map.get(colour.$colour-palette-default, $colour);
54
- outline-color: var(--#{$colour});
96
+ @mixin colour-outline($colour, $important: false) {
97
+ outline-color: map.get(colour.$colour-palette-default, $colour)
98
+ if($important, !important, null);
99
+ outline-color: var(--#{$colour}) if($important, !important, null);
55
100
  }
56
101
 
57
- @mixin colour-fill($colour) {
58
- fill: map.get(colour.$colour-palette-default, $colour);
59
- fill: var(--#{$colour});
102
+ @mixin colour-fill($colour, $important: false) {
103
+ fill: map.get(colour.$colour-palette-default, $colour)
104
+ if($important, !important, null);
105
+ fill: var(--#{$colour}) if($important, !important, null);
60
106
  }
61
107
 
62
108
  @mixin fixed {
63
109
  @include colour-css-vars;
64
110
 
65
- @include colour-font("font-base");
111
+ // @include colour-font("font-base");
66
112
  }
67
113
 
68
- @mixin invert {
114
+ %invert {
69
115
  --font-base: var(--contrast-font-base);
70
116
  --font-dark: var(--contrast-font-dark);
71
117
  --font-light: var(--contrast-font-light);
@@ -74,10 +120,33 @@
74
120
  --keyline: var(--contrast-keyline);
75
121
  --keyline-dark: var(--contrast-keyline-dark);
76
122
 
77
- @include colour-font("contrast-font-base");
123
+ // @include colour-font("contrast-font-base");
78
124
  @include colour-background("contrast-background");
79
125
  }
80
126
 
127
+ @mixin invert {
128
+ @extend %invert;
129
+ }
130
+
131
+ %invert-on-mobile {
132
+ @include media.on-mobile {
133
+ --font-base: var(--contrast-font-base);
134
+ --font-dark: var(--contrast-font-dark);
135
+ --font-light: var(--contrast-font-light);
136
+ --link: var(--contrast-link);
137
+ --link-visited: var(--contrast-link-visited);
138
+ --keyline: var(--contrast-keyline);
139
+ --keyline-dark: var(--contrast-keyline-dark);
140
+
141
+ // @include colour-font("contrast-font-base");
142
+ @include colour-background("contrast-background");
143
+ }
144
+ }
145
+
146
+ @mixin invert-on-mobile {
147
+ @extend %invert-on-mobile;
148
+ }
149
+
81
150
  @mixin uninvert {
82
151
  @include colour-css-vars;
83
152
 
@@ -1,4 +1,3 @@
1
- @forward "assets";
2
1
  @forward "colour";
3
2
  @forward "grid";
4
3
  @forward "media";
@@ -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: 0 0 0 1px #f0a !important;
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
  }
@@ -163,4 +163,9 @@ hr {
163
163
  border: 0 !important;
164
164
 
165
165
  background-color: transparent !important;
166
+
167
+ &::before,
168
+ &::after {
169
+ content: "\00a0";
170
+ }
166
171
  }