@nationalarchives/frontend 0.1.14-prerelease → 0.1.15-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 (61) 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/all.mjs +7 -7
  6. package/nationalarchives/all.scss +2 -5
  7. package/nationalarchives/components/breadcrumbs/_index.scss +62 -19
  8. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +2 -0
  9. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -0
  10. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +63 -0
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +28 -0
  12. package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
  13. package/nationalarchives/components/breadcrumbs/template.njk +3 -3
  14. package/nationalarchives/components/button/fixtures.json +5 -5
  15. package/nationalarchives/components/button/template.njk +1 -1
  16. package/nationalarchives/components/card/_index.scss +72 -29
  17. package/nationalarchives/components/card/card.stories.js +6 -1
  18. package/nationalarchives/components/card/fixtures.json +2 -2
  19. package/nationalarchives/components/card/macro-options.json +6 -6
  20. package/nationalarchives/components/card/template.njk +5 -5
  21. package/nationalarchives/components/filters/filters.stories.js +1 -1
  22. package/nationalarchives/components/footer/_index.scss +6 -1
  23. package/nationalarchives/components/footer/template.njk +1 -1
  24. package/nationalarchives/components/header/_index.scss +11 -8
  25. package/nationalarchives/components/header/template.njk +1 -1
  26. package/nationalarchives/components/hero/_index.scss +4 -13
  27. package/nationalarchives/components/index-grid/_index.scss +18 -1
  28. package/nationalarchives/components/index-grid/index-grid.stories.js +5 -2
  29. package/nationalarchives/components/index-grid/macro-options.json +22 -2
  30. package/nationalarchives/components/index-grid/template.njk +12 -6
  31. package/nationalarchives/components/message/_index.scss +1 -1
  32. package/nationalarchives/components/picture/_index.scss +12 -13
  33. package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -1
  34. package/nationalarchives/components/tabs/_index.scss +6 -12
  35. package/nationalarchives/patterns/featured-collection/_index.scss +1 -1
  36. package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +1 -1
  37. package/nationalarchives/patterns/featured-collection/template.njk +2 -2
  38. package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +85 -0
  39. package/nationalarchives/stories/utilities/{colour.stories.js → colour-schemes/colour-schemes.stories.js} +123 -50
  40. package/nationalarchives/stories/utilities/overrides/overrides.mdx +66 -0
  41. package/nationalarchives/stories/utilities/overrides/overrides.stories.js +36 -0
  42. package/nationalarchives/stories/utilities/{headings.stories.js → typography/headings.stories.js} +2 -1
  43. package/nationalarchives/stories/utilities/typography/typography.stories.js +34 -0
  44. package/nationalarchives/tools/_colour.scss +22 -2
  45. package/nationalarchives/tools/_typography.scss +13 -1
  46. package/nationalarchives/utilities/_global.scss +8 -4
  47. package/nationalarchives/utilities/_index.scss +1 -0
  48. package/nationalarchives/utilities/_overrides.scss +17 -0
  49. package/nationalarchives/utilities/_typography.scss +36 -27
  50. package/nationalarchives/variables/_colour.scss +35 -32
  51. package/nationalarchives/variables/_index.scss +1 -0
  52. package/nationalarchives/variables/_spacing.scss +7 -0
  53. package/nationalarchives/variables/_typography.scss +2 -1
  54. package/package.json +1 -1
  55. package/nationalarchives/components/card/card.js +0 -2
  56. package/nationalarchives/components/card/card.js.map +0 -1
  57. package/nationalarchives/components/card/card.mjs +0 -45
  58. package/nationalarchives/stories/utilities/typography.stories.js +0 -29
  59. /package/nationalarchives/stories/utilities/{heading-groups.stories.js → typography/heading-groups.stories.js} +0 -0
  60. /package/nationalarchives/stories/utilities/{lists.stories.js → typography/lists.stories.js} +0 -0
  61. /package/nationalarchives/stories/utilities/{typography.mdx → typography/typography.mdx} +0 -0
@@ -43,9 +43,9 @@
43
43
  href: "#",
44
44
  image: {
45
45
  src: "https://picsum.photos/id/29/640/360",
46
- alt: "A placeholder image",
47
- label: "Feature"
46
+ alt: "A placeholder image"
48
47
  },
48
+ label: "Feature",
49
49
  body: "<p>Card body</p>"
50
50
  })
51
51
  },
@@ -0,0 +1,85 @@
1
+ import { Meta, Canvas } from "@storybook/blocks";
2
+ import * as ColourStories from './colour-schemes.stories';
3
+
4
+ <Meta of={ColourStories} />
5
+
6
+ # Colour schemes
7
+
8
+ ## System theme
9
+
10
+ The system theme follows the operating system preference for `prefers-color-scheme` which can either be `light` or `dark`.
11
+
12
+ The system theme also follows the preference for `prefers-contrast` which can be `no-preference`, `more`, `less` or `custom`.
13
+
14
+ At this time, only `prefers-contrast: no-preference` and `prefers-contrast: more` are supported.
15
+
16
+ - [MDN Web Docs - prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme)
17
+ - [MDN Web Docs - prefers-contrast](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast)
18
+
19
+ ```html
20
+ <html class="tna-template tna-template--system-theme">
21
+ <head>
22
+ <title>System theme</title>
23
+ </head>
24
+ <body class="tna-template__body">
25
+ </body>
26
+ </html>
27
+ ```
28
+
29
+ ## Light theme
30
+
31
+ ```html
32
+ <html class="tna-template tna-template--light-theme">
33
+ <head>
34
+ <title>Light theme</title>
35
+ </head>
36
+ <body class="tna-template__body">
37
+ </body>
38
+ </html>
39
+ ```
40
+
41
+ ## Dark theme
42
+
43
+ ```html
44
+ <html class="tna-template tna-template--dark-theme">
45
+ <head>
46
+ <title>Dark theme</title>
47
+ </head>
48
+ <body class="tna-template__body">
49
+ </body>
50
+ </html>
51
+ ```
52
+
53
+ ## High contrast themes
54
+
55
+ The high contrast themes are applied on top of the existing light and dark themes with an extra `tna-template--high-contrast-theme` class on the `tna-template` element.
56
+
57
+ ### Light, high contrast theme
58
+
59
+ ```html
60
+ <html class="tna-template tna-template--light-theme tna-template--high-contrast-theme">
61
+ <head>
62
+ <title>Light, high contrast theme</title>
63
+ </head>
64
+ <body class="tna-template__body">
65
+ </body>
66
+ </html>
67
+ ```
68
+
69
+ ### Dark, high contrast theme
70
+
71
+ ```html
72
+ <html class="tna-template tna-template--dark-theme tna-template--high-contrast-theme">
73
+ <head>
74
+ <title>Dark, high contrast theme</title>
75
+ </head>
76
+ <body class="tna-template__body">
77
+ </body>
78
+ </html>
79
+ ```
80
+
81
+ ## Colour definitions
82
+
83
+ The colours are defined in `src/nationalarchives/variables/_colour.scss` as a separate map for each theme.
84
+
85
+ This allows you to reference a colour, such as `font-base` without having to worry about which theme is currently in use.
@@ -1,13 +1,12 @@
1
- import Header from "../../components/header/template.njk";
2
- import Breadcrumbs from "../../components/breadcrumbs/template.njk";
3
- import Card from "../../components/card/template.njk";
4
- import Hero from "../../components/hero/template.njk";
5
- import IndexGrid from "../../components/index-grid/template.njk";
6
- import Message from "../../components/message/template.njk";
7
- import Picture from "../../components/picture/template.njk";
8
- import Tabs from "../../components/tabs/template.njk";
9
- import Footer from "../../components/footer/template.njk";
10
- import { supportDynamicColourSchemes } from "../../../../.storybook/preview";
1
+ import Header from "../../../components/header/template.njk";
2
+ import Breadcrumbs from "../../../components/breadcrumbs/template.njk";
3
+ import Card from "../../../components/card/template.njk";
4
+ import Hero from "../../../components/hero/template.njk";
5
+ import IndexGrid from "../../../components/index-grid/template.njk";
6
+ import Message from "../../../components/message/template.njk";
7
+ import Picture from "../../../components/picture/template.njk";
8
+ import Tabs from "../../../components/tabs/template.njk";
9
+ import Footer from "../../../components/footer/template.njk";
11
10
 
12
11
  const argTypes = {
13
12
  theme: {
@@ -23,15 +22,11 @@ const argTypes = {
23
22
  };
24
23
 
25
24
  export default {
26
- title: "Experimental/Utilities/Colour themes",
25
+ title: "Utilities/Colour schemes",
27
26
  argTypes,
28
27
  };
29
28
 
30
29
  const Template = ({ theme }) => {
31
- if (supportDynamicColourSchemes) {
32
- // document.documentElement.classList.remove("tna-template--light-theme");
33
- // document.documentElement.classList.add("tna-template--system-theme");
34
- }
35
30
  return `<div class="tna-template ${
36
31
  theme === "system"
37
32
  ? "tna-template--system-theme"
@@ -111,7 +106,6 @@ const Template = ({ theme }) => {
111
106
  <p class="tna-hgroup__supertitle">TNA colour theme</p>
112
107
  <h2 class="tna-hgroup__title">Heading</h2>
113
108
  </hgroup>
114
- <hr>
115
109
  <p class="tna-p">Lorem ipsum <a href="#">link</a></p>
116
110
  <ul class="tna-ul">
117
111
  <li>Alpha</li>
@@ -120,13 +114,33 @@ const Template = ({ theme }) => {
120
114
  </ul>
121
115
  <a href="#" class="tna-button">Primary button</a>
122
116
  <a href="#" class="tna-button tna-button--secondary">Secondary button</a>
123
- <hr>
117
+ </div>
118
+ </div>
119
+ <hr>
120
+ <div class="tna-container">
121
+ <div class="tna-column tna-column--full">
122
+ <p class="tna-!--no-margin-bottom">Lorem ipsum</p>
123
+ <p class="tna-!--no-margin-bottom tna-!__padding-top--xs">Lorem ipsum</p>
124
+ <p class="tna-!--no-margin-bottom tna-!__padding-top--s">Lorem ipsum</p>
125
+ <p class="tna-!--no-margin-bottom tna-!__padding-top--m">Lorem ipsum</p>
126
+ <p class="tna-!--no-margin-bottom tna-!__padding-top--l">Lorem ipsum</p>
127
+ <p class="tna-!--no-margin-bottom tna-!__padding-top--xl">Lorem ipsum</p>
128
+ </div>
129
+ </div>
130
+ <hr>
131
+ <div class="tna-container">
132
+ <div class="tna-column tna-column--full">
124
133
  ${Message({
125
134
  params: {
126
135
  message:
127
136
  "Please note this page references hunger strikes and force feeding, which some people may find upsetting.",
128
137
  },
129
138
  })}
139
+ </div>
140
+ </div>
141
+ <hr>
142
+ <div class="tna-container">
143
+ <div class="tna-column tna-column--full">
130
144
  ${Card({
131
145
  params: {
132
146
  heading: {
@@ -143,10 +157,43 @@ const Template = ({ theme }) => {
143
157
  width: 1996,
144
158
  height: 1331,
145
159
  },
160
+ label: "New",
161
+ body: "<p>Card body</p>",
162
+ classes: "tna-card--demo",
163
+ },
164
+ })}
165
+ </div>
166
+ </div>
167
+ <hr>
168
+ <div class="tna-container">
169
+ <div class="tna-column tna-column--full">
170
+ ${Card({
171
+ params: {
172
+ heading: {
173
+ supertitle: "Card supertitle",
174
+ title: "Card title",
175
+ level: 3,
176
+ size: "l",
177
+ singleSentence: false,
178
+ },
179
+ href: "#",
180
+ image: {
181
+ src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
182
+ alt: "The National Archives office",
183
+ width: 1996,
184
+ height: 1331,
185
+ },
186
+ label: "New",
146
187
  body: "<p>Card body</p>",
188
+ featured: true,
147
189
  classes: "tna-card--demo",
148
190
  },
149
191
  })}
192
+ </div>
193
+ </div>
194
+ <hr>
195
+ <div class="tna-container">
196
+ <div class="tna-column tna-column--full">
150
197
  ${Tabs({
151
198
  params: {
152
199
  title: "Example tabs",
@@ -170,6 +217,11 @@ const Template = ({ theme }) => {
170
217
  classes: "tna-tabs--demo",
171
218
  },
172
219
  })}
220
+ </div>
221
+ </div>
222
+ <hr>
223
+ <div class="tna-container">
224
+ <div class="tna-column tna-column--full">
173
225
  ${Picture({
174
226
  params: {
175
227
  src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
@@ -182,46 +234,67 @@ const Template = ({ theme }) => {
182
234
  classes: "tna-picture--demo",
183
235
  },
184
236
  })}
185
- ${IndexGrid({
186
- params: {
187
- heading: "My dogs",
188
- items: Array(12)
189
- .fill({
190
- ...{
191
- href: "#",
192
- src: "https://picsum.photos/id/237/800/600",
193
- alt: "Photo of a puppy",
194
- width: "800",
195
- height: "600",
196
- title: "Cat",
197
- subtitle: "4 photos",
198
- },
199
- })
200
- .map((item, index) => {
201
- const pseudoRandom = ((index * 29) % 8) + 1;
202
- return {
203
- ...item,
204
- href: `#/category-${index}`,
205
- title: `Category #${index + 101}`,
206
- subtitle: `${pseudoRandom} photos`,
207
- };
208
- }),
209
- columns: 4,
210
- columnsMedium: 3,
211
- columnsSmall: 2,
212
- columnsTiny: 1,
213
- },
214
- })}
215
237
  </div>
216
238
  </div>
239
+ <hr>
240
+ ${IndexGrid({
241
+ params: {
242
+ heading: "My dogs",
243
+ items: Array(12)
244
+ .fill({
245
+ ...{
246
+ href: "#",
247
+ src: "https://picsum.photos/id/237/800/600",
248
+ alt: "Photo of a puppy",
249
+ width: "800",
250
+ height: "600",
251
+ title: "Cat",
252
+ subtitle: "4 photos",
253
+ },
254
+ })
255
+ .map((item, index) => {
256
+ const pseudoRandom = ((index * 29) % 8) + 1;
257
+ return {
258
+ ...item,
259
+ href: `#/category-${index}`,
260
+ title: `Category #${index + 101}`,
261
+ subtitle: `${pseudoRandom} photos`,
262
+ };
263
+ }),
264
+ columns: 4,
265
+ columnsMedium: 3,
266
+ columnsSmall: 2,
267
+ columnsTiny: 1,
268
+ },
269
+ })}
217
270
  <article>
218
271
  ${Footer({})}
219
272
  </div>
220
273
  </div>`;
221
274
  };
222
275
 
223
- export const Examples = Template.bind({});
224
- // Examples.parameters = { options: { showPanel: false } };
225
- Examples.args = {
276
+ export const System = Template.bind({});
277
+ // System.parameters = { options: { showPanel: false } };
278
+ System.args = {
279
+ theme: "system",
280
+ };
281
+
282
+ export const Light = Template.bind({});
283
+ Light.args = {
226
284
  theme: "light",
227
285
  };
286
+
287
+ export const Dark = Template.bind({});
288
+ Dark.args = {
289
+ theme: "dark",
290
+ };
291
+
292
+ export const LightHighContrast = Template.bind({});
293
+ LightHighContrast.args = {
294
+ theme: "light high-contrast",
295
+ };
296
+
297
+ export const DarkHighContrast = Template.bind({});
298
+ DarkHighContrast.args = {
299
+ theme: "dark high-contrast",
300
+ };
@@ -0,0 +1,66 @@
1
+ import { Meta, Canvas } from "@storybook/blocks";
2
+ import * as OverrideStories from './overrides.stories';
3
+
4
+ <Meta of={OverrideStories} />
5
+
6
+ # Overrides
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`
65
+
66
+
@@ -0,0 +1,36 @@
1
+ const argTypes = {
2
+ marginTop: {
3
+ control: "radio",
4
+ options: [
5
+ "none",
6
+ // "xs",
7
+ "s",
8
+ "m",
9
+ "l",
10
+ "xl",
11
+ ],
12
+ },
13
+ };
14
+
15
+ export default {
16
+ title: "Utilities/Overrides",
17
+ argTypes,
18
+ };
19
+
20
+ const Template = ({ marginTop }) => {
21
+ const marginClass =
22
+ marginTop === "none"
23
+ ? `tna-!--no-margin-top`
24
+ : `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>`;
31
+ };
32
+
33
+ export const Margin = Template.bind({});
34
+ Margin.args = {
35
+ marginTop: "none",
36
+ };
@@ -12,7 +12,8 @@ const HeadingTemplate = ({ params }, level) => `<h${level} class="tna-heading${
12
12
  params.size ? ` tna-heading--${params.size}` : ""
13
13
  }">
14
14
  ${params.text} (${params.size.toUpperCase()})
15
- </h${level}>`;
15
+ </h${level}>
16
+ `;
16
17
 
17
18
  const HeadingsTemplate = ({ text }) =>
18
19
  `${HeadingTemplate({ params: { text, size: "xl" } }, 1)}${HeadingTemplate(
@@ -0,0 +1,34 @@
1
+ const argTypes = {
2
+ text: { control: "text" },
3
+ };
4
+
5
+ export default {
6
+ title: "Utilities/Typography",
7
+ argTypes,
8
+ };
9
+
10
+ const ParagraphTemplate = ({ paragraphs }) =>
11
+ paragraphs.map((paragraph) => `<p class="tna-p">${paragraph}</p>`).join("");
12
+ export const Paragraph = ParagraphTemplate.bind({});
13
+ Paragraph.args = {
14
+ paragraphs: [
15
+ "This is some body text.",
16
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh. Donec ac tellus in dui rutrum maximus. Aliquam vel euismod eros. Integer ut magna velit. Fusce sed dui sit amet metus eleifend dictum quis vitae mi. Aenean sagittis euismod purus, in accumsan metus venenatis nec. Nullam nec velit felis. Sed nec felis eu nisl varius dictum eu quis nisl. Donec dapibus est arcu, vel pellentesque risus pellentesque eget.",
17
+ "Nam a posuere lectus. Vivamus facilisis est pretium augue aliquet iaculis. Phasellus ligula orci, commodo eget lectus et, tincidunt scelerisque erat. Aliquam in est vel purus ultricies vulputate non sed ligula. Pellentesque ut felis ullamcorper, eleifend erat dapibus, feugiat metus. Phasellus vitae dolor commodo, posuere nisl sed, luctus mauris. Etiam malesuada tincidunt enim, ac fermentum est pulvinar id. Maecenas id accumsan libero. Curabitur at velit nisi. Nullam gravida mauris quam, tempor pharetra risus venenatis vel. Proin quis malesuada lacus. Nulla condimentum facilisis turpis, et elementum leo. Nulla gravida quam mauris, id scelerisque est rhoncus ac.",
18
+ ],
19
+ };
20
+
21
+ const BlockquoteTemplate = ({
22
+ html,
23
+ author,
24
+ }) => `<blockquote class="tna-blockquote">
25
+ <div class="tna-blockquote__quote">
26
+ ${html}
27
+ </div>
28
+ <p class="tna-blockquote__author">${author}</p>
29
+ </p>`;
30
+ export const Blockquote = BlockquoteTemplate.bind({});
31
+ Blockquote.args = {
32
+ html: "<p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>",
33
+ author: "Douglas Adams, Mostly Harmless",
34
+ };
@@ -28,12 +28,20 @@
28
28
 
29
29
  @mixin colour-font($colour) {
30
30
  color: map.get(colour.$colour-palette-default, $colour);
31
- color: var(--#{$colour});
31
+ @if $colour == "accent" {
32
+ color: var(--#{$colour}, var(--accent-default));
33
+ } @else {
34
+ color: var(--#{$colour});
35
+ }
32
36
  }
33
37
 
34
38
  @mixin colour-background($colour) {
35
39
  background-color: map.get(colour.$colour-palette-default, $colour);
36
- background-color: var(--#{$colour});
40
+ @if $colour == "accent" {
41
+ background-color: var(--#{$colour}, var(--accent-default));
42
+ } @else {
43
+ background-color: var(--#{$colour});
44
+ }
37
45
  }
38
46
 
39
47
  @mixin colour-border($colour) {
@@ -105,3 +113,15 @@
105
113
  @include colour-css-vars-high-contrast-dark;
106
114
  }
107
115
  }
116
+
117
+ @mixin on-high-contrast {
118
+ .tna-template--high-contrast-theme & {
119
+ @content;
120
+ }
121
+
122
+ @media (prefers-contrast: more) {
123
+ .tna-template--system-theme & {
124
+ @content;
125
+ }
126
+ }
127
+ }
@@ -5,9 +5,17 @@
5
5
  font-size: #{math.div($fontSizePx, typography.$base-font-size-px)}rem;
6
6
  }
7
7
 
8
+ @mixin main-font-weight {
9
+ font-weight: typography.$font-weight-main;
10
+ }
11
+
12
+ @mixin main-font-weight-bold {
13
+ font-weight: typography.$font-weight-main-bold;
14
+ }
15
+
8
16
  @mixin main-font {
9
17
  font-family: typography.$font-family-main;
10
- font-weight: typography.$font-weight-main;
18
+ @include main-font-weight;
11
19
  }
12
20
 
13
21
  @mixin heading-font {
@@ -18,4 +26,8 @@
18
26
  @mixin detail-font {
19
27
  font-family: typography.$font-family-detail;
20
28
  font-weight: typography.$font-weight-detail;
29
+ @include relative-font-size(14);
30
+ text-transform: uppercase;
31
+ line-height: #{math.div(typography.$base-font-size-px, 14)};
32
+ // line-height: 1;
21
33
  }
@@ -98,11 +98,11 @@
98
98
 
99
99
  overflow: auto;
100
100
 
101
- &:has(.tna-header):has(#main[role="main"]):has(.tna-footer) {
101
+ &:has(.tna-header):has(#main-content[role="main"]):has(.tna-footer) {
102
102
  display: flex;
103
103
  flex-direction: column;
104
104
 
105
- #main[role="main"] {
105
+ #main-content[role="main"] {
106
106
  flex: 1;
107
107
  }
108
108
  }
@@ -134,11 +134,15 @@ canvas {
134
134
  }
135
135
 
136
136
  hr {
137
- margin: 1rem;
137
+ margin: 3rem 0;
138
138
 
139
139
  border-width: 1px 0 0;
140
140
  @include colour.colour-border("keyline");
141
- border-style: solid;
141
+ border-style: dashed;
142
+
143
+ @include colour.on-high-contrast {
144
+ border-style: solid;
145
+ }
142
146
  }
143
147
 
144
148
  .tna-visually-hidden {
@@ -1,3 +1,4 @@
1
1
  @forward "debug";
2
2
  @forward "global";
3
+ @forward "overrides";
3
4
  @forward "typography";
@@ -0,0 +1,17 @@
1
+ @use "../variables/spacing";
2
+
3
+ @each $property in margin, padding {
4
+ @each $direction in top, bottom {
5
+ .tna-\!--no-#{$property}-#{$direction},
6
+ .tna-\!--no-#{$property}-vertical {
7
+ #{$property}-#{$direction}: 0 !important;
8
+ }
9
+
10
+ @each $size, $amount in spacing.$spacing {
11
+ .tna-\!--#{$property}-#{$direction}-#{$size},
12
+ .tna-\!--#{$property}-vertical-#{$size} {
13
+ #{$property}-#{$direction}: #{$amount}rem !important;
14
+ }
15
+ }
16
+ }
17
+ }