@nationalarchives/frontend 0.1.48 → 0.1.50

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 (172) hide show
  1. package/nationalarchives/all.css +1 -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/analytics.js +1 -1
  6. package/nationalarchives/analytics.js.map +1 -1
  7. package/nationalarchives/analytics.mjs +4 -4
  8. package/nationalarchives/components/_index.scss +1 -1
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +6 -5
  12. package/nationalarchives/components/button/_button-group.scss +2 -2
  13. package/nationalarchives/components/button/button.css +1 -1
  14. package/nationalarchives/components/button/button.css.map +1 -1
  15. package/nationalarchives/components/button/button.scss +4 -3
  16. package/nationalarchives/components/card/card.css +1 -1
  17. package/nationalarchives/components/card/card.css.map +1 -1
  18. package/nationalarchives/components/card/card.scss +31 -23
  19. package/nationalarchives/components/card/card.stories.js +4 -1
  20. package/nationalarchives/components/card/fixtures.json +58 -3
  21. package/nationalarchives/components/card/macro-options.json +1 -1
  22. package/nationalarchives/components/card/template.njk +2 -0
  23. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  24. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  25. package/nationalarchives/components/checkboxes/checkboxes.scss +6 -5
  26. package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
  27. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  28. package/nationalarchives/components/compound-filters/compound-filters.scss +3 -3
  29. package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
  30. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  31. package/nationalarchives/components/cookie-banner/cookie-banner.scss +2 -2
  32. package/nationalarchives/components/cookie-banner/fixtures.json +10 -10
  33. package/nationalarchives/components/cookie-banner/template.njk +1 -1
  34. package/nationalarchives/components/date-input/date-input.css +1 -1
  35. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  36. package/nationalarchives/components/date-input/date-input.scss +3 -2
  37. package/nationalarchives/components/date-input/fixtures.json +5 -5
  38. package/nationalarchives/components/date-input/template.njk +1 -1
  39. package/nationalarchives/components/date-search/date-search.css +1 -1
  40. package/nationalarchives/components/date-search/date-search.css.map +1 -1
  41. package/nationalarchives/components/date-search/date-search.scss +2 -1
  42. package/nationalarchives/components/error-summary/error-summary.css +1 -1
  43. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  44. package/nationalarchives/components/error-summary/error-summary.scss +2 -2
  45. package/nationalarchives/components/featured-records/featured-records.css +1 -1
  46. package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
  47. package/nationalarchives/components/featured-records/featured-records.scss +6 -6
  48. package/nationalarchives/components/featured-records/featured-records.stories.js +3 -4
  49. package/nationalarchives/components/footer/fixtures.json +2 -2
  50. package/nationalarchives/components/footer/footer.css +1 -1
  51. package/nationalarchives/components/footer/footer.css.map +1 -1
  52. package/nationalarchives/components/footer/footer.scss +22 -21
  53. package/nationalarchives/components/footer/footer.stories.js +1 -1
  54. package/nationalarchives/components/footer/template.njk +12 -13
  55. package/nationalarchives/components/gallery/gallery.css +1 -1
  56. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  57. package/nationalarchives/components/gallery/gallery.scss +10 -10
  58. package/nationalarchives/components/global-header/README.md +16 -16
  59. package/nationalarchives/components/global-header/fixtures.json +1 -2
  60. package/nationalarchives/components/global-header/global-header.css +1 -1
  61. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  62. package/nationalarchives/components/global-header/global-header.js +1 -1
  63. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  64. package/nationalarchives/components/global-header/global-header.mjs +1 -1
  65. package/nationalarchives/components/global-header/global-header.scss +41 -36
  66. package/nationalarchives/components/global-header/global-header.stories.js +0 -1
  67. package/nationalarchives/components/global-header/macro-options.json +0 -6
  68. package/nationalarchives/components/global-header/template.njk +3 -6
  69. package/nationalarchives/components/grid/grid.css +1 -1
  70. package/nationalarchives/components/grid/grid.css.map +1 -1
  71. package/nationalarchives/components/grid/grid.scss +16 -16
  72. package/nationalarchives/components/header/header.css +1 -1
  73. package/nationalarchives/components/header/header.css.map +1 -1
  74. package/nationalarchives/components/header/header.js +1 -1
  75. package/nationalarchives/components/header/header.js.map +1 -1
  76. package/nationalarchives/components/header/header.mjs +1 -1
  77. package/nationalarchives/components/header/header.scss +46 -45
  78. package/nationalarchives/components/hero/hero.css +1 -1
  79. package/nationalarchives/components/hero/hero.css.map +1 -1
  80. package/nationalarchives/components/hero/hero.scss +15 -9
  81. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  82. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  83. package/nationalarchives/components/index-grid/index-grid.scss +4 -4
  84. package/nationalarchives/components/pagination/pagination.css +1 -1
  85. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  86. package/nationalarchives/components/pagination/pagination.scss +11 -9
  87. package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
  88. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  89. package/nationalarchives/components/phase-banner/phase-banner.scss +3 -2
  90. package/nationalarchives/components/picture/picture.css +1 -1
  91. package/nationalarchives/components/picture/picture.css.map +1 -1
  92. package/nationalarchives/components/picture/picture.scss +18 -17
  93. package/nationalarchives/components/quick-filters/quick-filters.css +1 -1
  94. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  95. package/nationalarchives/components/quick-filters/quick-filters.scss +2 -2
  96. package/nationalarchives/components/radios/radios.css +1 -1
  97. package/nationalarchives/components/radios/radios.css.map +1 -1
  98. package/nationalarchives/components/radios/radios.scss +6 -5
  99. package/nationalarchives/components/search-field/search-field.css +1 -1
  100. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  101. package/nationalarchives/components/search-field/search-field.scss +1 -1
  102. package/nationalarchives/components/search-filters/search-filters.css +1 -1
  103. package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
  104. package/nationalarchives/components/search-filters/search-filters.scss +10 -10
  105. package/nationalarchives/components/select/select.css +1 -1
  106. package/nationalarchives/components/select/select.css.map +1 -1
  107. package/nationalarchives/components/select/select.scss +10 -9
  108. package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
  109. package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
  110. package/nationalarchives/components/sensitive-image/sensitive-image.scss +3 -2
  111. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  112. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  113. package/nationalarchives/components/skip-link/skip-link.scss +2 -1
  114. package/nationalarchives/components/tabs/tabs.css +1 -1
  115. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  116. package/nationalarchives/components/tabs/tabs.scss +4 -4
  117. package/nationalarchives/components/text-input/text-input.css +1 -1
  118. package/nationalarchives/components/text-input/text-input.css.map +1 -1
  119. package/nationalarchives/components/text-input/text-input.scss +2 -1
  120. package/nationalarchives/components/textarea/textarea.css +1 -1
  121. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  122. package/nationalarchives/components/textarea/textarea.scss +4 -3
  123. package/nationalarchives/components/warning/_index.scss +1 -0
  124. package/nationalarchives/components/warning/fixtures.json +13 -0
  125. package/nationalarchives/components/{message → warning}/macro-options.json +11 -5
  126. package/nationalarchives/components/warning/macro.njk +3 -0
  127. package/nationalarchives/components/warning/template.njk +10 -0
  128. package/nationalarchives/components/warning/warning.css +1 -0
  129. package/nationalarchives/components/warning/warning.css.map +1 -0
  130. package/nationalarchives/components/{message/message.scss → warning/warning.scss} +6 -6
  131. package/nationalarchives/components/{message/phase-banner.stories.js → warning/warning.stories.js} +10 -9
  132. package/nationalarchives/global-header-package.css +1 -1
  133. package/nationalarchives/global-header-package.css.map +1 -1
  134. package/nationalarchives/global-header-package.scss +245 -33
  135. package/nationalarchives/prototype-kit.css +1 -1
  136. package/nationalarchives/prototype-kit.css.map +1 -1
  137. package/nationalarchives/stories/intro.mdx +2 -2
  138. package/nationalarchives/stories/utilities/colour-schemes/colour-combinations.stories.js +4 -3
  139. package/nationalarchives/stories/utilities/colour-schemes/colour-themes.stories.js +21 -23
  140. package/nationalarchives/stories/utilities/lists/lists.stories.js +30 -0
  141. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +6 -0
  142. package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +9 -0
  143. package/nationalarchives/stories/utilities/typography/headings.stories.js +3 -0
  144. package/nationalarchives/stories/utilities/typography/typography.stories.js +18 -0
  145. package/nationalarchives/templates/fixtures.json +4 -4
  146. package/nationalarchives/templates/layouts/_generic.njk +2 -2
  147. package/nationalarchives/tools/_colour.scss +0 -43
  148. package/nationalarchives/tools/_grid.scss +33 -0
  149. package/nationalarchives/tools/_media.scss +44 -21
  150. package/nationalarchives/tools/_spacing.scss +14 -16
  151. package/nationalarchives/tools/_typography.scss +52 -4
  152. package/nationalarchives/utilities/_a11y.scss +6 -5
  153. package/nationalarchives/utilities/_areas.scss +7 -7
  154. package/nationalarchives/utilities/_colour.scss +46 -20
  155. package/nationalarchives/utilities/_columns.scss +3 -3
  156. package/nationalarchives/utilities/_forms.scss +3 -3
  157. package/nationalarchives/utilities/_lists.scss +8 -8
  158. package/nationalarchives/utilities/_reset.scss +5 -0
  159. package/nationalarchives/utilities/_tables.scss +10 -10
  160. package/nationalarchives/utilities/_typography.scss +61 -65
  161. package/nationalarchives/variables/_colour.scss +16 -16
  162. package/nationalarchives/variables/_grid.scss +3 -3
  163. package/nationalarchives/variables/_media.scss +0 -37
  164. package/nationalarchives/variables/_spacing.scss +14 -12
  165. package/nationalarchives/variables/_typography.scss +27 -4
  166. package/package.json +24 -23
  167. package/nationalarchives/components/message/_index.scss +0 -1
  168. package/nationalarchives/components/message/fixtures.json +0 -13
  169. package/nationalarchives/components/message/macro.njk +0 -3
  170. package/nationalarchives/components/message/message.css +0 -1
  171. package/nationalarchives/components/message/message.css.map +0 -1
  172. package/nationalarchives/components/message/template.njk +0 -9
@@ -1,12 +1,11 @@
1
1
  @use "sass:math";
2
2
  @use "sass:selector";
3
+ @use "../variables/assets";
4
+ @use "../variables/typography" as typographyVars;
3
5
  @use "../tools/colour";
4
6
  @use "../tools/media";
5
7
  @use "../tools/spacing";
6
8
  @use "../tools/typography";
7
- @use "../variables/assets";
8
- @use "../variables/grid";
9
- @use "../variables/typography" as typographyVars;
10
9
 
11
10
  @if typographyVars.$use-local-fonts {
12
11
  @font-face {
@@ -14,7 +13,7 @@
14
13
  src: url("#{assets.$tna-font-path}/OpenSans-Regular.ttf");
15
14
  font-weight: typographyVars.$main-font-weight;
16
15
  font-style: normal;
17
- // font-display: swap;
16
+ font-display: swap;
18
17
  }
19
18
 
20
19
  @font-face {
@@ -22,7 +21,7 @@
22
21
  src: url("#{assets.$tna-font-path}/OpenSans-Bold.ttf");
23
22
  font-weight: typographyVars.$main-font-weight-bold;
24
23
  font-style: normal;
25
- // font-display: swap;
24
+ font-display: swap;
26
25
  }
27
26
 
28
27
  @font-face {
@@ -30,7 +29,7 @@
30
29
  src: url("#{assets.$tna-font-path}/RobotoMono-Regular.ttf");
31
30
  font-weight: typographyVars.$detail-font-weight;
32
31
  font-style: normal;
33
- // font-display: swap;
32
+ font-display: swap;
34
33
  }
35
34
 
36
35
  @font-face {
@@ -38,7 +37,7 @@
38
37
  src: url("#{assets.$tna-font-path}/RobotoMono-Medium.ttf");
39
38
  font-weight: typographyVars.$detail-font-weight-bold;
40
39
  font-style: normal;
41
- // font-display: swap;
40
+ font-display: swap;
42
41
  }
43
42
  } @else {
44
43
  @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300..800&family=Roboto+Mono:wght@100..700&display=swap"); /* stylelint-disable-line */
@@ -47,7 +46,6 @@
47
46
  .tna-template {
48
47
  @include colour.colour-font("font-base");
49
48
  @include typography.main-font;
50
- font-size: #{typographyVars.$relative-1rem-px}px;
51
49
  -moz-osx-font-smoothing: grayscale;
52
50
  -webkit-font-smoothing: antialiased;
53
51
  text-rendering: optimizeLegibility;
@@ -76,7 +74,7 @@ p {
76
74
  @include spacing.space-above;
77
75
 
78
76
  + p {
79
- margin-top: 1rem;
77
+ margin-top: spacing.space(1);
80
78
  }
81
79
  }
82
80
 
@@ -114,11 +112,11 @@ small {
114
112
 
115
113
  %chip-base {
116
114
  max-width: max-content;
117
- padding: 0.125em 0.25rem;
115
+ padding: spacing.space(0.125) spacing.space(0.25);
118
116
 
119
117
  display: flex;
120
118
  align-items: center;
121
- gap: 0.5rem;
119
+ gap: spacing.space(0.5);
122
120
 
123
121
  @include colour.colour-font("font-base");
124
122
  @include typography.detail-font-small;
@@ -160,7 +158,7 @@ small {
160
158
  @include colour.colour-font("icon-light");
161
159
 
162
160
  @include colour.on-high-contrast {
163
- padding-right: 0.5rem;
161
+ padding-right: spacing.space(0.5);
164
162
 
165
163
  color: inherit;
166
164
 
@@ -186,7 +184,7 @@ small {
186
184
 
187
185
  display: flex;
188
186
  flex-wrap: wrap;
189
- gap: 0.5rem 1.5rem;
187
+ gap: spacing.space(0.5) spacing.space(1.5);
190
188
 
191
189
  list-style: none;
192
190
 
@@ -205,7 +203,7 @@ small {
205
203
  display: inline-block;
206
204
 
207
205
  &::after {
208
- padding-left: 0.5rem;
206
+ padding-left: spacing.space(0.5);
209
207
 
210
208
  display: inline-block;
211
209
 
@@ -216,7 +214,7 @@ small {
216
214
 
217
215
  &:hover {
218
216
  &::after {
219
- padding-left: 0.75rem;
217
+ padding-left: spacing.space(0.75);
220
218
  }
221
219
  }
222
220
  }
@@ -231,77 +229,65 @@ small {
231
229
  @extend %heading;
232
230
 
233
231
  @include typography.heading-font;
234
- @include typography.relative-font-size(64);
235
- line-height: 1.1;
236
-
237
- @include media.on-medium {
238
- @include typography.relative-font-size(48);
239
- }
240
-
241
- @include media.on-mobile {
242
- @include typography.relative-font-size(36);
243
- }
232
+ @include typography.heading-generator(
233
+ typographyVars.$heading-xl-font-size-default,
234
+ typographyVars.$heading-xl-font-size-medium,
235
+ typographyVars.$heading-xl-font-size-small,
236
+ typographyVars.$heading-xl-font-size-tiny,
237
+ typographyVars.$heading-xl-line-height
238
+ );
244
239
  }
245
240
 
246
241
  %heading-l {
247
242
  @extend %heading;
248
243
 
249
244
  @include typography.heading-font;
250
- @include typography.relative-font-size(36);
251
- line-height: 1.3;
252
-
253
- @include media.on-medium {
254
- @include typography.relative-font-size(30);
255
- }
256
-
257
- @include media.on-small {
258
- @include typography.relative-font-size(28);
259
- }
260
-
261
- @include media.on-tiny {
262
- @include typography.relative-font-size(25);
263
- }
245
+ @include typography.heading-generator(
246
+ typographyVars.$heading-l-font-size-default,
247
+ typographyVars.$heading-l-font-size-medium,
248
+ typographyVars.$heading-l-font-size-small,
249
+ typographyVars.$heading-l-font-size-tiny,
250
+ typographyVars.$heading-l-line-height
251
+ );
264
252
  }
265
253
 
266
254
  %heading-m {
267
255
  @extend %heading;
268
256
 
269
257
  @include typography.main-font-weight-bold;
270
- @include typography.relative-font-size(22);
271
- line-height: 1.6;
272
-
273
- @include media.on-medium {
274
- @include typography.relative-font-size(21);
275
- }
276
-
277
- @include media.on-small {
278
- @include typography.relative-font-size(20);
279
- }
280
-
281
- @include media.on-tiny {
282
- @include typography.relative-font-size(19);
283
- }
258
+ @include typography.heading-generator(
259
+ typographyVars.$heading-m-font-size-default,
260
+ typographyVars.$heading-m-font-size-medium,
261
+ typographyVars.$heading-m-font-size-small,
262
+ typographyVars.$heading-m-font-size-tiny,
263
+ typographyVars.$heading-m-line-height
264
+ );
284
265
  }
285
266
 
286
267
  %heading-s {
287
268
  @extend %heading;
288
269
 
289
270
  @include typography.main-font-weight-bold;
290
- @include typography.relative-font-size(18);
291
- line-height: 1.6;
271
+ @include typography.heading-generator(
272
+ typographyVars.$heading-s-font-size-default,
273
+ typographyVars.$heading-s-font-size-medium,
274
+ typographyVars.$heading-s-font-size-small,
275
+ typographyVars.$heading-s-font-size-tiny,
276
+ typographyVars.$heading-s-line-height
277
+ );
292
278
  }
293
279
 
294
280
  %headings-and-heading-groups {
295
281
  @include spacing.space-above;
296
282
  margin-bottom: 0;
297
- padding: 1rem 0 0;
283
+ padding: spacing.space(1) 0 0;
298
284
 
299
285
  &:first-child {
300
286
  padding-top: 0;
301
287
  }
302
288
 
303
289
  + p {
304
- margin-top: 1rem;
290
+ margin-top: spacing.space(1);
305
291
  }
306
292
  }
307
293
 
@@ -336,7 +322,7 @@ small {
336
322
  }
337
323
 
338
324
  &__supertitle {
339
- margin: 0 0 0.25rem;
325
+ margin: 0 0 spacing.space(0.25);
340
326
 
341
327
  @extend %chip-base;
342
328
 
@@ -377,20 +363,28 @@ small {
377
363
  margin-right: 0;
378
364
  margin-bottom: 0;
379
365
  margin-left: 0;
380
- padding: 1rem 1rem 1rem 2rem;
366
+ padding: spacing.space(1) spacing.space(1) spacing.space(1) spacing.space(2);
381
367
 
382
368
  @include colour.thick-keyline-accent(left);
383
369
 
384
370
  &__quote {
385
- font-weight: 700;
371
+ @include typography.main-font-weight-medium;
372
+ quotes: auto;
373
+ quotes: "‘" "’";
374
+
375
+ :first-child::before {
376
+ content: open-quote;
377
+ }
378
+
379
+ :last-child::after {
380
+ content: close-quote;
381
+ }
386
382
  }
387
383
 
388
384
  &__citation {
389
- @include typography.relative-font-size(16);
385
+ margin-top: spacing.space(1);
390
386
 
391
- .tna-blockquote & {
392
- margin: 1rem 0 0;
393
- }
387
+ @include typography.relative-font-size(16);
394
388
 
395
389
  &::before {
396
390
  content: "\2014" " ";
@@ -399,7 +393,9 @@ small {
399
393
  }
400
394
 
401
395
  @include media.on-tiny {
402
- padding: 0.5rem 0.5rem 0.5rem 1rem;
396
+ padding: spacing.space(0.5) spacing.space(0.5) spacing.space(0.5) #{spacing.space(
397
+ 1
398
+ )};
403
399
  }
404
400
  }
405
401
 
@@ -1,7 +1,7 @@
1
1
  @use "sass:map";
2
2
 
3
3
  $colour-palette-brand: (
4
- "black": #000,
4
+ "black": #010101,
5
5
  "grey": #8c9694,
6
6
  "light-grey": #d9d9d6,
7
7
  "white": #fff,
@@ -37,9 +37,9 @@ $colour-palette-brand: (
37
37
  @return hex-to-rgb(map.get($colour-palette-brand, $colour), $opacity);
38
38
  }
39
39
 
40
- $dark-grey: #26262a;
40
+ $dark-grey: #26262a !default;
41
41
  $base-font: #343338 !default;
42
- $link-colour: #0062a8 !default;
42
+ $link-colour: #005fa3 !default;
43
43
  $link-colour-visited: #4c2c92 !default;
44
44
 
45
45
  /*
@@ -49,7 +49,7 @@ LIGHT THEME (DEFAULT)
49
49
  */
50
50
  $colour-palette-default: (
51
51
  "page-background": #f4f4f4,
52
- "background-tint": #e4e4e4,
52
+ "background-tint": brand-colour("light-grey"),
53
53
  "font-base": $base-font,
54
54
  "font-dark": brand-colour("black"),
55
55
  "font-light": brand-colour("black", 0.58),
@@ -80,16 +80,16 @@ $colour-palette-default: (
80
80
  "contrast-button-background": brand-colour("white"),
81
81
  "contrast-button-hover-text": brand-colour("white"),
82
82
  "contrast-button-hover-background": brand-colour("black"),
83
- "accent-background": #111,
83
+ "accent-background": brand-colour("grey"),
84
84
  "accent-background-light": #ededed,
85
- "accent-font-base": brand-colour("white"),
86
- "accent-font-dark": brand-colour("white"),
87
- "accent-font-light": brand-colour("white", 0.7),
88
- "accent-icon-light": brand-colour("white", 0.45),
89
- "accent-link": brand-colour("white"),
90
- "accent-link-visited": #b9f,
91
- "accent-keyline": brand-colour("white", 0.5),
92
- "accent-keyline-dark": brand-colour("white", 0.8),
85
+ "accent-font-base": brand-colour("black"),
86
+ "accent-font-dark": brand-colour("black"),
87
+ "accent-font-light": brand-colour("black", 0.7),
88
+ "accent-icon-light": brand-colour("black", 0.45),
89
+ "accent-link": brand-colour("black"),
90
+ "accent-link-visited": brand-colour("black"),
91
+ "accent-keyline": brand-colour("black", 0.5),
92
+ "accent-keyline-dark": brand-colour("black", 0.8),
93
93
  "button-accent-text": brand-colour("black"),
94
94
  "button-accent-background": brand-colour("grey"),
95
95
  ) !default;
@@ -102,8 +102,8 @@ DARK THEME
102
102
  $colour-palette-dark: map.merge(
103
103
  $colour-palette-default,
104
104
  (
105
- "page-background": #222,
106
- "background-tint": #333,
105
+ "page-background": #212223,
106
+ "background-tint": #323334,
107
107
  "font-base": brand-colour("white", 0.95),
108
108
  "font-dark": brand-colour("white"),
109
109
  "font-light": brand-colour("white", 0.51),
@@ -121,7 +121,7 @@ $colour-palette-dark: map.merge(
121
121
  "button-background": brand-colour("white"),
122
122
  "button-hover-text": brand-colour("white"),
123
123
  "button-hover-background": brand-colour("black"),
124
- "contrast-background": #111,
124
+ "contrast-background": #101112,
125
125
  "contrast-link-visited":
126
126
  map.get($colour-palette-default, "contrast-link-visited"),
127
127
  )
@@ -1,7 +1,7 @@
1
- $largest-container-width: 80rem !default;
1
+ $largest-container-width: 1280px !default;
2
2
 
3
- $gutter-width: 2rem !default;
4
- $gutter-width-tiny: 1rem !default;
3
+ $gutter-width: 2 !default;
4
+ $gutter-width-tiny: 1 !default;
5
5
 
6
6
  $column-count: 12;
7
7
  $column-count-medium: 6;
@@ -1,40 +1,3 @@
1
- @use "sass:math";
2
- @use "./typography";
3
-
4
1
  $largest-medium-device-px: 1024 !default;
5
2
  $largest-small-device-px: 768 !default;
6
3
  $largest-tiny-device-px: 480 !default;
7
-
8
- $smallest-large-device-em: #{math.div(
9
- $largest-medium-device-px + 1,
10
- typography.$relative-1rem-px
11
- )}em;
12
- $largest-medium-device-em: #{math.div(
13
- $largest-medium-device-px,
14
- typography.$relative-1rem-px
15
- )}em;
16
- $smallest-medium-device-em: #{math.div(
17
- $largest-small-device-px + 1,
18
- typography.$relative-1rem-px
19
- )}em;
20
- $largest-small-device-em: #{math.div(
21
- $largest-small-device-px,
22
- typography.$relative-1rem-px
23
- )}em;
24
- $smallest-small-device-em: #{math.div(
25
- $largest-tiny-device-px + 1,
26
- typography.$relative-1rem-px
27
- )}em;
28
- $largest-tiny-device-em: #{math.div(
29
- $largest-tiny-device-px,
30
- typography.$relative-1rem-px
31
- )}em;
32
-
33
- $media-large: "(min-width: #{$smallest-large-device-em})";
34
- $media-lt-large: "(max-width: #{$largest-medium-device-em})";
35
- $media-medium: "(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})";
36
- $media-gt-mobile: "(min-width: #{$smallest-medium-device-em})";
37
- $media-mobile: "(max-width: #{$largest-small-device-em})";
38
- $media-small: "(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})";
39
- $media-gt-tiny: "(min-width: #{$smallest-small-device-em})";
40
- $media-tiny: "(max-width: #{$largest-tiny-device-em})";
@@ -1,22 +1,24 @@
1
1
  @use "sass:map";
2
2
 
3
+ $spacing-unit-px: 16 !default;
4
+
3
5
  $spacing: (
4
- "xs": 0.5rem,
5
- "s": 1rem,
6
- "m": 2rem,
7
- "l": 3rem,
8
- "xl": 5rem,
9
- "xxl": 8rem,
6
+ "xs": 0.5,
7
+ "s": 1,
8
+ "m": 2,
9
+ "l": 3,
10
+ "xl": 5,
11
+ "xxl": 8,
10
12
  ) !default;
11
13
 
12
14
  $spacing-mobile: map.merge(
13
15
  $spacing,
14
16
  (
15
- "xs": 0.5rem,
16
- "s": 0.75rem,
17
- "m": 1.5rem,
18
- "l": 2rem,
19
- "xl": 3rem,
20
- "xxl": 5rem,
17
+ "xs": 0.5,
18
+ "s": 0.75,
19
+ "m": 1.5,
20
+ "l": 2,
21
+ "xl": 3,
22
+ "xxl": 5,
21
23
  )
22
24
  ) !default;
@@ -1,18 +1,17 @@
1
- @use "sass:math";
1
+ $relative-1rem-px: 16; // 16px = 1rem
2
2
 
3
3
  $use-local-fonts: false !default;
4
4
 
5
- $relative-1rem-px: 16; // 16px is always 1rem
6
-
7
5
  $body-font-size-px: 18 !default;
8
6
  $body-font-size-px-mobile: 17 !default;
9
- $body-line-height: #{math.div($relative-1rem-px, $body-font-size-px) * 2} !default; // 1.77777
7
+ $body-line-height: 1.75 !default;
10
8
 
11
9
  $interactive-text-decoration-thickness: 3.5px !default;
12
10
 
13
11
  $main-font: "Open Sans" !default;
14
12
  $main-font-family: $main-font, sans-serif !default;
15
13
  $main-font-weight: 400 !default;
14
+ $main-font-weight-medium: 600 !default;
16
15
  $main-font-weight-bold: 700 !default;
17
16
 
18
17
  $heading-font-family: supria-sans-condensed, "Arial Narrow", sans-serif !default;
@@ -21,3 +20,27 @@ $heading-font-weight: 500 !default;
21
20
  $detail-font-family: "Roboto Mono", monospace !default;
22
21
  $detail-font-weight: 400 !default;
23
22
  $detail-font-weight-bold: 500 !default;
23
+
24
+ $heading-xl-font-size-default: 64 !default;
25
+ $heading-xl-font-size-medium: 48 !default;
26
+ $heading-xl-font-size-small: 36 !default;
27
+ $heading-xl-font-size-tiny: $heading-xl-font-size-small !default;
28
+ $heading-xl-line-height: 1.1 !default;
29
+
30
+ $heading-l-font-size-default: 36 !default;
31
+ $heading-l-font-size-medium: 30 !default;
32
+ $heading-l-font-size-small: 28 !default;
33
+ $heading-l-font-size-tiny: 25 !default;
34
+ $heading-l-line-height: 1.3 !default;
35
+
36
+ $heading-m-font-size-default: 22 !default;
37
+ $heading-m-font-size-medium: 21 !default;
38
+ $heading-m-font-size-small: 20 !default;
39
+ $heading-m-font-size-tiny: 19 !default;
40
+ $heading-m-line-height: 1.6 !default;
41
+
42
+ $heading-s-font-size-default: 18 !default;
43
+ $heading-s-font-size-medium: $heading-s-font-size-default !default;
44
+ $heading-s-font-size-small: $heading-s-font-size-default !default;
45
+ $heading-s-font-size-tiny: $heading-s-font-size-default !default;
46
+ $heading-s-line-height: 1.6 !default;
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@nationalarchives/frontend",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "description": "The National Archives frontend styles",
5
5
  "scripts": {
6
6
  "start": "storybook dev -p 6006",
7
- "build": "storybook build -o storybook --webpack-stats-json",
8
- "test": "npm run test:fixtures && npm run test:unit && npm run test:storybook",
7
+ "build:storybook": "storybook build -o storybook --webpack-stats-json",
8
+ "build:package": "./tasks/build-package.sh",
9
+ "compile:sass": "sass --style=compressed --embed-sources src/nationalarchives:package/nationalarchives",
10
+ "compile:scripts": "webpack",
11
+ "lint:fix": "prettier --write '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.{js,mjs}'",
12
+ "test:all": "npm run test:lint && npm run test:unit && npm run test:html && npm run test:fixtures && npm run test:storybook && npm run build:package && npm run test:package",
9
13
  "test:fixtures": "node tasks/test-fixtures.js",
10
- "test:unit": "jest --verbose",
14
+ "test:html": "node tasks/generate-fixture-html.js && html-validate fixtures-html",
15
+ "test:lint": "prettier --check '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.{js,mjs}'",
16
+ "test:package": "node tasks/test-package.js",
11
17
  "test:storybook": "test-storybook --maxWorkers=1",
12
- "lint": "prettier --check '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint 'src/**/*.scss' && eslint 'src/**/*.{js,mjs}'",
13
- "lint:fix": "prettier --write '{src,.storybook,tasks,.}/**/*.{js,mjs,scss,json,html}' && stylelint --fix 'src/**/*.scss' && eslint --fix 'src/**/*.{js,mjs}'",
14
- "package:sass": "sass --style=compressed --embed-sources src/nationalarchives:package/nationalarchives",
15
- "package:scripts": "webpack",
16
- "validatehtml": "node tasks/generate-fixture-html.js && html-validate fixtures-html"
18
+ "test:unit": "jest --verbose",
19
+ "update:fixtures": "node tasks/update-fixtures.js"
17
20
  },
18
21
  "repository": {
19
22
  "type": "git",
@@ -43,16 +46,16 @@
43
46
  "@babel/core": "^7.23.2",
44
47
  "@babel/preset-env": "^7.23.2",
45
48
  "@mdx-js/react": "^3.0.0",
46
- "@storybook/addon-a11y": "^7.6.15",
47
- "@storybook/addon-docs": "^7.6.15",
48
- "@storybook/addon-essentials": "^7.6.15",
49
- "@storybook/addon-interactions": "^7.6.15",
50
- "@storybook/addon-links": "^7.6.15",
51
- "@storybook/addon-mdx-gfm": "^7.6.15",
52
- "@storybook/html": "^7.6.15",
53
- "@storybook/html-webpack5": "^7.6.15",
54
- "@storybook/test": "^7.6.15",
55
- "@storybook/test-runner": "^0.16.0",
49
+ "@storybook/addon-a11y": "^8.0.5",
50
+ "@storybook/addon-docs": "^8.0.5",
51
+ "@storybook/addon-essentials": "^8.0.5",
52
+ "@storybook/addon-interactions": "^8.0.5",
53
+ "@storybook/addon-links": "^8.0.5",
54
+ "@storybook/addon-mdx-gfm": "^8.0.5",
55
+ "@storybook/html": "^8.0.5",
56
+ "@storybook/html-webpack5": "^8.0.5",
57
+ "@storybook/test": "^8.0.5",
58
+ "@storybook/test-runner": "^0.17.0",
56
59
  "axe-playwright": "^2.0.1",
57
60
  "babel-jest": "^29.7.0",
58
61
  "babel-loader": "^9.0.1",
@@ -61,7 +64,7 @@
61
64
  "css-loader": "^6.7.1",
62
65
  "diff": "^5.1.0",
63
66
  "eslint": "^8.52.0",
64
- "eslint-plugin-storybook": "^0.6.15",
67
+ "eslint-plugin-storybook": "^0.8.0",
65
68
  "glob": "^10.3.10",
66
69
  "html-validate": "^8.7.3",
67
70
  "jest-environment-jsdom": "^29.7.0",
@@ -69,12 +72,10 @@
69
72
  "node-self": "^1.0.2",
70
73
  "nunjucks": "^3.2.3",
71
74
  "prettier": "^3.0.1",
72
- "react": "^18.2.0",
73
- "react-dom": "^18.2.0",
74
75
  "sass": "^1.69.4",
75
76
  "sass-loader": "^14.1.0",
76
77
  "simple-nunjucks-loader": "^3.2.0",
77
- "storybook": "^7.6.15",
78
+ "storybook": "^8.0.5",
78
79
  "style-loader": "^3.3.1",
79
80
  "stylelint": "^16.0.2",
80
81
  "stylelint-config-standard-scss": "^13.0.0",
@@ -1 +0,0 @@
1
- @use "message";
@@ -1,13 +0,0 @@
1
- {
2
- "component": "message",
3
- "fixtures": [
4
- {
5
- "name": "default",
6
- "options": {
7
- "headingLevel": 2,
8
- "message": "Please note this page references hunger strikes and force feeding, which some people may find upsetting."
9
- },
10
- "html": "<div class=\"tna-message \"><h2 class=\"tna-message__heading\"><span class=\"tna-message__heading-icon\">I</span>mportant information</h2><div class=\"tna-message__message\">Please note this page references hunger strikes and force feeding, which some people may find upsetting.</div></div>"
11
- }
12
- ]
13
- }
@@ -1,3 +0,0 @@
1
- {% macro tnaMessage(params) %}
2
- {%- include "nationalarchives/components/message/template.njk" -%}
3
- {% endmacro %}
@@ -1 +0,0 @@
1
- .tna-message{--background: var(--accent-background-light);--font-base: #343338;--font-dark: rgb(0, 0, 0);--font-light: rgb(0 0 0/0.58);--icon-light: rgb(52 51 56/0.45);--keyline: rgb(38 38 42/0.25);--keyline-dark: #26262a;--button-text: rgb(255, 255, 255);--button-background: rgb(0, 0, 0);--button-hover-text: rgb(0, 0, 0);--button-hover-background: rgb(255, 255, 255);background-color:var(--background);color:#343338;color:var(--font-base)}@media(prefers-color-scheme: dark){.tna-template--system-theme .tna-message{--link: #0062a8;--link-visited: #4c2c92}}.tna-template--dark-theme .tna-message{--link: #0062a8;--link-visited: #4c2c92}.tna-message{margin-top:2rem}.tna-message:first-child{margin-top:0}.tna-message{padding:1rem;display:flex;gap:1rem;align-items:flex-start;background-color:rgb(249, 247, 226);border-left:5px rgb(255, 204, 0) solid}@media(max-width: 30em){.tna-message{flex-direction:column;gap:.5rem}}.tna-message__heading{font-size:0}.tna-message__heading-icon{width:2rem;height:2rem;display:block;color:#000;color:var(--font-dark);font-size:1.5rem;font-weight:700;text-transform:lowercase;text-align:center;line-height:2rem;border:.1875rem #000 solid;border:.1875rem var(--font-dark) solid;border-radius:100%}@media(max-width: 48em){.tna-message__heading-icon{width:1.5rem;height:1.5rem;font-size:1.1875rem;line-height:1.5rem;border:.125rem #000 solid;border:.125rem var(--font-dark) solid}}.tna-message__message{margin-top:0;flex:1}/*# sourceMappingURL=message.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/message/message.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss"],"names":[],"mappings":"AAoVA,aACE,6CACA,qBACA,0BACA,8BACA,iCAGA,8BACA,wBACA,kCACA,kCAIA,kCAIA,8CAvQA,mCAPA,cACA,uBAsRE,mCADF,yCAEI,gBACA,yBAIJ,uCACE,gBACA,wBCpXJ,aACE,gBAEA,yBACE,aCHJ,aAEE,aAEA,aACA,SACA,uBFyFA,oCAkFA,uCGnJA,wBD9BF,aAeI,sBACA,WAGF,sBACE,YAGF,2BACE,WACA,YAEA,cFyDF,WACA,uBIrFA,iBAQA,YCEsB,IHsBpB,yBACA,kBACA,iBF6FE,2BAIA,uCE9FF,mBCiBF,wBD/BA,2BAiBI,aACA,cEzCJ,oBF4CI,mBFmFA,0BAIA,uCEjFJ,sBACE,aAEA","file":"message.css","sourcesContent":["@use \"sass:map\";\n@use \"sass:list\";\n@use \"../variables/colour\";\n@use \"../tools/media\";\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n }\n }\n}\n\n@mixin accent-css-vars($colour) {\n @if $colour == \"yellow\" {\n --accent-background: #{brand-colour(\"yellow\")} !important;\n --accent-background-light: #{brand-colour(\"cream\")} !important;\n --accent-font-base: #{brand-colour(\"black\")} !important;\n --accent-font-dark: #{brand-colour(\"black\")} !important;\n --accent-font-light: #{brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{brand-colour(\"black\", 0.45)} !important;\n --accent-link: #{brand-colour(\"black\")} !important;\n --accent-link-visited: #{brand-colour(\"black\")} !important;\n --accent-keyline: #{brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{brand-colour(\"black\", 0.8)} !important;\n --button-accent-background: #{brand-colour(\"yellow\")} !important;\n } @else {\n --accent-font-base: #{brand-colour(\"white\")} !important;\n --accent-font-dark: #{brand-colour(\"white\")} !important;\n --accent-font-light: #{brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{brand-colour(\"white\", 0.45)} !important;\n --accent-link: #{brand-colour(\"white\")} !important;\n --accent-link-visited: #{brand-colour(\"white\")} !important;\n --accent-keyline: #{brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{brand-colour(\"white\", 0.8)} !important;\n --button-accent-text: #{brand-colour(\"white\")} !important;\n @if $colour == \"pink\" {\n --accent-background: #{brand-colour(\"maroon\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-pink\")} !important;\n --button-accent-background: #{brand-colour(\"maroon\")} !important;\n } @else if $colour == \"orange\" {\n --accent-background: #{brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-orange\")} !important;\n --button-accent-background: #{brand-colour(\"chestnut\")} !important;\n } @else if $colour == \"green\" {\n --accent-background: #{brand-colour(\"forest\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-green\")} !important;\n --button-accent-background: #{brand-colour(\"forest\")} !important;\n } @else if $colour == \"blue\" {\n --accent-background: #{brand-colour(\"navy\")} !important;\n --accent-background-light: #{brand-colour(\"pastel-blue\")} !important;\n --button-accent-background: #{brand-colour(\"navy\")} !important;\n }\n }\n}\n\n@mixin colour-font(\n $colour,\n $important: false,\n $default-palette: colour.$colour-palette-default\n) {\n color: map.get($default-palette, $colour) if($important, !important, null);\n color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n background-color: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)} if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n $property: border-#{$direction};\n border-#{$direction}: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border-#{$direction}: $width\n var(--#{$colour})\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: map.get(\n colour.$colour-palette-default,\n $colour\n )\n if($important, !important, null);\n border-#{$direction}-color: var(--#{$colour})\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n border: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n border-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n border-color: var(--#{$colour}) if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n map.get(colour.$colour-palette-default, $colour)\n $style\n if($important, !important, null);\n outline: $width var(--#{$colour}) $style if($important, !important, null);\n } @else {\n outline-color: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n outline-color: var(--#{$colour}) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: map.get(colour.$colour-palette-default, $colour)\n if($important, !important, null);\n fill: var(--#{$colour}) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction) {\n @include colour-border(\"keyline\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-dark($direction) {\n @include colour-border(\"keyline-dark\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-accent($direction) {\n @include colour-border(\"accent-background\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-error($direction) {\n @include colour-border(\"form-error\", 5px, solid, $direction);\n}\n\n@mixin thick-keyline-brand($direction, $brandColour) {\n border-#{$direction}: 5px #{brand-colour($brandColour)} solid;\n}\n\n%light {\n @include colour-css-vars(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast(\"form-error\");\n }\n}\n\n@mixin light {\n @extend %light;\n}\n\n%dark {\n @include colour-css-vars-dark(\"form-error\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n}\n\n@mixin dark {\n @extend %dark;\n}\n\n%plain {\n .tna-template--system-theme & {\n @extend %light;\n\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark;\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark;\n }\n }\n\n .tna-template--light-theme & {\n @include colour-css-vars;\n }\n\n .tna-template--dark-theme & {\n @include colour-css-vars-dark;\n }\n\n .tna-template--high-contrast-theme & {\n @include colour-css-vars-high-contrast;\n }\n\n .tna-template--high-contrast-theme.tna-template--dark-theme & {\n @include colour-css-vars-high-contrast-dark;\n }\n\n --background: var(--page-background);\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\", false, colour.$colour-palette-dark);\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%tint {\n @include colour-background(\"background-tint\");\n @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent-background {\n @include colour-background(\"accent-background\");\n}\n\n@mixin accent-background {\n @extend %accent-background;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n }\n\n .tna-template--dark-theme & {\n --link: #{map.get(colour.$colour-palette-default, \"link\")};\n --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n@mixin on-high-contrast {\n .tna-template--high-contrast-theme & {\n @content;\n }\n\n .tna-template--system-theme & {\n @media (prefers-contrast: more) {\n @content;\n }\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n","@use \"sass:map\";\n@use \"../variables/spacing\";\n@use \"../tools/media\";\n\n%space-above {\n margin-top: 2rem;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: 2rem 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@function space($size) {\n @return map.get(spacing.$spacing, $size);\n}\n\n@function space-mobile($size) {\n @return map.get(spacing.$spacing-mobile, $size);\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{$amount} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{$amount} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{$amount} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-message {\n @include spacing.space-above;\n padding: 1rem;\n\n display: flex;\n gap: 1rem;\n align-items: flex-start;\n\n @include colour.accent-light;\n\n @include colour.colour-background-brand(\"cream\");\n\n @include colour.thick-keyline-brand(left, \"yellow\");\n\n @include media.on-tiny {\n flex-direction: column;\n gap: 0.5rem;\n }\n\n &__heading {\n font-size: 0;\n }\n\n &__heading-icon {\n width: 2rem;\n height: 2rem;\n\n display: block;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.relative-font-size(24);\n @include typography.main-font-weight-bold;\n text-transform: lowercase;\n text-align: center;\n line-height: 2rem;\n\n @include colour.colour-border(\"font-dark\", 0.1875rem);\n border-radius: 100%;\n\n @include media.on-mobile {\n width: 1.5rem;\n height: 1.5rem;\n\n @include typography.relative-font-size(19);\n line-height: 1.5rem;\n\n @include colour.colour-border(\"font-dark\", 0.125rem);\n }\n }\n\n &__message {\n margin-top: 0;\n\n flex: 1;\n }\n}\n","@use \"../variables/media\";\n\n// 0 ======= 320 = 480 ===== 768 == 1024 ========================== min-width/max-width (px)\n// | . | | |\n// |-TINY----------|-SMALL---|-MED--|-LARGE------------------------\n// | . | | |\n// |<------------->| | | on-tiny\n// |<----------------------->| | on-mobile\n// |<------------------------------>| on-smaller-than-large\n// | . |<------->| | on-small\n// | . |<------------------------- on-larger-than-tiny\n// | . | |<---->| on-medium\n// | . | |<--------------- on-larger-than-mobile\n// | . | | |<-------- on-large\n// |<------->. | | | Smallest device\n\n@mixin on-large() {\n @media #{media.$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{media.$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{media.$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{media.$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{media.$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{media.$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{media.$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{media.$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"sass:math\";\n@use \"colour\";\n@use \"../variables/typography\";\n\n@mixin relative-font-size($fontSizePx) {\n font-size: #{math.div($fontSizePx, typography.$relative-1rem-px)}rem;\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n font-variation-settings: \"wdth\" 100;\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n font-optical-sizing: auto;\n font-style: normal;\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include relative-font-size(14);\n text-transform: uppercase;\n line-height: #{math.div(typography.$relative-1rem-px, 14)};\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n","@use \"sass:math\";\n\n$use-local-fonts: false !default;\n\n$relative-1rem-px: 16; // 16px is always 1rem\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: #{math.div($relative-1rem-px, $body-font-size-px) * 2} !default; // 1.77777\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$main-font: \"Open Sans\" !default;\n$main-font-family: $main-font, sans-serif !default;\n$main-font-weight: 400 !default;\n$main-font-weight-bold: 700 !default;\n\n$heading-font-family: supria-sans-condensed, \"Arial Narrow\", sans-serif !default;\n$heading-font-weight: 500 !default;\n\n$detail-font-family: \"Roboto Mono\", monospace !default;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n"]}