@nationalarchives/frontend 0.1.59 → 0.1.61
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 +1 -1
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/analytics.js +1 -1
- package/nationalarchives/analytics.js.map +1 -1
- package/nationalarchives/analytics.mjs +1 -1
- package/nationalarchives/components/_index.scss +1 -0
- package/nationalarchives/components/accordion/accordion.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +4 -4
- package/nationalarchives/components/button/macro-options.json +1 -1
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +8 -8
- package/nationalarchives/components/card/macro-options.json +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
- package/nationalarchives/components/checkboxes/macro-options.json +8 -8
- package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
- package/nationalarchives/components/compound-filters/compound-filters.scss +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.scss +1 -1
- package/nationalarchives/components/cookie-banner/macro-options.json +1 -1
- package/nationalarchives/components/date-input/date-input.css +1 -1
- package/nationalarchives/components/date-input/date-input.css.map +1 -1
- package/nationalarchives/components/date-input/date-input.scss +1 -1
- package/nationalarchives/components/date-input/macro-options.json +9 -9
- package/nationalarchives/components/date-search/date-search.css +1 -1
- package/nationalarchives/components/date-search/date-search.css.map +1 -1
- package/nationalarchives/components/date-search/macro-options.json +7 -7
- package/nationalarchives/components/details/details.css.map +1 -1
- package/nationalarchives/components/error-summary/error-summary.css +1 -1
- package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/featured-records/featured-records.scss +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +5 -5
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.css.map +1 -1
- package/nationalarchives/components/global-header/global-header.scss +5 -5
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +4 -4
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +1 -1
- package/nationalarchives/components/index-grid/fixtures.json +1 -1
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/index-grid.scss +1 -1
- package/nationalarchives/components/index-grid/template.njk +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.scss +1 -1
- package/nationalarchives/components/picture/macro-options.json +2 -2
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.scss +2 -2
- package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
- package/nationalarchives/components/radios/macro-options.json +9 -9
- package/nationalarchives/components/radios/radios.css +1 -1
- package/nationalarchives/components/radios/radios.css.map +1 -1
- package/nationalarchives/components/search-field/macro-options.json +6 -6
- package/nationalarchives/components/search-field/search-field.css +1 -1
- package/nationalarchives/components/search-field/search-field.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.css.map +1 -1
- package/nationalarchives/components/search-filters/search-filters.scss +2 -2
- package/nationalarchives/components/select/macro-options.json +10 -10
- package/nationalarchives/components/select/select.css +1 -1
- package/nationalarchives/components/select/select.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.scss +13 -5
- package/nationalarchives/components/sidebar/_index.scss +1 -0
- package/nationalarchives/components/sidebar/fixtures.json +208 -0
- package/nationalarchives/components/sidebar/macro-options.json +84 -0
- package/nationalarchives/components/sidebar/macro.njk +3 -0
- package/nationalarchives/components/sidebar/sidebar.css +1 -0
- package/nationalarchives/components/sidebar/sidebar.css.map +1 -0
- package/nationalarchives/components/sidebar/sidebar.scss +132 -0
- package/nationalarchives/components/sidebar/sidebar.stories.js +224 -0
- package/nationalarchives/components/sidebar/template.njk +33 -0
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.scss +1 -1
- package/nationalarchives/components/text-input/macro-options.json +10 -10
- package/nationalarchives/components/text-input/text-input.css +1 -1
- package/nationalarchives/components/text-input/text-input.css.map +1 -1
- package/nationalarchives/components/textarea/macro-options.json +8 -8
- package/nationalarchives/components/textarea/textarea.css +1 -1
- package/nationalarchives/components/textarea/textarea.css.map +1 -1
- package/nationalarchives/components/warning/fixtures.json +20 -0
- package/nationalarchives/components/warning/macro-options.json +1 -1
- package/nationalarchives/components/warning/warning.css.map +1 -1
- package/nationalarchives/components/warning/warning.scss +2 -2
- package/nationalarchives/global-header-package.css +1 -1
- package/nationalarchives/global-header-package.css.map +1 -1
- package/nationalarchives/global-header-package.scss +12 -12
- package/nationalarchives/prototype-kit.css +1 -1
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/tools/_colour.scss +1 -3
- package/nationalarchives/tools/_typography.scss +13 -8
- package/nationalarchives/utilities/_forms.scss +1 -1
- package/nationalarchives/utilities/_tables.scss +1 -1
- package/nationalarchives/utilities/_typography.scss +9 -13
- package/nationalarchives/variables/_a11y.scss +1 -0
- package/nationalarchives/variables/_colour.scss +1 -1
- package/package.json +12 -12
@@ -1,7 +1,10 @@
|
|
1
|
+
@use "../../tools/colour";
|
1
2
|
@use "../../tools/spacing";
|
2
3
|
@use "../../tools/typography";
|
3
4
|
|
4
5
|
.tna-sensitive-image {
|
6
|
+
$button-border-width: 4px !default;
|
7
|
+
|
5
8
|
&__warning {
|
6
9
|
}
|
7
10
|
|
@@ -45,18 +48,23 @@
|
|
45
48
|
&::after {
|
46
49
|
content: attr(data-action);
|
47
50
|
|
48
|
-
padding: spacing.space(0.
|
51
|
+
padding: spacing.space(0.25) spacing.space(1);
|
52
|
+
|
53
|
+
@include colour.colour-font("button-text");
|
54
|
+
@include typography.font-size(18);
|
55
|
+
@include typography.main-font-weight-bold;
|
49
56
|
|
50
|
-
background-
|
57
|
+
@include colour.colour-background("button-background");
|
51
58
|
|
52
|
-
@include
|
59
|
+
@include colour.colour-border("button-background", $button-border-width);
|
53
60
|
}
|
54
61
|
|
55
62
|
&:hover {
|
56
63
|
&::after {
|
57
|
-
|
64
|
+
text-decoration: none;
|
65
|
+
@include colour.colour-font("font-dark");
|
58
66
|
|
59
|
-
background
|
67
|
+
@include colour.colour-background("background");
|
60
68
|
}
|
61
69
|
}
|
62
70
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@use "sidebar";
|
@@ -0,0 +1,208 @@
|
|
1
|
+
{
|
2
|
+
"component": "sidebar",
|
3
|
+
"fixtures": [
|
4
|
+
{
|
5
|
+
"name": "contents",
|
6
|
+
"options": {
|
7
|
+
"heading": "Heading",
|
8
|
+
"headingLevel": 2,
|
9
|
+
"items": [
|
10
|
+
{
|
11
|
+
"text": "Alpha",
|
12
|
+
"href": "#"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"text": "Beta",
|
16
|
+
"href": "#",
|
17
|
+
"current": true
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"text": "Gamma",
|
21
|
+
"children": [
|
22
|
+
{
|
23
|
+
"text": "Alpha",
|
24
|
+
"href": "#"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"text": "Beta",
|
28
|
+
"href": "#"
|
29
|
+
}
|
30
|
+
]
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"type": "contents"
|
34
|
+
},
|
35
|
+
"html": "<nav class=\"tna-sidebar tna-sidebar--contents\" aria-label=\"Sidebar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a><ul class=\"tna-sidebar__item-children\"><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li></ul></li></ul></nav>"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"name": "sections",
|
39
|
+
"options": {
|
40
|
+
"heading": "Heading",
|
41
|
+
"headingLevel": 2,
|
42
|
+
"items": [
|
43
|
+
{
|
44
|
+
"text": "Alpha",
|
45
|
+
"href": "#"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"text": "Beta",
|
49
|
+
"href": "#",
|
50
|
+
"current": true
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"text": "Gamma",
|
54
|
+
"children": [
|
55
|
+
{
|
56
|
+
"text": "Alpha",
|
57
|
+
"href": "#"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"text": "Beta",
|
61
|
+
"href": "#"
|
62
|
+
}
|
63
|
+
]
|
64
|
+
}
|
65
|
+
],
|
66
|
+
"type": "sections"
|
67
|
+
},
|
68
|
+
"html": "<nav class=\"tna-sidebar tna-sidebar--sections\" aria-label=\"Sidebar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a></li></ul></nav>"
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"name": "pages",
|
72
|
+
"options": {
|
73
|
+
"heading": "Heading",
|
74
|
+
"headingLevel": 2,
|
75
|
+
"items": [
|
76
|
+
{
|
77
|
+
"text": "Alpha",
|
78
|
+
"href": "#"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"text": "Beta",
|
82
|
+
"href": "#",
|
83
|
+
"current": true
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"text": "Gamma",
|
87
|
+
"children": [
|
88
|
+
{
|
89
|
+
"text": "Alpha",
|
90
|
+
"href": "#"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"text": "Beta",
|
94
|
+
"href": "#"
|
95
|
+
}
|
96
|
+
]
|
97
|
+
}
|
98
|
+
],
|
99
|
+
"type": "pages"
|
100
|
+
},
|
101
|
+
"html": "<nav class=\"tna-sidebar tna-sidebar--pages\" aria-label=\"Sidebar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a><ul class=\"tna-sidebar__item-children\"><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li></ul></li></ul></nav>"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"name": "sticky",
|
105
|
+
"options": {
|
106
|
+
"heading": "Heading",
|
107
|
+
"headingLevel": 2,
|
108
|
+
"items": [
|
109
|
+
{
|
110
|
+
"text": "Alpha",
|
111
|
+
"href": "#"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"text": "Beta",
|
115
|
+
"href": "#",
|
116
|
+
"current": true
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"text": "Gamma",
|
120
|
+
"children": [
|
121
|
+
{
|
122
|
+
"text": "Alpha",
|
123
|
+
"href": "#"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"text": "Beta",
|
127
|
+
"href": "#"
|
128
|
+
}
|
129
|
+
]
|
130
|
+
}
|
131
|
+
],
|
132
|
+
"type": "sections",
|
133
|
+
"sticky": true
|
134
|
+
},
|
135
|
+
"html": "<nav class=\"tna-sidebar tna-sidebar--sections tna-sidebar--sticky\" aria-label=\"Sidebar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a></li></ul></nav>"
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"name": "with classes",
|
139
|
+
"options": {
|
140
|
+
"heading": "Heading",
|
141
|
+
"headingLevel": 2,
|
142
|
+
"items": [
|
143
|
+
{
|
144
|
+
"text": "Alpha",
|
145
|
+
"href": "#"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"text": "Beta",
|
149
|
+
"href": "#",
|
150
|
+
"current": true
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"text": "Gamma",
|
154
|
+
"children": [
|
155
|
+
{
|
156
|
+
"text": "Alpha",
|
157
|
+
"href": "#"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"text": "Beta",
|
161
|
+
"href": "#"
|
162
|
+
}
|
163
|
+
]
|
164
|
+
}
|
165
|
+
],
|
166
|
+
"type": "contents",
|
167
|
+
"classes": "sidebar__test-class"
|
168
|
+
},
|
169
|
+
"html": "<nav class=\"tna-sidebar sidebar__test-class tna-sidebar--contents\" aria-label=\"Sidebar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a><ul class=\"tna-sidebar__item-children\"><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li></ul></li></ul></nav>"
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"name": "with attributes",
|
173
|
+
"options": {
|
174
|
+
"heading": "Heading",
|
175
|
+
"headingLevel": 2,
|
176
|
+
"items": [
|
177
|
+
{
|
178
|
+
"text": "Alpha",
|
179
|
+
"href": "#"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"text": "Beta",
|
183
|
+
"href": "#",
|
184
|
+
"current": true
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"text": "Gamma",
|
188
|
+
"children": [
|
189
|
+
{
|
190
|
+
"text": "Alpha",
|
191
|
+
"href": "#"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"text": "Beta",
|
195
|
+
"href": "#"
|
196
|
+
}
|
197
|
+
]
|
198
|
+
}
|
199
|
+
],
|
200
|
+
"type": "contents",
|
201
|
+
"attributes": {
|
202
|
+
"data-testattribute": "foobar"
|
203
|
+
}
|
204
|
+
},
|
205
|
+
"html": "<nav class=\"tna-sidebar tna-sidebar--contents\" aria-label=\"Sidebar\" data-testattribute=\"foobar\"><h2 class=\"tna-sidebar__heading tna-heading-m\">Heading</h2><ul class=\"tna-sidebar__items\"><li class=\"tna-sidebar__item\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item tna-sidebar__item--current\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li><li class=\"tna-sidebar__item\"><a href=\"\" class=\"tna-sidebar__link\">Gamma</a><ul class=\"tna-sidebar__item-children\"><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Alpha</a></li><li class=\"tna-sidebar__item-child\"><a href=\"#\" class=\"tna-sidebar__link\">Beta</a></li></ul></li></ul></nav>"
|
206
|
+
}
|
207
|
+
]
|
208
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"name": "heading",
|
4
|
+
"type": "string",
|
5
|
+
"required": true,
|
6
|
+
"description": ""
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"name": "headingLevel",
|
10
|
+
"type": "number",
|
11
|
+
"required": true,
|
12
|
+
"description": ""
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"name": "items",
|
16
|
+
"type": "array",
|
17
|
+
"required": true,
|
18
|
+
"description": "",
|
19
|
+
"params": [
|
20
|
+
{
|
21
|
+
"name": "text",
|
22
|
+
"type": "string",
|
23
|
+
"required": true,
|
24
|
+
"description": ""
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"name": "href",
|
28
|
+
"type": "string",
|
29
|
+
"required": true,
|
30
|
+
"description": ""
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "current",
|
34
|
+
"type": "boolean",
|
35
|
+
"required": false,
|
36
|
+
"description": ""
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"name": "children",
|
40
|
+
"type": "array",
|
41
|
+
"required": false,
|
42
|
+
"description": "",
|
43
|
+
"params": [
|
44
|
+
{
|
45
|
+
"name": "text",
|
46
|
+
"type": "string",
|
47
|
+
"required": true,
|
48
|
+
"description": ""
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"name": "href",
|
52
|
+
"type": "string",
|
53
|
+
"required": true,
|
54
|
+
"description": ""
|
55
|
+
}
|
56
|
+
]
|
57
|
+
}
|
58
|
+
]
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "type",
|
62
|
+
"type": "string",
|
63
|
+
"required": true,
|
64
|
+
"description": "The type of sidebar style to use. Can be `contents`, `sections` or `pages`."
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"name": "sticky",
|
68
|
+
"type": "boolean",
|
69
|
+
"required": false,
|
70
|
+
"description": ""
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "classes",
|
74
|
+
"type": "string",
|
75
|
+
"required": false,
|
76
|
+
"description": "Classes to add to the sidebar."
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"name": "attributes",
|
80
|
+
"type": "object",
|
81
|
+
"required": false,
|
82
|
+
"description": "HTML attributes (for example data attributes) to add to the sidebar."
|
83
|
+
}
|
84
|
+
]
|
@@ -0,0 +1 @@
|
|
1
|
+
.tna-sidebar--sections .tna-sidebar__item--current .tna-sidebar__link{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);--accent-list-marker: var(--accent-font-base);--accent-border: var(--accent-font-dark);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-sidebar{width:100%;font-size:1rem}.tna-sidebar__items{padding-top:max(8px,7px)}.tna-sidebar__items,.tna-sidebar__item-children{display:flex;flex-direction:column;gap:4px;list-style:none}.tna-sidebar--contents .tna-sidebar__item-children{margin-top:4px;padding-left:32px;border-left:5px var(--keyline, rgb(38 38 42/0.25)) solid}.tna-sidebar--sections .tna-sidebar__link{padding:2px 8px;display:block}.tna-sidebar--pages .tna-sidebar__item--current{padding-left:12px;border-left:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-sidebar--pages .tna-sidebar__item--current>.tna-sidebar__link{font-weight:700}.tna-sidebar--pages .tna-sidebar__item-children{gap:0}.tna-sidebar--contents .tna-sidebar__items,.tna-sidebar--pages .tna-sidebar__item-children{padding-left:24px}.tna-sidebar--contents .tna-sidebar__item,.tna-sidebar--contents .tna-sidebar__item-child,.tna-sidebar--pages .tna-sidebar__item-child{list-style:"— " outside}.tna-sidebar--contents .tna-sidebar__item::marker,.tna-sidebar--contents .tna-sidebar__item-child::marker,.tna-sidebar--pages .tna-sidebar__item-child::marker{color:var(--font-light, rgb(1 1 1/0.58))}.tna-sidebar--sticky{max-height:100vh;max-height:100dvh;display:flex;flex-direction:column;box-sizing:border-box;position:sticky;top:0}.tna-sidebar--sticky .tna-sidebar__items{width:100%;margin:0;padding:7px;box-sizing:content-box;overflow-y:auto;position:relative;left:-7px;flex:1}/*# sourceMappingURL=sidebar.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/components/sidebar/sidebar.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/variables/_a11y.scss"],"names":[],"mappings":"CAkOA,sEACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,mCACA,iCACA,2CACA,8CACA,yCAvLA,4CAJA,gCC5CF,aACE,WCDA,eDKA,oBACE,yBAMF,gDAEE,aACA,sBACA,QAEA,gBAiBF,mDACE,eACA,kBD2BE,yDCjBJ,0CACE,gBAEA,cAYF,gDACE,kBDCE,+DCIJ,mECnDA,YCYsB,IF2CtB,gDACE,MAQF,2FAEE,kBAGF,uIAGE,yBAEA,+JD/CF,yCCyDA,qBACE,iBACA,kBAEA,aACA,sBACA,sBAEA,gBACA,MAGF,yCACE,WACA,SACA,QGxHoB,IH0HpB,uBACA,gBAEA,kBACA,UACA","file":"sidebar.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\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@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-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 border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction) {\n @include colour-border(\n \"keyline\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-dark($direction) {\n @include colour-border(\n \"keyline-dark\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-accent($direction) {\n @include colour-border(\n \"accent-border\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-error($direction) {\n @include colour-border(\n \"form-error\",\n borders.$thick-border-width,\n solid,\n $direction\n );\n}\n\n@mixin thick-keyline-brand($direction, $brandColour) {\n border-#{$direction}: borders.$thick-border-width #{brand-colour($brandColour)}\n solid;\n}\n\n// Use light theme colours (except for \"form-error\")\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\n@mixin light {\n @extend %light;\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 --accent-list-marker: var(--accent-border);\n // --accent-list-marker: var(--font-base);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\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 --accent-list-marker: var(--accent-border);\n // --accent-list-marker: var(--font-base);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin tint {\n @extend %tint;\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 --accent-list-marker: var(--accent-font-base);\n --accent-border: var(--accent-font-dark);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\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 --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 --accent-border: var(--font-base);\n --accent-list-marker: var(--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 @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n// Remove accent and contrast values (except for \"form-error\")\n%plain {\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--system-theme & {\n @media (prefers-color-scheme: dark) {\n @include colour-css-vars-dark(\"form-error\");\n }\n\n @media (prefers-contrast: more) and (prefers-color-scheme: dark) {\n @include colour-css-vars-high-contrast-dark(\"form-error\");\n }\n }\n\n .tna-template--dark-theme & {\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\n @include colour-background(\"background\");\n}\n\n@mixin plain {\n @extend %plain;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"brown\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"white\")} !important;\n --button-accent-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.45)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accent-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"grey\")} !important;\n --button-accent-text: #{colour.brand-colour(\"black\")} !important;\n --button-accent-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"pink\")} !important;\n --button-accent-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"orange\")} !important;\n --button-accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"green\")} !important;\n --button-accent-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --accent-list-marker: #{colour.brand-colour(\"blue\")} !important;\n --button-accent-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\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 \"../../variables/a11y\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-sidebar {\n width: 100%;\n\n @include typography.font-size(16);\n\n &__items {\n padding-top: max(spacing.space(0.5), #{a11y.$focus-outline-padding});\n }\n\n &__item {\n }\n\n &__items,\n &__item-children {\n display: flex;\n flex-direction: column;\n gap: spacing.space(0.25);\n\n list-style: none;\n }\n\n &__item-children {\n }\n\n &__item-child {\n }\n\n &__link {\n }\n\n /*\n * ------------------------------------------\n * Contents\n * ------------------------------------------\n */\n &--contents &__item-children {\n margin-top: spacing.space(0.25);\n padding-left: spacing.space(2);\n\n @include colour.thick-keyline(\"left\");\n }\n\n /*\n * ------------------------------------------\n * Sections\n * ------------------------------------------\n */\n &--sections &__link {\n padding: spacing.space(0.125) spacing.space(0.5);\n\n display: block;\n }\n\n &--sections &__item--current &__link {\n @include colour.accent;\n }\n\n /*\n * ------------------------------------------\n * Pages\n * ------------------------------------------\n */\n &--pages &__item--current {\n padding-left: spacing.space(0.75);\n\n @include colour.thick-keyline-accent(\"left\");\n }\n\n &--pages &__item--current > &__link {\n @include typography.main-font-weight-bold;\n }\n\n &--pages &__item-children {\n gap: 0;\n }\n\n /*\n * ------------------------------------------\n * Dashed items\n * ------------------------------------------\n */\n &--contents &__items,\n &--pages &__item-children {\n padding-left: spacing.space(1.5);\n }\n\n &--contents &__item,\n &--contents &__item-child,\n &--pages &__item-child {\n list-style: \"— \" outside;\n\n &::marker {\n @include colour.colour-font(\"font-light\");\n }\n }\n\n /*\n * ------------------------------------------\n * Sticky\n * ------------------------------------------\n */\n &--sticky {\n max-height: 100vh;\n max-height: 100dvh;\n\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n\n position: sticky;\n top: 0;\n }\n\n &--sticky &__items {\n width: 100%;\n margin: 0;\n padding: a11y.$focus-outline-padding;\n\n box-sizing: content-box;\n overflow-y: auto;\n\n position: relative;\n left: -#{a11y.$focus-outline-padding};\n flex: 1;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\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 font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\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 font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactive-text-decoration-thickness: 3.5px !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 30 !default;\n$heading-l-font-size-small: 28 !default;\n$heading-l-font-size-tiny: 25 !default;\n$heading-l-line-height: 1.3 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: 21 !default;\n$heading-m-font-size-small: 20 !default;\n$heading-m-font-size-tiny: 19 !default;\n$heading-m-line-height: 1.6 !default;\n\n$heading-s-font-size-default: 18 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.6 !default;\n","$focus-outline-width: 5px !default;\n$focus-outline-offset: 2px !default;\n$focus-outline-padding: $focus-outline-width + $focus-outline-offset;\n"]}
|
@@ -0,0 +1,132 @@
|
|
1
|
+
@use "../../variables/a11y";
|
2
|
+
@use "../../tools/colour";
|
3
|
+
@use "../../tools/media";
|
4
|
+
@use "../../tools/spacing";
|
5
|
+
@use "../../tools/typography";
|
6
|
+
|
7
|
+
.tna-sidebar {
|
8
|
+
width: 100%;
|
9
|
+
|
10
|
+
@include typography.font-size(16);
|
11
|
+
|
12
|
+
&__items {
|
13
|
+
padding-top: max(spacing.space(0.5), #{a11y.$focus-outline-padding});
|
14
|
+
}
|
15
|
+
|
16
|
+
&__item {
|
17
|
+
}
|
18
|
+
|
19
|
+
&__items,
|
20
|
+
&__item-children {
|
21
|
+
display: flex;
|
22
|
+
flex-direction: column;
|
23
|
+
gap: spacing.space(0.25);
|
24
|
+
|
25
|
+
list-style: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
&__item-children {
|
29
|
+
}
|
30
|
+
|
31
|
+
&__item-child {
|
32
|
+
}
|
33
|
+
|
34
|
+
&__link {
|
35
|
+
}
|
36
|
+
|
37
|
+
/*
|
38
|
+
* ------------------------------------------
|
39
|
+
* Contents
|
40
|
+
* ------------------------------------------
|
41
|
+
*/
|
42
|
+
&--contents &__item-children {
|
43
|
+
margin-top: spacing.space(0.25);
|
44
|
+
padding-left: spacing.space(2);
|
45
|
+
|
46
|
+
@include colour.thick-keyline("left");
|
47
|
+
}
|
48
|
+
|
49
|
+
/*
|
50
|
+
* ------------------------------------------
|
51
|
+
* Sections
|
52
|
+
* ------------------------------------------
|
53
|
+
*/
|
54
|
+
&--sections &__link {
|
55
|
+
padding: spacing.space(0.125) spacing.space(0.5);
|
56
|
+
|
57
|
+
display: block;
|
58
|
+
}
|
59
|
+
|
60
|
+
&--sections &__item--current &__link {
|
61
|
+
@include colour.accent;
|
62
|
+
}
|
63
|
+
|
64
|
+
/*
|
65
|
+
* ------------------------------------------
|
66
|
+
* Pages
|
67
|
+
* ------------------------------------------
|
68
|
+
*/
|
69
|
+
&--pages &__item--current {
|
70
|
+
padding-left: spacing.space(0.75);
|
71
|
+
|
72
|
+
@include colour.thick-keyline-accent("left");
|
73
|
+
}
|
74
|
+
|
75
|
+
&--pages &__item--current > &__link {
|
76
|
+
@include typography.main-font-weight-bold;
|
77
|
+
}
|
78
|
+
|
79
|
+
&--pages &__item-children {
|
80
|
+
gap: 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
/*
|
84
|
+
* ------------------------------------------
|
85
|
+
* Dashed items
|
86
|
+
* ------------------------------------------
|
87
|
+
*/
|
88
|
+
&--contents &__items,
|
89
|
+
&--pages &__item-children {
|
90
|
+
padding-left: spacing.space(1.5);
|
91
|
+
}
|
92
|
+
|
93
|
+
&--contents &__item,
|
94
|
+
&--contents &__item-child,
|
95
|
+
&--pages &__item-child {
|
96
|
+
list-style: "— " outside;
|
97
|
+
|
98
|
+
&::marker {
|
99
|
+
@include colour.colour-font("font-light");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
/*
|
104
|
+
* ------------------------------------------
|
105
|
+
* Sticky
|
106
|
+
* ------------------------------------------
|
107
|
+
*/
|
108
|
+
&--sticky {
|
109
|
+
max-height: 100vh;
|
110
|
+
max-height: 100dvh;
|
111
|
+
|
112
|
+
display: flex;
|
113
|
+
flex-direction: column;
|
114
|
+
box-sizing: border-box;
|
115
|
+
|
116
|
+
position: sticky;
|
117
|
+
top: 0;
|
118
|
+
}
|
119
|
+
|
120
|
+
&--sticky &__items {
|
121
|
+
width: 100%;
|
122
|
+
margin: 0;
|
123
|
+
padding: a11y.$focus-outline-padding;
|
124
|
+
|
125
|
+
box-sizing: content-box;
|
126
|
+
overflow-y: auto;
|
127
|
+
|
128
|
+
position: relative;
|
129
|
+
left: -#{a11y.$focus-outline-padding};
|
130
|
+
flex: 1;
|
131
|
+
}
|
132
|
+
}
|