@defra/docusaurus-theme-govuk 0.0.18-alpha → 0.0.19-alpha
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/package.json +1 -1
- package/src/css/components.scss +34 -6
- package/src/css/prose-scope.scss +15 -0
- package/src/css/theme.scss +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra/docusaurus-theme-govuk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19-alpha",
|
|
4
4
|
"description": "A Docusaurus theme implementing the GOV.UK Design System for consistent, accessible documentation sites",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
package/src/css/components.scss
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
overflow: auto !important;
|
|
27
27
|
margin-left: -16px;
|
|
28
28
|
padding-left: 16px;
|
|
29
|
+
margin-top: govuk-spacing(1) * -1;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -153,19 +154,25 @@
|
|
|
153
154
|
border-bottom: 1px solid #cecece;
|
|
154
155
|
|
|
155
156
|
position: relative;
|
|
156
|
-
padding-top:
|
|
157
|
-
padding-bottom:
|
|
158
|
-
margin-bottom:
|
|
159
|
-
|
|
157
|
+
padding-top: govuk-spacing(2);
|
|
158
|
+
padding-bottom: govuk-spacing(2);
|
|
159
|
+
margin-bottom: 0;
|
|
160
|
+
|
|
161
|
+
font-size: 1.1875rem;
|
|
160
162
|
padding-left: 0;
|
|
161
163
|
margin-left: 0;
|
|
162
|
-
|
|
164
|
+
|
|
163
165
|
@media (min-width: 48.125em) {
|
|
166
|
+
font-size: 1rem;
|
|
167
|
+
padding-top: govuk-spacing(1);
|
|
168
|
+
padding-bottom: govuk-spacing(1);
|
|
169
|
+
margin-bottom: govuk-spacing(1);
|
|
164
170
|
border-bottom: 0;
|
|
165
171
|
|
|
166
172
|
&:after {
|
|
167
173
|
border-bottom: 0;
|
|
168
174
|
}
|
|
175
|
+
|
|
169
176
|
}
|
|
170
177
|
|
|
171
178
|
.not-govuk-navigation-menu__list__link {
|
|
@@ -192,7 +199,7 @@
|
|
|
192
199
|
|
|
193
200
|
.not-govuk-navigation-menu__list__item {
|
|
194
201
|
padding: 5px 0;
|
|
195
|
-
margin-bottom:
|
|
202
|
+
margin-bottom: 0;
|
|
196
203
|
border-left-width: 0px;
|
|
197
204
|
border-left-style: solid;
|
|
198
205
|
}
|
|
@@ -299,6 +306,27 @@
|
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
308
|
|
|
309
|
+
// Lock service navigation to 1.1875rem on all devices, including mobile where
|
|
310
|
+
// govuk-font(19) would otherwise drop to 1rem. Parent selector raises
|
|
311
|
+
// specificity to (0,2,0) to beat the govuk-frontend mobile breakpoint rule.
|
|
312
|
+
.govuk-service-navigation .govuk-service-navigation__list,
|
|
313
|
+
.govuk-service-navigation .govuk-service-navigation__toggle,
|
|
314
|
+
.govuk-service-navigation .govuk-service-navigation__service-name {
|
|
315
|
+
font-size: 1.1875rem;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Sidebar nav links and headings: 1.1875rem on mobile, 1rem on larger devices.
|
|
319
|
+
// Two-class specificity (0,2,0) beats the not-govuk `aside a` rule at (0,1,1).
|
|
320
|
+
.app-layout-sidebar__nav .not-govuk-navigation-menu__list__link,
|
|
321
|
+
.app-layout-sidebar__nav .not-govuk-navigation-menu__list__heading,
|
|
322
|
+
.app-layout-sidebar__nav .not-govuk-navigation-menu__list__heading-toggle {
|
|
323
|
+
font-size: 1.1875rem;
|
|
324
|
+
|
|
325
|
+
@media (min-width: 48.125em) {
|
|
326
|
+
font-size: 1rem;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
302
330
|
// Pagination
|
|
303
331
|
.app-pagination__container {
|
|
304
332
|
display: flex;
|
package/src/css/prose-scope.scss
CHANGED
|
@@ -110,6 +110,21 @@
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
// Override GDS Transport on all prose elements. This must come after the
|
|
114
|
+
// @extend rules above (which bake in "GDS Transport" from govuk-frontend) so
|
|
115
|
+
// that cascade order wins at equal specificity. app-no-prose content is
|
|
116
|
+
// excluded so host apps can render GDS Transport there if licensed.
|
|
117
|
+
h1:not(.app-no-prose *),
|
|
118
|
+
h2:not(.app-no-prose *),
|
|
119
|
+
h3:not(.app-no-prose *),
|
|
120
|
+
h4:not(.app-no-prose *),
|
|
121
|
+
p:not(.app-no-prose *),
|
|
122
|
+
li:not(.app-no-prose *),
|
|
123
|
+
a:not(.app-no-prose *) {
|
|
124
|
+
font-family: Helvetica, Arial, sans-serif;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
113
128
|
// Code block copy button
|
|
114
129
|
.app-code-block__copy {
|
|
115
130
|
font-size: 0.9rem;
|
package/src/css/theme.scss
CHANGED
|
@@ -23,6 +23,14 @@ body,
|
|
|
23
23
|
font-family: Helvetica, Arial, sans-serif;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Restore GDS Transport inside .app-no-prose containers (e.g. map examples in
|
|
27
|
+
// host apps that load the font separately and need the real GDS type stack).
|
|
28
|
+
.app-no-prose,
|
|
29
|
+
.app-no-prose [class^="govuk-"],
|
|
30
|
+
.app-no-prose [class*=" govuk-"] {
|
|
31
|
+
font-family: "GDS Transport", arial, sans-serif;
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
/* Wider page width — overrides the 960px default from govuk-frontend.
|
|
27
35
|
* !important is needed because @not-govuk/width-container injects its CSS
|
|
28
36
|
* via the JS bundle, which loads after static stylesheets and wins the cascade.
|