@defra/docusaurus-theme-govuk 0.0.21-alpha → 0.0.22-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/README.md CHANGED
@@ -2,9 +2,13 @@
2
2
 
3
3
  A Docusaurus 3 theme that applies the [GOV.UK Design System](https://design-system.service.gov.uk/) to your documentation site.
4
4
 
5
+ ## Intended use
6
+
7
+ This theme is intended for **developer documentation sites**, not public-facing government services. Certain GOV.UK assets are intentionally omitted or substituted for licensing reasons — for example, the crown logo is not included and GDS Transport is not bundled. See [Making your service look like GOV.UK](https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk#if-your-service-isnt-on-govuk) for the relevant guidance.
8
+
5
9
  ## Features
6
10
 
7
- - Full GOV.UK Design System shell: Header (with crown crest), Service Navigation, Phase Banner, Footer
11
+ - Full GOV.UK Design System shell: Header, Service Navigation, Phase Banner, Footer
8
12
  - GOV.UK typography applied to all Markdown/MDX content via prose scoping
9
13
  - Sidebar navigation driven by configuration (not Docusaurus's built-in sidebar UI)
10
14
  - Syntax-highlighted code blocks with copy button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/docusaurus-theme-govuk",
3
- "version": "0.0.21-alpha",
3
+ "version": "0.0.22-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",
@@ -110,19 +110,6 @@
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
113
 
127
114
 
128
115
  // Code block copy button
@@ -11,16 +11,24 @@
11
11
  @import 'govuk-frontend/dist/govuk/objects/grid';
12
12
 
13
13
  /*
14
- * Set the default font on the body so that ALL elements
15
- * (header, footer, service-nav, etc.) inherit the same stack.
16
- * The prose-scope only covers content inside .app-prose-scope;
17
- * without this, outer chrome inherits the browser default serif.
18
- * GDS Transport is not bundled Helvetica/Arial is used instead.
14
+ * Font: Helvetica/Arial (not GDS Transport).
15
+ *
16
+ * GDS Transport is Crown Copyright and may only be used on gov.uk domains.
17
+ * This theme is designed for use on non-gov.uk domains (e.g. GitHub Pages),
18
+ * so Helvetica/Arial is used throughout as a visually similar alternative.
19
+ *
20
+ * !important is required for two reasons:
21
+ * 1. @not-govuk injects its own CSS via the JS bundle after static
22
+ * stylesheets load, which would otherwise win the cascade.
23
+ * 2. govuk-frontend mixins (e.g. govuk-font) bake GDS Transport directly
24
+ * into compiled output; !important ensures those are always overridden.
19
25
  */
20
26
  body,
27
+ h1, h2, h3, h4, h5, h6,
28
+ p, li, a, span:not(pre *):not(code *), label, legend, dt, dd, caption, summary,
21
29
  [class^="govuk-"],
22
30
  [class*=" govuk-"] {
23
- font-family: Helvetica, Arial, sans-serif;
31
+ font-family: Helvetica, Arial, sans-serif !important;
24
32
  }
25
33
 
26
34
  // Restore GDS Transport inside .app-no-prose containers (e.g. map examples in