@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.
- package/nationalarchives/all.css +13 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.scss +2 -3
- package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-regular-400.woff2 +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
- package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +2 -2
- package/nationalarchives/components/button/_button-group.scss +18 -0
- package/nationalarchives/components/button/_index.scss +24 -7
- package/nationalarchives/components/button/button.stories.js +63 -6
- package/nationalarchives/components/button/fixtures.json +3 -3
- package/nationalarchives/components/button/macro-options.json +13 -1
- package/nationalarchives/components/button/template.njk +7 -2
- package/nationalarchives/components/card/_index.scss +62 -47
- package/nationalarchives/components/card/card.stories.js +59 -8
- package/nationalarchives/components/card/fixtures.json +59 -20
- package/nationalarchives/components/card/macro-options.json +14 -2
- package/nationalarchives/components/card/template.njk +12 -8
- package/nationalarchives/components/filters/_index.scss +19 -14
- package/nationalarchives/components/footer/_index.scss +194 -60
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +80 -71
- package/nationalarchives/components/footer/macro-options.json +34 -8
- package/nationalarchives/components/footer/template.njk +110 -53
- package/nationalarchives/components/header/_index.scss +40 -4
- package/nationalarchives/components/hero/_index.scss +1 -1
- package/nationalarchives/components/index-grid/_index.scss +27 -5
- package/nationalarchives/components/index-grid/index-grid.stories.js +25 -1
- package/nationalarchives/components/index-grid/macro-options.json +12 -0
- package/nationalarchives/components/index-grid/template.njk +9 -11
- package/nationalarchives/components/message/_index.scss +8 -0
- package/nationalarchives/components/picture/_index.scss +2 -0
- package/nationalarchives/components/picture/picture.js +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +2 -0
- package/nationalarchives/components/skip-link/skip-link.stories.js +3 -2
- package/nationalarchives/components/tabs/_index.scss +6 -3
- package/nationalarchives/components/tabs/tabs.stories.js +6 -6
- package/nationalarchives/lib/font-awesome/_animated.scss +276 -0
- package/nationalarchives/lib/font-awesome/_bordered-pulled.scss +20 -0
- package/nationalarchives/lib/font-awesome/_core.scss +42 -0
- package/nationalarchives/lib/font-awesome/_fixed-width.scss +7 -0
- package/nationalarchives/lib/font-awesome/_functions.scss +57 -0
- package/nationalarchives/lib/font-awesome/_icons.scss +11 -0
- package/nationalarchives/lib/font-awesome/_list.scss +20 -0
- package/nationalarchives/lib/font-awesome/_mixins.scss +74 -0
- package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +31 -0
- package/nationalarchives/lib/font-awesome/_screen-reader.scss +14 -0
- package/nationalarchives/lib/font-awesome/_shims.scss +2653 -0
- package/nationalarchives/lib/font-awesome/_sizing.scss +16 -0
- package/nationalarchives/lib/font-awesome/_stacked.scss +32 -0
- package/nationalarchives/lib/font-awesome/_variables.scss +4976 -0
- package/nationalarchives/lib/font-awesome/brands.scss +34 -0
- package/nationalarchives/lib/font-awesome/fontawesome.scss +21 -0
- package/nationalarchives/lib/font-awesome/regular.scss +28 -0
- package/nationalarchives/lib/font-awesome/solid.scss +28 -0
- package/nationalarchives/lib/font-awesome/v4-shims.scss +11 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.mdx +22 -0
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +483 -97
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +37 -57
- package/nationalarchives/stories/utilities/typography/heading-groups.stories.js +1 -1
- package/nationalarchives/stories/utilities/typography/typography.mdx +2 -0
- package/nationalarchives/stories/utilities/typography/typography.stories.js +20 -1
- package/nationalarchives/templates/layouts/_generic.njk +1 -1
- package/nationalarchives/tools/_colour.scss +86 -41
- package/nationalarchives/tools/_typography.scss +13 -0
- package/nationalarchives/utilities/_font-awesome.scss +5 -0
- package/nationalarchives/utilities/_global.scss +70 -26
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_overrides.scss +42 -10
- package/nationalarchives/utilities/_typography.scss +198 -59
- package/nationalarchives/variables/_assets.scss +1 -0
- package/nationalarchives/variables/_colour.scss +29 -23
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_spacing.scss +3 -1
- package/nationalarchives/variables/_typography.scss +4 -1
- package/package.json +13 -13
- package/nationalarchives/patterns/_index.scss +0 -1
- package/nationalarchives/patterns/featured-collection/_index.scss +0 -13
- package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +0 -34
- package/nationalarchives/patterns/featured-collection/macro-options.json +0 -20
- package/nationalarchives/patterns/featured-collection/macro.njk +0 -3
- 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
|
-
##
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- `
|
22
|
-
- `
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
###
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- `tna-!--padding-top-l`
|
46
|
-
- `tna-!--padding-top-xl`
|
47
|
-
|
48
|
-
### Bottom
|
49
|
-
|
50
|
-
- `tna-!--no-padding-bottom`
|
51
|
-
- `tna-!--padding-bottom-xs`
|
52
|
-
- `tna-!--padding-bottom-s`
|
53
|
-
- `tna-!--padding-bottom-m`
|
54
|
-
- `tna-!--padding-bottom-l`
|
55
|
-
- `tna-!--padding-bottom-xl`
|
56
|
-
|
57
|
-
### Vertical (top and bottom)
|
58
|
-
|
59
|
-
- `tna-!--no-padding-vertical`
|
60
|
-
- `tna-!--padding-vertical-xs`
|
61
|
-
- `tna-!--padding-vertical-s`
|
62
|
-
- `tna-!--padding-vertical-m`
|
63
|
-
- `tna-!--padding-vertical-l`
|
64
|
-
- `tna-!--padding-vertical-xl`
|
8
|
+
## Properties
|
9
|
+
|
10
|
+
Property options: `margin`, `padding`
|
11
|
+
|
12
|
+
```css
|
13
|
+
tna-!--no-[property]-[direction]
|
14
|
+
```
|
15
|
+
|
16
|
+
### No margin/padding
|
17
|
+
|
18
|
+
Direction options:
|
19
|
+
|
20
|
+
- `top`
|
21
|
+
- `bottom`
|
22
|
+
- `vertical` - `top` and `bottom`
|
23
|
+
|
24
|
+
```css
|
25
|
+
tna-!--no-[property]-[direction]
|
26
|
+
```
|
27
|
+
|
28
|
+
### Sizes
|
29
|
+
|
30
|
+
Size options: `xs`, `s`, `m`, `l`, `xl`, `xxl`
|
31
|
+
|
32
|
+
```css
|
33
|
+
tna-!--[property]-[direction]-[size]
|
34
|
+
```
|
35
|
+
|
36
|
+
### Responsive
|
37
|
+
|
38
|
+
Device options: `medium`, `small`, `tiny`
|
39
|
+
|
40
|
+
```css
|
41
|
+
tna-!--no-[property]-[direction]-[device]
|
42
|
+
tna-!--[property]-[direction]-[size]-[device]
|
43
|
+
```
|
44
|
+
|
65
45
|
|
66
46
|
|
@@ -22,7 +22,7 @@ const Template = ({
|
|
22
22
|
? `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
23
23
|
<h${level} class="tna-hgroup__title">
|
24
24
|
<span class="tna-hgroup__supertitle">${supertitle}</span>
|
25
|
-
|
25
|
+
<span class="tna-hgroup__title">${title}</span>
|
26
26
|
</h${level}>
|
27
27
|
</hgroup>`
|
28
28
|
: `<hgroup class="tna-hgroup tna-hgroup--${size}">
|
@@ -13,6 +13,7 @@ We use a set of typefaces...
|
|
13
13
|
## Headings
|
14
14
|
|
15
15
|
<Canvas of={HeadingStories.Headings} />
|
16
|
+
<Canvas of={TypographyStories.HeadingLink} />
|
16
17
|
|
17
18
|
## Heading groups
|
18
19
|
|
@@ -30,6 +31,7 @@ In the second example, the heading will be read as two separate sentences; `Reco
|
|
30
31
|
|
31
32
|
<Canvas of={TypographyStories.Paragraph} />
|
32
33
|
<Canvas of={TypographyStories.Blockquote} />
|
34
|
+
<Canvas of={TypographyStories.SceneSetter} />
|
33
35
|
<Canvas of={ListStories.UnorderedList} />
|
34
36
|
<Canvas of={ListStories.UnorderedListPlain} />
|
35
37
|
<Canvas of={ListStories.OrderedList} />
|
@@ -18,6 +18,25 @@ Paragraph.args = {
|
|
18
18
|
],
|
19
19
|
};
|
20
20
|
|
21
|
+
const HeadingLinkTemplate = ({ text, href }) =>
|
22
|
+
`<h2 class="tna-heading">
|
23
|
+
<a href="${href}">${text}</a>
|
24
|
+
</h2>`;
|
25
|
+
export const HeadingLink = HeadingLinkTemplate.bind({});
|
26
|
+
HeadingLink.args = {
|
27
|
+
text: "Reaerching with The National Archives",
|
28
|
+
href: "#",
|
29
|
+
};
|
30
|
+
|
31
|
+
const SceneSetterTemplate = ({ text, href }) =>
|
32
|
+
`<p class="tna-scene-setter">
|
33
|
+
${text}
|
34
|
+
</p>`;
|
35
|
+
export const SceneSetter = SceneSetterTemplate.bind({});
|
36
|
+
SceneSetter.args = {
|
37
|
+
text: `We are the official archive of England and Wales. Discover 1,000 years of history through <a href="#">fascinating stories</a> from the past or <a href="#">start your own research</a> and <a href="#">search our catalogue</a> of 32 million records. <a href="#">Plan a visit</a> to access original historic documents from our collections then enjoy the grounds, café, and <a href="#">free exhibitions</a>.`,
|
38
|
+
};
|
39
|
+
|
21
40
|
const BlockquoteTemplate = ({
|
22
41
|
html,
|
23
42
|
author,
|
@@ -26,7 +45,7 @@ const BlockquoteTemplate = ({
|
|
26
45
|
${html}
|
27
46
|
</div>
|
28
47
|
<p class="tna-blockquote__author">${author}</p>
|
29
|
-
</
|
48
|
+
</blockquote>`;
|
30
49
|
export const Blockquote = BlockquoteTemplate.bind({});
|
31
50
|
Blockquote.args = {
|
32
51
|
html: "<p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
{# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
|
2
|
-
{% from "
|
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
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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
|
-
|
157
|
-
@include colour-css-vars-dark;
|
158
|
-
}
|
206
|
+
@include colour-background("accent-background");
|
159
207
|
|
160
|
-
|
161
|
-
|
162
|
-
}
|
208
|
+
@include colour-font("font-base");
|
209
|
+
}
|
163
210
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
}
|
211
|
+
@mixin accent {
|
212
|
+
@extend %accent;
|
213
|
+
}
|
168
214
|
|
169
|
-
|
170
|
-
|
171
|
-
|
215
|
+
%accent-background {
|
216
|
+
@include colour-background("accent-background");
|
217
|
+
}
|
172
218
|
|
173
|
-
|
174
|
-
|
175
|
-
|
219
|
+
@mixin accent-background {
|
220
|
+
@extend %accent-background;
|
221
|
+
}
|
176
222
|
|
177
|
-
|
178
|
-
|
179
|
-
|
223
|
+
%light-accent-background {
|
224
|
+
@include colour-background("accent-background-light");
|
225
|
+
}
|
180
226
|
|
181
|
-
|
182
|
-
|
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)};
|
@@ -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
|
-
|
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:
|
142
|
+
margin: 2rem 0;
|
138
143
|
|
139
144
|
border-width: 1px 0 0;
|
140
145
|
@include colour.colour-border("keyline");
|
141
|
-
border-style:
|
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-
|
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,21 +1,45 @@
|
|
1
1
|
@use "../variables/spacing";
|
2
2
|
@use "../tools/media";
|
3
3
|
|
4
|
-
@
|
5
|
-
@
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
-
@
|
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-
|
29
|
-
@include overrides(spacing.$spacing
|
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
|
}
|