@nationalarchives/frontend 0.1.9-prerelease → 0.1.11-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/README.md +3 -3
- package/govuk-prototype-kit.config.json +0 -3
- package/nationalarchives/_features.scss +4 -0
- package/nationalarchives/all.css +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +54 -3
- package/nationalarchives/all.scss +8 -4
- package/nationalarchives/assets/images/footer/facebook.svg +11 -0
- package/nationalarchives/assets/images/footer/flickr.svg +11 -0
- package/nationalarchives/assets/images/footer/instagram.svg +17 -0
- package/nationalarchives/assets/images/footer/rss.svg +13 -0
- package/nationalarchives/assets/images/footer/twitter.svg +14 -0
- package/nationalarchives/assets/images/footer/youtube.svg +12 -0
- package/nationalarchives/assets/images/tna-square-logo.svg +5 -24
- package/nationalarchives/components/_index.scss +13 -0
- package/nationalarchives/components/breadcrumbs/_index.scss +28 -6
- package/nationalarchives/components/breadcrumbs/breadcrumbs.stories.js +1 -2
- package/nationalarchives/components/breadcrumbs/fixtures.json +1 -1
- package/nationalarchives/components/breadcrumbs/macro.njk +1 -1
- package/nationalarchives/components/breadcrumbs/template.njk +14 -13
- package/nationalarchives/components/button/_index.scss +23 -11
- package/nationalarchives/components/button/button.stories.js +1 -2
- package/nationalarchives/components/button/fixtures.json +5 -5
- package/nationalarchives/components/button/macro.njk +1 -1
- package/nationalarchives/components/card/_index.scss +51 -7
- package/nationalarchives/components/card/card.js +2 -0
- package/nationalarchives/components/card/card.js.map +1 -0
- package/nationalarchives/components/card/card.mjs +45 -0
- package/nationalarchives/components/card/card.stories.js +18 -15
- package/nationalarchives/components/card/fixtures.json +14 -12
- package/nationalarchives/components/card/macro-options.json +18 -0
- package/nationalarchives/components/card/macro.njk +1 -1
- package/nationalarchives/components/card/template.njk +9 -4
- package/nationalarchives/components/filters/filters.stories.js +1 -2
- package/nationalarchives/components/filters/macro.njk +1 -1
- package/nationalarchives/components/filters/template.njk +2 -2
- package/nationalarchives/components/footer/_index.scss +68 -13
- package/nationalarchives/components/footer/fixtures.json +1 -1
- package/nationalarchives/components/footer/footer.stories.js +20 -23
- package/nationalarchives/components/footer/macro-options.json +12 -6
- package/nationalarchives/components/footer/macro.njk +1 -1
- package/nationalarchives/components/footer/template.njk +26 -16
- package/nationalarchives/components/grid/_index.scss +10 -12
- package/nationalarchives/components/grid/fixtures.json +12 -12
- package/nationalarchives/components/grid/grid.stories.js +56 -3
- package/nationalarchives/components/grid/macro-options.json +30 -0
- package/nationalarchives/components/grid/macro.njk +1 -1
- package/nationalarchives/components/grid/template.njk +17 -1
- package/nationalarchives/components/header/_index.scss +269 -60
- package/nationalarchives/components/header/header.js +1 -1
- package/nationalarchives/components/header/header.js.map +1 -1
- package/nationalarchives/components/header/header.mjs +7 -12
- package/nationalarchives/components/header/header.stories.js +156 -6
- package/nationalarchives/components/header/macro-options.json +83 -5
- package/nationalarchives/components/header/macro.njk +1 -1
- package/nationalarchives/components/header/template.njk +45 -36
- package/nationalarchives/components/hero/_index.scss +36 -6
- package/nationalarchives/components/hero/fixtures.json +16 -1
- package/nationalarchives/components/hero/hero.stories.js +32 -16
- package/nationalarchives/components/hero/macro-options.json +14 -2
- package/nationalarchives/components/hero/macro.njk +1 -1
- package/nationalarchives/components/hero/template.njk +7 -5
- package/nationalarchives/components/phase-banner/_index.scss +60 -0
- package/nationalarchives/components/phase-banner/fixtures.json +81 -0
- package/nationalarchives/components/phase-banner/macro-options.json +26 -0
- package/nationalarchives/components/phase-banner/macro.njk +3 -0
- package/nationalarchives/components/phase-banner/phase-banner.stories.js +64 -0
- package/nationalarchives/components/phase-banner/template.njk +16 -0
- package/nationalarchives/components/picture/_index.scss +77 -0
- package/nationalarchives/components/picture/fixtures.json +4 -0
- package/nationalarchives/components/picture/macro-options.json +88 -0
- package/nationalarchives/components/picture/macro.njk +3 -0
- package/nationalarchives/components/picture/picture.js +2 -0
- package/nationalarchives/components/picture/picture.js.map +1 -0
- package/nationalarchives/components/picture/picture.mjs +57 -0
- package/nationalarchives/components/picture/picture.stories.js +63 -0
- package/nationalarchives/components/picture/template.njk +42 -0
- package/nationalarchives/components/profile/_index.scss +2 -0
- package/nationalarchives/components/profile/fixtures.json +4 -0
- package/nationalarchives/components/profile/macro-options.json +14 -0
- package/nationalarchives/components/profile/macro.njk +3 -0
- package/nationalarchives/components/profile/profile.stories.js +32 -0
- package/nationalarchives/components/profile/template.njk +15 -0
- package/nationalarchives/components/sensitive-image/fixtures.json +3 -3
- package/nationalarchives/components/sensitive-image/macro.njk +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.stories.js +1 -2
- package/nationalarchives/components/tabs/_index.scss +148 -0
- package/nationalarchives/components/tabs/fixtures.json +4 -0
- package/nationalarchives/components/tabs/macro-options.json +52 -0
- package/nationalarchives/components/tabs/macro.njk +3 -0
- package/nationalarchives/components/tabs/tabs.js +2 -0
- package/nationalarchives/components/tabs/tabs.js.map +1 -0
- package/nationalarchives/components/tabs/tabs.mjs +214 -0
- package/nationalarchives/components/tabs/tabs.stories.js +302 -0
- package/nationalarchives/components/tabs/template.njk +20 -0
- package/nationalarchives/patterns/_index.scss +1 -0
- package/nationalarchives/patterns/featured-collection/_index.scss +13 -0
- package/nationalarchives/patterns/featured-collection/featured-collection.stories.js +35 -0
- package/nationalarchives/patterns/featured-collection/macro-options.json +20 -0
- package/nationalarchives/patterns/featured-collection/macro.njk +3 -0
- package/nationalarchives/patterns/featured-collection/template.njk +96 -0
- package/nationalarchives/stories/development/contributing.mdx +39 -0
- package/nationalarchives/stories/development/dependencies.mdx +2 -0
- package/nationalarchives/stories/development/technologies.mdx +65 -0
- package/nationalarchives/stories/utilities/colour.stories.js +189 -0
- package/nationalarchives/stories/utilities/typography.mdx +1 -0
- package/nationalarchives/stories/utilities/typography.stories.js +15 -0
- package/nationalarchives/templates/layouts/_generic.njk +1 -1
- package/nationalarchives/tools/_assets.scss +5 -0
- package/nationalarchives/tools/_colour.scss +129 -0
- package/nationalarchives/tools/_grid.scss +2 -2
- package/nationalarchives/tools/_index.scss +5 -0
- package/nationalarchives/tools/_media.scss +12 -11
- package/nationalarchives/tools/_typography.scss +15 -0
- package/nationalarchives/utilities/_debug.scss +11 -0
- package/nationalarchives/utilities/_global.scss +120 -3
- package/nationalarchives/utilities/_index.scss +3 -0
- package/nationalarchives/utilities/_typography.scss +155 -111
- package/nationalarchives/variables/_assets.scss +1 -0
- package/nationalarchives/variables/_colour.scss +120 -11
- package/nationalarchives/variables/{_all.scss → _index.scss} +1 -0
- package/nationalarchives/variables/_media.scss +39 -11
- package/nationalarchives/variables/_typography.scss +1 -1
- package/package.json +18 -15
- package/nationalarchives/components/_all.scss +0 -7
- package/nationalarchives/stories/development/structure.mdx +0 -7
- package/nationalarchives/tools/_all.scss +0 -3
- package/nationalarchives/utilities/_all.scss +0 -2
@@ -0,0 +1,189 @@
|
|
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 Picture from "../../components/picture/template.njk";
|
6
|
+
import Tabs from "../../components/tabs/template.njk";
|
7
|
+
import Footer from "../../components/footer/template.njk";
|
8
|
+
import { supportDynamicColourSchemes } from "../../../../.storybook/preview";
|
9
|
+
|
10
|
+
const argTypes = {
|
11
|
+
theme: {
|
12
|
+
control: "radio",
|
13
|
+
options: [
|
14
|
+
"system",
|
15
|
+
"light",
|
16
|
+
"dark",
|
17
|
+
"light high-contrast",
|
18
|
+
"dark high-contrast",
|
19
|
+
],
|
20
|
+
},
|
21
|
+
};
|
22
|
+
|
23
|
+
export default {
|
24
|
+
title: "Experimental/Utilities/Colour themes",
|
25
|
+
argTypes,
|
26
|
+
};
|
27
|
+
|
28
|
+
const Template = ({ theme }) => {
|
29
|
+
if (supportDynamicColourSchemes) {
|
30
|
+
// document.documentElement.classList.remove("tna-template--light-theme");
|
31
|
+
// document.documentElement.classList.add("tna-template--system-theme");
|
32
|
+
}
|
33
|
+
return `<div class="tna-template ${
|
34
|
+
theme === "system"
|
35
|
+
? "tna-template--system-theme"
|
36
|
+
: theme === "light"
|
37
|
+
? "tna-template--light-theme"
|
38
|
+
: theme === "dark"
|
39
|
+
? "tna-template--dark-theme"
|
40
|
+
: theme === "light high-contrast"
|
41
|
+
? "tna-template--light-theme tna-template--high-contrast-theme"
|
42
|
+
: theme === "dark high-contrast"
|
43
|
+
? "tna-template--dark-theme tna-template--high-contrast-theme"
|
44
|
+
: ""
|
45
|
+
}">
|
46
|
+
<div class="tna-template__body tna-template__body--padded">
|
47
|
+
${Header({
|
48
|
+
params: {
|
49
|
+
navigation: [
|
50
|
+
{
|
51
|
+
text: "Alpha",
|
52
|
+
href: "#/alpha",
|
53
|
+
selected: true,
|
54
|
+
},
|
55
|
+
{
|
56
|
+
text: "Beta",
|
57
|
+
href: "#/beta",
|
58
|
+
},
|
59
|
+
{
|
60
|
+
text: "Gamma",
|
61
|
+
href: "#/gamma",
|
62
|
+
},
|
63
|
+
],
|
64
|
+
colour: "yellow",
|
65
|
+
},
|
66
|
+
})}
|
67
|
+
${Breadcrumbs({
|
68
|
+
params: {
|
69
|
+
items: [
|
70
|
+
{
|
71
|
+
text: "Alpha",
|
72
|
+
href: "#/alpha",
|
73
|
+
},
|
74
|
+
{
|
75
|
+
text: "Beta",
|
76
|
+
href: "#/beta",
|
77
|
+
},
|
78
|
+
{
|
79
|
+
text: "Gamma",
|
80
|
+
href: "#/gamma",
|
81
|
+
},
|
82
|
+
{
|
83
|
+
text: "Delta",
|
84
|
+
href: "#/delta",
|
85
|
+
},
|
86
|
+
{
|
87
|
+
text: "Epsilon",
|
88
|
+
href: "#/epsilon",
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
})}
|
93
|
+
<article>
|
94
|
+
${Hero({
|
95
|
+
params: {
|
96
|
+
heading: "Title",
|
97
|
+
image: {
|
98
|
+
src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
99
|
+
alt: "The National Archives office",
|
100
|
+
width: 1996,
|
101
|
+
height: 1331,
|
102
|
+
},
|
103
|
+
classes: "tna-hero--demo",
|
104
|
+
},
|
105
|
+
})}
|
106
|
+
<div class="tna-container">
|
107
|
+
<div class="tna-column tna-column--full">
|
108
|
+
<hgroup class="tna-hgroup tna-hgroup--l">
|
109
|
+
<p class="tna-hgroup__supertitle">TNA colour theme</p>
|
110
|
+
<h2 class="tna-hgroup__title">Heading</h2>
|
111
|
+
</hgroup>
|
112
|
+
<hr>
|
113
|
+
<p class="tna-p">Lorem ipsum <a href="#">link</a></p>
|
114
|
+
<ul class="tna-ul">
|
115
|
+
<li>Alpha</li>
|
116
|
+
<li>Beta</li>
|
117
|
+
<li>Gamma</li>
|
118
|
+
</ul>
|
119
|
+
<a href="#" class="tna-button">Primary button</a>
|
120
|
+
<a href="#" class="tna-button tna-button--secondary">Secondary button</a>
|
121
|
+
<hr>
|
122
|
+
${Card({
|
123
|
+
params: {
|
124
|
+
heading: {
|
125
|
+
supertitle: "Card supertitle",
|
126
|
+
title: "Card title",
|
127
|
+
level: 3,
|
128
|
+
size: "m",
|
129
|
+
singleSentence: false,
|
130
|
+
},
|
131
|
+
href: "#",
|
132
|
+
image: {
|
133
|
+
src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
134
|
+
alt: "The National Archives office",
|
135
|
+
width: 1996,
|
136
|
+
height: 1331,
|
137
|
+
},
|
138
|
+
body: "<p>Card body</p>",
|
139
|
+
classes: "tna-card--demo",
|
140
|
+
},
|
141
|
+
})}
|
142
|
+
${Tabs({
|
143
|
+
params: {
|
144
|
+
title: "Example tabs",
|
145
|
+
items: [
|
146
|
+
{
|
147
|
+
id: "unique-id-a",
|
148
|
+
title: "Alpha section",
|
149
|
+
body: "<h2>Alpha title</h2><p>Lorem ipsum</p>",
|
150
|
+
},
|
151
|
+
{
|
152
|
+
id: "unique-id-b",
|
153
|
+
title: "Beta section",
|
154
|
+
body: "<h2>Beta title</h2><p>Lorem ipsum</p>",
|
155
|
+
},
|
156
|
+
{
|
157
|
+
id: "unique-id-c",
|
158
|
+
title: "Gamma section",
|
159
|
+
body: "<h2>Gamma title</h2><p>Lorem ipsum</p>",
|
160
|
+
},
|
161
|
+
],
|
162
|
+
classes: "tna-tabs--demo",
|
163
|
+
},
|
164
|
+
})}
|
165
|
+
${Picture({
|
166
|
+
params: {
|
167
|
+
src: "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
|
168
|
+
alt: "The National Archives office",
|
169
|
+
width: 1996,
|
170
|
+
height: 1331,
|
171
|
+
caption: "<p>This is a pretty image</p>",
|
172
|
+
transcript: "<p>Lorem ipsum transcript</p>",
|
173
|
+
translation: "<p>Lorem ipsum translation</p>",
|
174
|
+
classes: "tna-picture--demo",
|
175
|
+
},
|
176
|
+
})}
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
<article>
|
180
|
+
${Footer({})}
|
181
|
+
</div>
|
182
|
+
</div>`;
|
183
|
+
};
|
184
|
+
|
185
|
+
export const Examples = Template.bind({});
|
186
|
+
// Examples.parameters = { options: { showPanel: false } };
|
187
|
+
Examples.args = {
|
188
|
+
theme: "system",
|
189
|
+
};
|
@@ -31,6 +31,7 @@ In the second example, the heading will be read as two separate sentences; `Reco
|
|
31
31
|
## General typography
|
32
32
|
|
33
33
|
<Canvas of={TypographyStories.Paragraph} />
|
34
|
+
<Canvas of={TypographyStories.Blockquote} />
|
34
35
|
<Canvas of={ListStories.UnorderedList} />
|
35
36
|
<Canvas of={ListStories.UnorderedListPlain} />
|
36
37
|
<Canvas of={ListStories.OrderedList} />
|
@@ -12,3 +12,18 @@ export const Paragraph = ParagraphTemplate.bind({});
|
|
12
12
|
Paragraph.args = {
|
13
13
|
text: "This is some body text",
|
14
14
|
};
|
15
|
+
|
16
|
+
const BlockquoteTemplate = ({
|
17
|
+
html,
|
18
|
+
author,
|
19
|
+
}) => `<blockquote class="tna-blockquote">
|
20
|
+
<div class="tna-blockquote__quote">
|
21
|
+
${html}
|
22
|
+
</div>
|
23
|
+
<p class="tna-blockquote__author">${author}</p>
|
24
|
+
</p>`;
|
25
|
+
export const Blockquote = BlockquoteTemplate.bind({});
|
26
|
+
Blockquote.args = {
|
27
|
+
html: "<p>A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.</p>",
|
28
|
+
author: "Douglas Adams, Mostly Harmless",
|
29
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{# Based on https://github.com/alphagov/govuk-frontend/blob/8b6bf304b9fc891f64459c25a08f3d623f3fea72/packages/govuk-frontend/src/govuk/template.njk #}
|
2
2
|
{#% from "./components/skip-link/macro.njk" import tnaSkipLink -%#}
|
3
3
|
<!DOCTYPE html>
|
4
|
-
<html lang="{{ htmlLang | default('en') }}" class="tna-template
|
4
|
+
<html lang="{{ htmlLang | default('en') }}" class="tna-template {{ htmlClasses }}">
|
5
5
|
<head>
|
6
6
|
<meta charset="utf-8">
|
7
7
|
<title{% if pageTitleLang %} lang="{{ pageTitleLang }}"{% endif %}>{% block pageTitle %}The National Archives{% endblock %}</title>
|
@@ -0,0 +1,129 @@
|
|
1
|
+
@use "sass:map";
|
2
|
+
@use "../features";
|
3
|
+
@use "../variables/colour";
|
4
|
+
|
5
|
+
@mixin colour-css-vars() {
|
6
|
+
@each $name, $value in colour.$colour-palette-default {
|
7
|
+
--#{$name}: #{$value};
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin colour-css-vars-dark() {
|
12
|
+
@each $name, $value in colour.$colour-palette-dark {
|
13
|
+
--#{$name}: #{$value};
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
@mixin colour-css-vars-high-contrast() {
|
18
|
+
@each $name, $value in colour.$colour-palette-high-contrast {
|
19
|
+
--#{$name}: #{$value};
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@mixin colour-css-vars-high-contrast-dark() {
|
24
|
+
@each $name, $value in colour.$colour-palette-high-contrast-dark {
|
25
|
+
--#{$name}: #{$value};
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin colour-font($colour, $inverted: false) {
|
30
|
+
@if $inverted {
|
31
|
+
color: map.get(colour.$colour-palette-dark, $colour);
|
32
|
+
} @else {
|
33
|
+
color: map.get(colour.$colour-palette-default, $colour);
|
34
|
+
}
|
35
|
+
@if features.$support-colour-schemes {
|
36
|
+
color: var(--#{$colour});
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
@mixin colour-background($colour, $inverted: false) {
|
41
|
+
@if $inverted {
|
42
|
+
background-color: map.get(colour.$colour-palette-dark, $colour);
|
43
|
+
} @else {
|
44
|
+
background-color: map.get(colour.$colour-palette-default, $colour);
|
45
|
+
}
|
46
|
+
@if features.$support-colour-schemes {
|
47
|
+
background-color: var(--#{$colour});
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
@mixin colour-border($colour, $inverted: false) {
|
52
|
+
@if $inverted {
|
53
|
+
border-color: map.get(colour.$colour-palette-dark, $colour);
|
54
|
+
} @else {
|
55
|
+
border-color: map.get(colour.$colour-palette-default, $colour);
|
56
|
+
}
|
57
|
+
@if features.$support-colour-schemes {
|
58
|
+
border-color: var(--#{$colour});
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
@mixin colour-outline($colour, $inverted: false) {
|
63
|
+
@if $inverted {
|
64
|
+
outline-color: map.get(colour.$colour-palette-dark, $colour);
|
65
|
+
} @else {
|
66
|
+
outline-color: map.get(colour.$colour-palette-default, $colour);
|
67
|
+
}
|
68
|
+
@if features.$support-colour-schemes {
|
69
|
+
outline-color: var(--#{$colour});
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
@mixin colour-fill($colour, $inverted: false) {
|
74
|
+
@if $inverted {
|
75
|
+
fill: map.get(colour.$colour-palette-dark, $colour);
|
76
|
+
} @else {
|
77
|
+
fill: map.get(colour.$colour-palette-default, $colour);
|
78
|
+
}
|
79
|
+
@if features.$support-colour-schemes {
|
80
|
+
fill: var(--#{$colour});
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@mixin fixed {
|
85
|
+
@include colour-css-vars;
|
86
|
+
|
87
|
+
@include colour-font("font-base");
|
88
|
+
}
|
89
|
+
|
90
|
+
@mixin invert {
|
91
|
+
.tna-template--system-theme & {
|
92
|
+
@include colour-css-vars-dark;
|
93
|
+
|
94
|
+
@media (prefers-color-scheme: dark) {
|
95
|
+
@include colour-css-vars;
|
96
|
+
}
|
97
|
+
|
98
|
+
@media (prefers-contrast: more) {
|
99
|
+
@include colour-css-vars-high-contrast-dark;
|
100
|
+
}
|
101
|
+
|
102
|
+
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
|
103
|
+
@include colour-css-vars-high-contrast;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
.tna-template--light-theme & {
|
108
|
+
@include colour-css-vars-dark;
|
109
|
+
}
|
110
|
+
|
111
|
+
.tna-template--dark-theme & {
|
112
|
+
@include colour-css-vars;
|
113
|
+
}
|
114
|
+
|
115
|
+
.tna-template--high-contrast-theme & {
|
116
|
+
@include colour-css-vars-high-contrast-dark;
|
117
|
+
}
|
118
|
+
|
119
|
+
.tna-template--dark-theme.tna-template--high-contrast-theme & {
|
120
|
+
@include colour-css-vars-high-contrast;
|
121
|
+
}
|
122
|
+
|
123
|
+
@include colour-font("font-base", true);
|
124
|
+
@include colour-background("page-background", true);
|
125
|
+
}
|
126
|
+
|
127
|
+
%tna-invert {
|
128
|
+
@include invert;
|
129
|
+
}
|
@@ -52,7 +52,7 @@
|
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
55
|
-
@for $i from 1 through
|
55
|
+
@for $i from 1 through 3 {
|
56
56
|
&--flex-#{$i}#{$suffix} {
|
57
57
|
width: auto;
|
58
58
|
|
@@ -60,7 +60,7 @@
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
|
63
|
-
@for $i from 1 through
|
63
|
+
@for $i from 1 through 4 {
|
64
64
|
&--order-#{$i}#{$suffix} {
|
65
65
|
order: $i;
|
66
66
|
}
|
@@ -1,17 +1,18 @@
|
|
1
1
|
@use "../variables/media";
|
2
2
|
|
3
|
-
// 0
|
4
|
-
// |
|
5
|
-
//
|
6
|
-
// |
|
7
|
-
// |<------------->|
|
8
|
-
// |<----------------------->|
|
3
|
+
// 0 ======= 320 = 480 ===== 768 == 1024 ========================== min-width/max-width (px)
|
4
|
+
// | . | | |
|
5
|
+
// |-TINY----------|-SMALL---|-MED--|-LARGE------------------------
|
6
|
+
// | . | | |
|
7
|
+
// |<------------->| | | on-tiny
|
8
|
+
// |<----------------------->| | on-mobile
|
9
9
|
// |<------------------------------>| on-smaller-than-large
|
10
|
-
// .
|
11
|
-
// .
|
12
|
-
// .
|
13
|
-
// .
|
14
|
-
// .
|
10
|
+
// | . |<------->| | on-small
|
11
|
+
// | . |<------------------------- on-larger-than-tiny
|
12
|
+
// | . | |<---->| on-medium
|
13
|
+
// | . | |<--------------- on-larger-than-mobile
|
14
|
+
// | . | | |<-------- on-large
|
15
|
+
// |<------->. | | | Smallest device
|
15
16
|
|
16
17
|
@mixin on-large() {
|
17
18
|
@media #{media.$media-large} {
|
@@ -4,3 +4,18 @@
|
|
4
4
|
@mixin relative-font-size($fontSizePx) {
|
5
5
|
font-size: #{math.div($fontSizePx, typography.$base-font-size-px)}rem;
|
6
6
|
}
|
7
|
+
|
8
|
+
@mixin main-font {
|
9
|
+
font-family: typography.$font-family-main;
|
10
|
+
font-weight: typography.$font-weight-main;
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin heading-font {
|
14
|
+
font-family: typography.$font-family-heading;
|
15
|
+
font-weight: typography.$font-weight-heading;
|
16
|
+
}
|
17
|
+
|
18
|
+
@mixin detail-font {
|
19
|
+
font-family: typography.$font-family-detail;
|
20
|
+
font-weight: typography.$font-weight-detail;
|
21
|
+
}
|
@@ -1,6 +1,27 @@
|
|
1
|
-
@use "../
|
1
|
+
@use "../features";
|
2
|
+
@use "../tools/colour";
|
2
3
|
@use "../variables/typography";
|
3
4
|
|
5
|
+
:root {
|
6
|
+
@include colour.colour-css-vars;
|
7
|
+
|
8
|
+
@media (prefers-color-scheme: dark) {
|
9
|
+
@include colour.colour-css-vars-dark;
|
10
|
+
}
|
11
|
+
|
12
|
+
@media (prefers-contrast: more) {
|
13
|
+
@include colour.colour-css-vars-high-contrast;
|
14
|
+
|
15
|
+
* {
|
16
|
+
background-image: none !important;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
|
21
|
+
@include colour.colour-css-vars-high-contrast-dark;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
4
25
|
.tna-template {
|
5
26
|
min-width: 320px;
|
6
27
|
width: 100%;
|
@@ -12,6 +33,72 @@
|
|
12
33
|
|
13
34
|
font-size: #{typography.$base-font-size-px}px;
|
14
35
|
|
36
|
+
@include colour.colour-background("page-background");
|
37
|
+
|
38
|
+
// &--black-accent {
|
39
|
+
// accent-color: colour.$_tna-black;
|
40
|
+
// }
|
41
|
+
|
42
|
+
// &--yellow-accent {
|
43
|
+
// accent-color: colour.$_tna-yellow;
|
44
|
+
// }
|
45
|
+
|
46
|
+
// &--pink-accent {
|
47
|
+
// accent-color: colour.$_tna-pink;
|
48
|
+
// }
|
49
|
+
|
50
|
+
// &--orange-accent {
|
51
|
+
// accent-color: colour.$_tna-orange;
|
52
|
+
// }
|
53
|
+
|
54
|
+
// &--green-accent {
|
55
|
+
// accent-color: colour.$_tna-green;
|
56
|
+
// }
|
57
|
+
|
58
|
+
// &--blue-accent {
|
59
|
+
// accent-color: colour.$_tna-blue;
|
60
|
+
// }
|
61
|
+
|
62
|
+
/* &--system-theme {
|
63
|
+
@include colour.colour-css-vars;
|
64
|
+
|
65
|
+
@media (prefers-color-scheme: dark) {
|
66
|
+
@include colour.colour-css-vars-dark;
|
67
|
+
}
|
68
|
+
|
69
|
+
@media (prefers-contrast: more) {
|
70
|
+
@include colour.colour-css-vars-high-contrast;
|
71
|
+
|
72
|
+
* {
|
73
|
+
background-image: none !important;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
|
78
|
+
@include colour.colour-css-vars-high-contrast-dark;
|
79
|
+
}
|
80
|
+
} */
|
81
|
+
|
82
|
+
&--light-theme {
|
83
|
+
@include colour.colour-css-vars;
|
84
|
+
}
|
85
|
+
|
86
|
+
&--dark-theme {
|
87
|
+
@include colour.colour-css-vars-dark;
|
88
|
+
}
|
89
|
+
|
90
|
+
&--high-contrast-theme {
|
91
|
+
@include colour.colour-css-vars-high-contrast;
|
92
|
+
|
93
|
+
* {
|
94
|
+
background-image: none !important;
|
95
|
+
}
|
96
|
+
|
97
|
+
&.tna-template--dark-theme {
|
98
|
+
@include colour.colour-css-vars-high-contrast-dark;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
15
102
|
@media (prefers-reduced-motion) {
|
16
103
|
* {
|
17
104
|
animation: none !important;
|
@@ -25,7 +112,7 @@
|
|
25
112
|
margin: 0;
|
26
113
|
padding: 0;
|
27
114
|
|
28
|
-
background-
|
115
|
+
// @include colour.colour-background("page-background");
|
29
116
|
|
30
117
|
overflow: auto;
|
31
118
|
}
|
@@ -49,6 +136,36 @@ canvas {
|
|
49
136
|
}
|
50
137
|
|
51
138
|
*:focus {
|
52
|
-
outline: 0.3125rem colour.$focus-colour solid;
|
139
|
+
// outline: 0.3125rem colour.$focus-colour solid;
|
140
|
+
outline: 0.3125rem solid;
|
141
|
+
@include colour.colour-outline("focus-outline");
|
53
142
|
outline-offset: 0.125rem;
|
54
143
|
}
|
144
|
+
|
145
|
+
hr {
|
146
|
+
margin: 1rem;
|
147
|
+
|
148
|
+
border-width: 1px 0 0;
|
149
|
+
@include colour.colour-border("keyline");
|
150
|
+
border-style: solid;
|
151
|
+
}
|
152
|
+
|
153
|
+
.tna-visually-hidden {
|
154
|
+
width: 1px !important;
|
155
|
+
height: 1px !important;
|
156
|
+
margin: 0 !important;
|
157
|
+
padding: 0 !important;
|
158
|
+
|
159
|
+
position: absolute !important;
|
160
|
+
top: -9999px !important;
|
161
|
+
left: -9999px !important;
|
162
|
+
z-index: -1 !important;
|
163
|
+
|
164
|
+
overflow: hidden !important;
|
165
|
+
|
166
|
+
clip: rect(0, 0, 0, 0) !important;
|
167
|
+
|
168
|
+
border: 0 !important;
|
169
|
+
|
170
|
+
background-color: transparent !important;
|
171
|
+
}
|