@nationalarchives/frontend 0.1.16-prerelease → 0.1.18-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 (88) hide show
  1. package/nationalarchives/all.css +13 -1
  2. package/nationalarchives/all.css.map +1 -1
  3. package/nationalarchives/all.js +1 -1
  4. package/nationalarchives/all.js.map +1 -1
  5. package/nationalarchives/all.scss +2 -3
  6. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  7. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  8. package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
  9. package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
  10. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
  13. package/nationalarchives/components/button/_button-group.scss +18 -0
  14. package/nationalarchives/components/button/_index.scss +24 -7
  15. package/nationalarchives/components/button/button.stories.js +63 -6
  16. package/nationalarchives/components/button/fixtures.json +3 -3
  17. package/nationalarchives/components/button/macro-options.json +13 -1
  18. package/nationalarchives/components/button/template.njk +7 -2
  19. package/nationalarchives/components/card/_index.scss +62 -47
  20. package/nationalarchives/components/card/card.stories.js +59 -8
  21. package/nationalarchives/components/card/fixtures.json +59 -20
  22. package/nationalarchives/components/card/macro-options.json +14 -2
  23. package/nationalarchives/components/card/template.njk +12 -8
  24. package/nationalarchives/components/filters/_index.scss +19 -14
  25. package/nationalarchives/components/footer/_index.scss +194 -60
  26. package/nationalarchives/components/footer/fixtures.json +1 -1
  27. package/nationalarchives/components/footer/footer.stories.js +80 -71
  28. package/nationalarchives/components/footer/macro-options.json +34 -8
  29. package/nationalarchives/components/footer/template.njk +110 -53
  30. package/nationalarchives/components/header/_index.scss +40 -4
  31. package/nationalarchives/components/hero/_index.scss +1 -1
  32. package/nationalarchives/components/index-grid/_index.scss +27 -5
  33. package/nationalarchives/components/index-grid/index-grid.stories.js +25 -1
  34. package/nationalarchives/components/index-grid/macro-options.json +12 -0
  35. package/nationalarchives/components/index-grid/template.njk +9 -11
  36. package/nationalarchives/components/message/_index.scss +8 -0
  37. package/nationalarchives/components/picture/_index.scss +2 -0
  38. package/nationalarchives/components/picture/picture.js +1 -1
  39. package/nationalarchives/components/picture/picture.js.map +1 -1
  40. package/nationalarchives/components/picture/picture.mjs +2 -0
  41. package/nationalarchives/components/skip-link/skip-link.stories.js +3 -2
  42. package/nationalarchives/components/tabs/_index.scss +6 -3
  43. package/nationalarchives/components/tabs/tabs.stories.js +6 -6
  44. package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
  45. package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
  46. package/nationalarchives/lib/font-awesome/_core.scss +42 -0
  47. package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
  48. package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
  49. package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
  50. package/nationalarchives/lib/font-awesome/_list.scss +20 -0
  51. package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
  52. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
  53. package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
  54. package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
  55. package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
  56. package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
  57. package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
  58. package/nationalarchives/lib/font-awesome/brands.scss +34 -0
  59. package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
  60. package/nationalarchives/lib/font-awesome/regular.scss +28 -0
  61. package/nationalarchives/lib/font-awesome/solid.scss +28 -0
  62. package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
  63. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
  64. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +483 -97
  65. package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
  66. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
  67. package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
  68. package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
  69. package/nationalarchives/templates/layouts/_generic.njk +1 -1
  70. package/nationalarchives/tools/_colour.scss +86 -41
  71. package/nationalarchives/tools/_typography.scss +13 -0
  72. package/nationalarchives/utilities/_font-awesome.scss +5 -0
  73. package/nationalarchives/utilities/_global.scss +70 -26
  74. package/nationalarchives/utilities/_index.scss +1 -0
  75. package/nationalarchives/utilities/_overrides.scss +42 -10
  76. package/nationalarchives/utilities/_typography.scss +198 -59
  77. package/nationalarchives/variables/_assets.scss +1 -0
  78. package/nationalarchives/variables/_colour.scss +29 -23
  79. package/nationalarchives/variables/_index.scss +1 -0
  80. package/nationalarchives/variables/_spacing.scss +3 -1
  81. package/nationalarchives/variables/_typography.scss +4 -1
  82. package/package.json +13 -13
  83. package/nationalarchives/patterns/_index.scss +0 -1
  84. package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
  85. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +0 -34
  86. package/nationalarchives/patterns/featured-collection/macro-options.json +0 -20
  87. package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
  88. package/nationalarchives/patterns/featured-collection/template.njk +0 -96
@@ -5,62 +5,42 @@ import * as OverrideStories from './overrides.stories';
5
5
 
6
6
  # Overrides
7
7
 
8
- ## Margin
9
-
10
- ### Top
11
-
12
- - `tna-!--no-margin-top`
13
- - `tna-!--margin-top-xs`
14
- - `tna-!--margin-top-s`
15
- - `tna-!--margin-top-m`
16
- - `tna-!--margin-top-l`
17
- - `tna-!--margin-top-xl`
18
-
19
- ### Bottom
20
-
21
- - `tna-!--no-margin-bottom`
22
- - `tna-!--margin-bottom-xs`
23
- - `tna-!--margin-bottom-s`
24
- - `tna-!--margin-bottom-m`
25
- - `tna-!--margin-bottom-l`
26
- - `tna-!--margin-bottom-xl`
27
-
28
- ### Vertical (top and bottom)
29
-
30
- - `tna-!--no-margin-vertical`
31
- - `tna-!--margin-vertical-xs`
32
- - `tna-!--margin-vertical-s`
33
- - `tna-!--margin-vertical-m`
34
- - `tna-!--margin-vertical-l`
35
- - `tna-!--margin-vertical-xl`
36
-
37
- ## Padding
38
-
39
- ### Top
40
-
41
- - `tna-!--no-padding-top`
42
- - `tna-!--padding-top-xs`
43
- - `tna-!--padding-top-s`
44
- - `tna-!--padding-top-m`
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
 
@@ -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
- ${title}
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
- </p>`;
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
- {% from "./components/skip-link/macro.njk" import tnaSkipLink -%}
2
+ {% from "nationalarchives/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>
@@ -31,24 +31,69 @@
31
31
  }
32
32
  }
33
33
 
34
- @mixin colour-font($colour, $important: false) {
35
- color: map.get(colour.$colour-palette-default, $colour);
36
- @if $colour == "accent" {
37
- color: var(--#{$colour}, var(--accent-default))
38
- if($important, !important, null);
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;
39
47
  } @else {
40
- color: var(--#{$colour}) if($important, !important, null);
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
+ }
41
86
  }
42
87
  }
43
88
 
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
+
44
94
  @mixin colour-background($colour, $important: false) {
45
95
  background-color: map.get(colour.$colour-palette-default, $colour);
46
- @if $colour == "accent" {
47
- background-color: var(--#{$colour}, var(--accent-default))
48
- if($important, !important, null);
49
- } @else {
50
- background-color: var(--#{$colour}) if($important, !important, null);
51
- }
96
+ background-color: var(--#{$colour}) if($important, !important, null);
52
97
  }
53
98
 
54
99
  @mixin colour-border(
@@ -120,8 +165,9 @@
120
165
  --keyline: var(--contrast-keyline);
121
166
  --keyline-dark: var(--contrast-keyline-dark);
122
167
 
123
- // @include colour-font("contrast-font-base");
124
168
  @include colour-background("contrast-background");
169
+
170
+ @include colour-font("font-base");
125
171
  }
126
172
 
127
173
  @mixin invert {
@@ -138,8 +184,9 @@
138
184
  --keyline: var(--contrast-keyline);
139
185
  --keyline-dark: var(--contrast-keyline-dark);
140
186
 
141
- // @include colour-font("contrast-font-base");
142
187
  @include colour-background("contrast-background");
188
+
189
+ @include colour-font("font-base");
143
190
  }
144
191
  }
145
192
 
@@ -147,40 +194,38 @@
147
194
  @extend %invert-on-mobile;
148
195
  }
149
196
 
150
- @mixin uninvert {
151
- @include colour-css-vars;
152
-
153
- .tna-template--system-theme & {
154
- @include colour-css-vars;
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));
155
205
 
156
- @media (prefers-color-scheme: dark) {
157
- @include colour-css-vars-dark;
158
- }
206
+ @include colour-background("accent-background");
159
207
 
160
- @media (prefers-contrast: more) {
161
- @include colour-css-vars-high-contrast;
162
- }
208
+ @include colour-font("font-base");
209
+ }
163
210
 
164
- @media (prefers-contrast: more) and (prefers-color-scheme: dark) {
165
- @include colour-css-vars-high-contrast-dark;
166
- }
167
- }
211
+ @mixin accent {
212
+ @extend %accent;
213
+ }
168
214
 
169
- .tna-template--light-theme & {
170
- @include colour-css-vars;
171
- }
215
+ %accent-background {
216
+ @include colour-background("accent-background");
217
+ }
172
218
 
173
- .tna-template--dark-theme & {
174
- @include colour-css-vars-dark;
175
- }
219
+ @mixin accent-background {
220
+ @extend %accent-background;
221
+ }
176
222
 
177
- .tna-template--high-contrast-theme & {
178
- @include colour-css-vars-high-contrast;
179
- }
223
+ %light-accent-background {
224
+ @include colour-background("accent-background-light");
225
+ }
180
226
 
181
- .tna-template--high-contrast-theme.tna-template--dark-theme & {
182
- @include colour-css-vars-high-contrast-dark;
183
- }
227
+ @mixin light-accent-background {
228
+ @extend %light-accent-background;
184
229
  }
185
230
 
186
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)};
@@ -0,0 +1,5 @@
1
+ @import "../variables/assets";
2
+ $fa-font-path: $tna-font-path !default;
3
+ @import "../lib/font-awesome/fontawesome";
4
+ @import "../lib/font-awesome/solid";
5
+ @import "../lib/font-awesome/brands";
@@ -1,5 +1,6 @@
1
1
  @use "../features";
2
2
  @use "../tools/colour";
3
+ @use "../tools/media";
3
4
  @use "../variables/typography";
4
5
 
5
6
  :root {
@@ -19,29 +20,7 @@
19
20
 
20
21
  @include colour.colour-background("page-background");
21
22
 
22
- // &--black-accent {
23
- // accent-color: colour.$_tna-black;
24
- // }
25
-
26
- // &--yellow-accent {
27
- // accent-color: colour.$_tna-yellow;
28
- // }
29
-
30
- // &--pink-accent {
31
- // accent-color: colour.$_tna-pink;
32
- // }
33
-
34
- // &--orange-accent {
35
- // accent-color: colour.$_tna-orange;
36
- // }
37
-
38
- // &--green-accent {
39
- // accent-color: colour.$_tna-green;
40
- // }
41
-
42
- // &--blue-accent {
43
- // accent-color: colour.$_tna-blue;
44
- // }
23
+ accent-color: var(--accent);
45
24
 
46
25
  &--system-theme {
47
26
  @include colour.colour-css-vars;
@@ -83,6 +62,32 @@
83
62
  }
84
63
  }
85
64
 
65
+ @include colour.accent-css-vars("black"); // TODO: Temp
66
+
67
+ // &--black-accent {
68
+ // @include colour.accent-css-vars("black");
69
+ // }
70
+
71
+ &--yellow-accent {
72
+ @include colour.accent-css-vars("yellow");
73
+ }
74
+
75
+ &--pink-accent {
76
+ @include colour.accent-css-vars("pink");
77
+ }
78
+
79
+ &--orange-accent {
80
+ @include colour.accent-css-vars("orange");
81
+ }
82
+
83
+ &--green-accent {
84
+ @include colour.accent-css-vars("green");
85
+ }
86
+
87
+ &--blue-accent {
88
+ @include colour.accent-css-vars("blue");
89
+ }
90
+
86
91
  @media (prefers-reduced-motion) {
87
92
  * {
88
93
  animation: none !important;
@@ -134,17 +139,56 @@ canvas {
134
139
  }
135
140
 
136
141
  hr {
137
- margin: 3rem 0;
142
+ margin: 2rem 0;
138
143
 
139
144
  border-width: 1px 0 0;
140
145
  @include colour.colour-border("keyline");
141
- border-style: dashed;
146
+ border-style: solid;
147
+
148
+ // @include colour.on-high-contrast {
149
+ // border-style: solid;
150
+ // }
151
+ }
152
+
153
+ .tna-section {
154
+ padding-top: 3rem;
155
+ padding-bottom: 3rem;
156
+
157
+ @include media.on-mobile {
158
+ padding-top: 2rem;
159
+ padding-bottom: 2rem;
160
+ }
161
+ }
162
+
163
+ .tna-aside {
164
+ margin-bottom: 2rem;
165
+ padding: 2rem;
166
+
167
+ &:last-child {
168
+ margin-bottom: 0;
169
+ }
170
+
171
+ @include media.on-mobile {
172
+ padding: 1rem;
173
+ }
142
174
 
143
175
  @include colour.on-high-contrast {
144
- border-style: solid;
176
+ @include colour.colour-border("keyline-dark", 1px);
145
177
  }
146
178
  }
147
179
 
180
+ .tna-background--contrast {
181
+ @include colour.invert;
182
+ }
183
+
184
+ .tna-background--accent {
185
+ @include colour.accent;
186
+ }
187
+
188
+ .tna-background--accent-light {
189
+ @include colour.light-accent-background;
190
+ }
191
+
148
192
  .tna-visually-hidden {
149
193
  width: 1px !important;
150
194
  height: 1px !important;
@@ -1,4 +1,5 @@
1
1
  @forward "debug";
2
+ @forward "font-awesome";
2
3
  @forward "global";
3
4
  @forward "overrides";
4
5
  @forward "typography";
@@ -1,21 +1,45 @@
1
1
  @use "../variables/spacing";
2
2
  @use "../tools/media";
3
3
 
4
- @each $property in margin, padding {
5
- @each $direction in top, bottom {
6
- .tna-\!--no-#{$property}-#{$direction},
7
- .tna-\!--no-#{$property}-vertical {
8
- #{$property}-#{$direction}: 0 !important;
4
+ @mixin no-spacing-generator($suffix: "") {
5
+ @if $suffix != "" {
6
+ $suffix: "-" + $suffix;
7
+ }
8
+
9
+ @each $property in margin, padding {
10
+ @each $direction in top, bottom {
11
+ .tna-\!--no-#{$property}-#{$direction}#{$suffix},
12
+ .tna-\!--no-#{$property}-vertical#{$suffix} {
13
+ #{$property}-#{$direction}: 0 !important;
14
+ }
9
15
  }
10
16
  }
11
17
  }
12
18
 
13
- @mixin overrides($spacing) {
19
+ @include no-spacing-generator;
20
+
21
+ @include media.on-medium {
22
+ @include no-spacing-generator("medium");
23
+ }
24
+
25
+ @include media.on-small {
26
+ @include no-spacing-generator("small");
27
+ }
28
+
29
+ @include media.on-tiny {
30
+ @include no-spacing-generator("tiny");
31
+ }
32
+
33
+ @mixin overrides($spacing, $suffix: "") {
34
+ @if $suffix != "" {
35
+ $suffix: "-" + $suffix;
36
+ }
37
+
14
38
  @each $property in margin, padding {
15
39
  @each $direction in top, bottom {
16
40
  @each $size, $amount in $spacing {
17
- .tna-\!--#{$property}-#{$direction}-#{$size},
18
- .tna-\!--#{$property}-vertical-#{$size} {
41
+ .tna-\!--#{$property}-#{$direction}-#{$size}#{$suffix},
42
+ .tna-\!--#{$property}-vertical-#{$size}#{$suffix} {
19
43
  #{$property}-#{$direction}: #{$amount}rem !important;
20
44
  }
21
45
  }
@@ -25,6 +49,14 @@
25
49
 
26
50
  @include overrides(spacing.$spacing);
27
51
 
28
- @include media.on-mobile {
29
- @include overrides(spacing.$spacing-mobile);
52
+ @include media.on-medium {
53
+ @include overrides(spacing.$spacing, "medium");
54
+ }
55
+
56
+ @include media.on-small {
57
+ @include overrides(spacing.$spacing-mobile, "small");
58
+ }
59
+
60
+ @include media.on-tiny {
61
+ @include overrides(spacing.$spacing-mobile, "tiny");
30
62
  }