@nationalarchives/frontend 0.38.0 → 0.40.0

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.
Files changed (95) hide show
  1. package/nationalarchives/all+analytics.js +2 -1
  2. package/nationalarchives/all+analytics.js.LICENSE.txt +1 -0
  3. package/nationalarchives/all+analytics.js.map +1 -1
  4. package/nationalarchives/all.css +1 -1
  5. package/nationalarchives/all.css.map +1 -1
  6. package/nationalarchives/all.js +2 -1
  7. package/nationalarchives/all.js.LICENSE.txt +1 -0
  8. package/nationalarchives/all.js.map +1 -1
  9. package/nationalarchives/all.mjs +17 -2
  10. package/nationalarchives/assets/images/icon-1024x1024-dark.png +0 -0
  11. package/nationalarchives/assets/images/icon-1024x1024.png +0 -0
  12. package/nationalarchives/assets/images/icon-120x120-dark.png +0 -0
  13. package/nationalarchives/assets/images/icon-120x120.png +0 -0
  14. package/nationalarchives/assets/images/icon-144x144-dark.png +0 -0
  15. package/nationalarchives/assets/images/icon-144x144.png +0 -0
  16. package/nationalarchives/assets/images/icon-152x152-dark.png +0 -0
  17. package/nationalarchives/assets/images/icon-152x152.png +0 -0
  18. package/nationalarchives/assets/images/icon-167x167-dark.png +0 -0
  19. package/nationalarchives/assets/images/icon-167x167.png +0 -0
  20. package/nationalarchives/assets/images/icon-180x180-dark.png +0 -0
  21. package/nationalarchives/assets/images/icon-180x180.png +0 -0
  22. package/nationalarchives/assets/images/icon-192x192-dark.png +0 -0
  23. package/nationalarchives/assets/images/icon-192x192.png +0 -0
  24. package/nationalarchives/assets/images/icon-256x256-dark.png +0 -0
  25. package/nationalarchives/assets/images/icon-256x256.png +0 -0
  26. package/nationalarchives/assets/images/icon-48x48-dark.png +0 -0
  27. package/nationalarchives/assets/images/icon-48x48.png +0 -0
  28. package/nationalarchives/assets/images/icon-512x512-dark.png +0 -0
  29. package/nationalarchives/assets/images/icon-512x512.png +0 -0
  30. package/nationalarchives/assets/images/icon-72x72-dark.png +0 -0
  31. package/nationalarchives/assets/images/icon-72x72.png +0 -0
  32. package/nationalarchives/assets/images/icon-96x96-dark.png +0 -0
  33. package/nationalarchives/assets/images/icon-96x96.png +0 -0
  34. package/nationalarchives/assets/images/tna-square-logo-dark.svg +8 -0
  35. package/nationalarchives/assets/images/tna-square-logo-light.svg +8 -0
  36. package/nationalarchives/assets/images/tna-square-logo.svg +3 -3
  37. package/nationalarchives/code-block.css +1 -0
  38. package/nationalarchives/code-block.css.map +1 -0
  39. package/nationalarchives/code-block.scss +257 -0
  40. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  41. package/nationalarchives/components/accordion/accordion.js +1 -1
  42. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  43. package/nationalarchives/components/accordion/accordion.mjs +1 -1
  44. package/nationalarchives/components/back-link/back-link.css.map +1 -1
  45. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  46. package/nationalarchives/components/button/button.css.map +1 -1
  47. package/nationalarchives/components/card/card.css.map +1 -1
  48. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  49. package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
  50. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  51. package/nationalarchives/components/compound-filters/compound-filters.scss +3 -6
  52. package/nationalarchives/components/details/details.css.map +1 -1
  53. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  54. package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
  55. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  56. package/nationalarchives/components/files-list/files-list.css.map +1 -1
  57. package/nationalarchives/components/footer/fixtures.json +8 -8
  58. package/nationalarchives/components/footer/footer.css.map +1 -1
  59. package/nationalarchives/components/footer/template.njk +4 -4
  60. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  61. package/nationalarchives/components/global-header/fixtures.json +11 -11
  62. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  63. package/nationalarchives/components/global-header/template.njk +1 -1
  64. package/nationalarchives/components/header/fixtures.json +4 -4
  65. package/nationalarchives/components/header/header.css.map +1 -1
  66. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  67. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  68. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  69. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  70. package/nationalarchives/components/radios/radios.css.map +1 -1
  71. package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
  72. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  73. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  74. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  75. package/nationalarchives/components/warning/warning.css.map +1 -1
  76. package/nationalarchives/email.css +1 -1
  77. package/nationalarchives/email.css.map +1 -1
  78. package/nationalarchives/error-page.css +1 -1
  79. package/nationalarchives/error-page.css.map +1 -1
  80. package/nationalarchives/ie.css.map +1 -1
  81. package/nationalarchives/lib/helpers.mjs +59 -0
  82. package/nationalarchives/prototype-kit.css +1 -1
  83. package/nationalarchives/prototype-kit.css.map +1 -1
  84. package/nationalarchives/templates/fixtures.json +10 -10
  85. package/nationalarchives/templates/layouts/email.njk +4 -2
  86. package/nationalarchives/templates/partials/logo/template.njk +1 -1
  87. package/nationalarchives/tools/_a11y.scss +10 -0
  88. package/nationalarchives/utilities/lists/_index.scss +17 -11
  89. package/nationalarchives/utilities/tables/_index.scss +2 -4
  90. package/nationalarchives/utilities/typography/_index.scss +34 -0
  91. package/nationalarchives/variables/_typography.scss +2 -0
  92. package/package.json +2 -1
  93. package/nationalarchives/components/cookie-banner/README.md +0 -87
  94. package/nationalarchives/components/global-header/README.md +0 -52
  95. package/nationalarchives/lib/tables.mjs +0 -27
@@ -14,8 +14,11 @@ import { Tabs } from "./components/tabs/tabs.mjs";
14
14
  import { TextInputPassword } from "./components/text-input/text-input.mjs";
15
15
  import { TextAreaItemisedRows } from "./components/textarea/textarea.mjs";
16
16
  import Cookies from "./lib/cookies.mjs";
17
- import { checkTableForScroll } from "./lib/tables.mjs";
18
- import { updateTimeElement } from "./lib/helpers.mjs";
17
+ import {
18
+ updateTimeElement,
19
+ initCodeBlock,
20
+ checkTableForScroll,
21
+ } from "./lib/helpers.mjs";
19
22
 
20
23
  const initAll = (options) => {
21
24
  options = typeof options !== "undefined" ? options : {};
@@ -61,6 +64,18 @@ const initAll = (options) => {
61
64
  );
62
65
  });
63
66
 
67
+ /*
68
+ * ==========================================
69
+ * Add "Copy code" buttons to all code blocks
70
+ * and enable copying the code to clipboard
71
+ * ==========================================
72
+ */
73
+ document
74
+ .querySelectorAll(".tna-code-block:has(pre > code)")
75
+ .forEach(($codeBlock) => {
76
+ initCodeBlock($codeBlock);
77
+ });
78
+
64
79
  // TODO: Remove this opt-in class in a later release
65
80
  if ($html.classList.contains("tna-template--enhance-time-elements")) {
66
81
  document.querySelectorAll("time[datetime]").forEach(updateTimeElement);
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <g fill="#fff">
5
+ <path d="M1.9 1.9V52.7H79.05V1.9H1.9Zm79.05 0V52.7H158.1V1.9H80.95ZM1.9 54.6v50.8H158.1V54.6H1.9Zm0 52.7v50.8H158.1V107.3H1.9M0 0H160V160H0V0Z" />
6
+ <path d="M21.3 19.5h-5.4v-3h14.3v3h-5.4v18.4h-3.5zM31.6 16.5H35v9h8.4v-9h3.4v21.4h-3.4v-9.3H35v9.3h-3.4zM50.9 16.5h12.2v3h-8.8v6.1h7.4v3h-7.4v6.3h8.8v3H50.9zM19.7 69.2h3.8l6.4 12.5c.6 1.1 1.1 2.7 1.6 4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d">
3
+ <svg xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
+ <g fill="#010101">
5
+ <path d="M1.9 1.9V52.7H79.05V1.9H1.9Zm79.05 0V52.7H158.1V1.9H80.95ZM1.9 54.6v50.8H158.1V54.6H1.9Zm0 52.7v50.8H158.1V107.3H1.9M0 0H160V160H0V0Z" />
6
+ <path d="M21.3 19.5h-5.4v-3h14.3v3h-5.4v18.4h-3.5zM31.6 16.5H35v9h8.4v-9h3.4v21.4h-3.4v-9.3H35v9.3h-3.4zM50.9 16.5h12.2v3h-8.8v6.1h7.4v3h-7.4v6.3h8.8v3H50.9zM19.7 69.2h3.8l6.4 12.5c.6 1.1 1.1 2.7 1.6 4h.2c-.2-1.7-.3-3.6-.3-4.8V69.2h3.5v21.4h-3.7l-6.3-12.3c-.7-1.4-1.2-2.7-1.7-4.2H23c.2 1.4.3 3.3.3 5v11.5h-3.5c-.1 0-.1-21.4-.1-21.4zM47.8 82.6l-1.7-6.3c-.3-1.1-.6-2.2-.9-3.8H45c-.3 1.6-.5 2.6-.8 3.8l-1.7 6.3h5.3zM43 69.2h4.2l6.2 21.4h-3.5l-1.5-5.2h-6.6l-1.4 5.2h-3.6L43 69.2zM57.2 72.3h-5.4v-3.1H66v3.1h-5.4v18.4h-3.4zM67.8 69.2h3.5v21.4h-3.5zM87.5 80c0-5.3-1.7-8-4.8-8-3.2 0-4.8 2.7-4.8 8 0 5.2 1.6 7.9 4.8 7.9 3.2 0 4.8-2.7 4.8-7.9m-13.3 0c0-7 3-11.1 8.5-11.1 5.4 0 8.4 4.1 8.4 11.1 0 6.9-3 11-8.4 11s-8.5-4.1-8.5-11M94.3 69.2H98l6.4 12.5c.6 1.1 1.2 2.7 1.7 4h.2c-.2-1.7-.3-3.6-.3-4.8V69.2h3.4v21.4h-3.7l-6.3-12.3c-.7-1.4-1.2-2.7-1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.2 3.3-2.9 0-1.6-.7-2.4-2.2-3l-3.4-1.3c-2.4-.9-4.2-2.4-4.2-5.7 0-3.5 2.3-6.1 6.6-6.1 5.5 0 6.4 3.6 6.4 5.9 0 .3 0 .7-.1 1.1l-3.4.1c0-.2.1-.5.1-.7 0-1.7-.6-3.2-3-3.2-2.1 0-3 1.2-3 2.8 0 1.7.9 2.5 2.2 2.9l3.5 1.3c2.6 1 4.3 2.6 4.3 5.8 0 3.6-2.4 6.1-7 6.1-5.9 0-6.8-3.9-6.8-6.5 0-.3 0-.6.1-1l3.3-.1z" />
7
+ </g>
8
+ </svg>
@@ -1,9 +1,9 @@
1
1
  <?xml version="1.0" standalone="no"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
3
  <svg xml:space="preserve" class="tna-logo" style="enable-background:new 0 0 160 160" viewBox="0 0 160 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4
- <path fill="#fff" d="M0 0h160v160H0z" class="tna-logo__background" />
5
- <g class="tna-logo__foreground" fill="010101">
6
- <path d="M1.9 107.2h156.3V158H1.9v-50.8zm0-52.7h156.3v50.8H1.9V54.5zm0-52.6h77.2v50.8H1.9V1.9zm79 0h77.2v50.8H80.9V1.9zm0-1.9H0v160h160V0H80.9z" />
4
+ <path fill="#fff" d="M0 0h160v160H0z" />
5
+ <g fill="#010101">
6
+ <path d="M1.9 1.9V52.7H79.05V1.9H1.9Zm79.05 0V52.7H158.1V1.9H80.95ZM1.9 54.6v50.8H158.1V54.6H1.9Zm0 52.7v50.8H158.1V107.3H1.9M0 0H160V160H0V0Z" />
7
7
  <path d="M21.3 19.5h-5.4v-3h14.3v3h-5.4v18.4h-3.5zM31.6 16.5H35v9h8.4v-9h3.4v21.4h-3.4v-9.3H35v9.3h-3.4zM50.9 16.5h12.2v3h-8.8v6.1h7.4v3h-7.4v6.3h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background-tint);background-color:var(--background, #f4f4f4)}pre[class*=language-]:focus:not(:focus-visible){outline:none !important;box-shadow:none !important}.tna-code-block{margin-top:2rem}.tna-code-block:first-child{margin-top:0}code[class*=language-],pre[class*=language-]{color:#393a34;text-align:left;direction:ltr;word-break:normal;white-space:pre;word-spacing:normal;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;-moz-tab-size:4;-o-tab-size:4;tab-size:4}pre[class*=language-]{overflow:auto;background-color:#f5f2f0}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:#6e6e5e}.token.namespace{opacity:.7}.token.string,.token.attr-value{color:#be0e5a}.token.punctuation,.token.operator{color:#393a34}.token.entity,.token.url,.token.symbol,.token.number,.token.boolean,.token.variable,.token.constant,.token.property,.token.regex,.token.inserted{color:#247a78}.token.atrule,.token.keyword,.token.attr-name{color:#00759d}.token.tag,.token.selector{color:#00009f}.token.function,.token.deleted{color:#9a050f}.token.important,.token.function,.token.bold{font-weight:bold}.token.italic{font-style:italic}.tna-template--dark-theme code[class*=language-],.tna-template--dark-theme pre[class*=language-]{color:#f8f8f2}.tna-template--dark-theme pre[class*=language-]{background:#2b2b2b}.tna-template--dark-theme .token.comment,.tna-template--dark-theme .token.prolog,.tna-template--dark-theme .token.doctype,.tna-template--dark-theme .token.cdata{color:#d4d0ab}.tna-template--dark-theme .token.punctuation{color:#fefefe}.tna-template--dark-theme .token.property,.tna-template--dark-theme .token.tag,.tna-template--dark-theme .token.constant,.tna-template--dark-theme .token.symbol,.tna-template--dark-theme .token.deleted{color:#ffa07a}.tna-template--dark-theme .token.boolean,.tna-template--dark-theme .token.number{color:#00e0e0}.tna-template--dark-theme .token.selector,.tna-template--dark-theme .token.attr-name,.tna-template--dark-theme .token.string,.tna-template--dark-theme .token.char,.tna-template--dark-theme .token.builtin,.tna-template--dark-theme .token.inserted{color:#abe338}.tna-template--dark-theme .token.operator,.tna-template--dark-theme .token.entity,.tna-template--dark-theme .token.url,.tna-template--dark-theme .language-css .token.string,.tna-template--dark-theme .style .token.string,.tna-template--dark-theme .token.variable{color:#00e0e0}.tna-template--dark-theme .token.atrule,.tna-template--dark-theme .token.attr-value,.tna-template--dark-theme .token.function{color:gold}.tna-template--dark-theme .token.keyword{color:#00e0e0}.tna-template--dark-theme .token.regex,.tna-template--dark-theme .token.important{color:gold}@media(prefers-color-scheme: dark){.tna-template--system-theme code[class*=language-],.tna-template--system-theme pre[class*=language-]{color:#f8f8f2}.tna-template--system-theme pre[class*=language-]{background:#2b2b2b}.tna-template--system-theme .token.comment,.tna-template--system-theme .token.prolog,.tna-template--system-theme .token.doctype,.tna-template--system-theme .token.cdata{color:#d4d0ab}.tna-template--system-theme .token.punctuation{color:#fefefe}.tna-template--system-theme .token.property,.tna-template--system-theme .token.tag,.tna-template--system-theme .token.constant,.tna-template--system-theme .token.symbol,.tna-template--system-theme .token.deleted{color:#ffa07a}.tna-template--system-theme .token.boolean,.tna-template--system-theme .token.number{color:#00e0e0}.tna-template--system-theme .token.selector,.tna-template--system-theme .token.attr-name,.tna-template--system-theme .token.string,.tna-template--system-theme .token.char,.tna-template--system-theme .token.builtin,.tna-template--system-theme .token.inserted{color:#abe338}.tna-template--system-theme .token.operator,.tna-template--system-theme .token.entity,.tna-template--system-theme .token.url,.tna-template--system-theme .language-css .token.string,.tna-template--system-theme .style .token.string,.tna-template--system-theme .token.variable{color:#00e0e0}.tna-template--system-theme .token.atrule,.tna-template--system-theme .token.attr-value,.tna-template--system-theme .token.function{color:gold}.tna-template--system-theme .token.keyword{color:#00e0e0}.tna-template--system-theme .token.regex,.tna-template--system-theme .token.important{color:gold}}.tna-code-block{position:relative;font-size:1rem;line-height:1.5;border:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid;border-radius:2px}.tna-code-block__pre{padding:1rem;overflow:auto;position:relative;border-radius:.1px}.tna-code-block__pre code[class*=language-]{background:rgba(0,0,0,0);border:none}.tna-code-block:has(.tna-code-block__copy),.tna-code-block[title]{padding-top:2rem}.tna-code-block:has(.tna-code-block__copy)::after,.tna-code-block[title]::after{content:"";height:2rem;position:absolute;top:0;right:0;left:0;z-index:1}@media(forced-colors: active){.tna-code-block:has(.tna-code-block__copy)::after,.tna-code-block[title]::after{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}@media(prefers-contrast: more){.tna-code-block:has(.tna-code-block__copy)::after,.tna-code-block[title]::after{border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}}.tna-code-block[title]::before{content:attr(title);margin-top:0;padding:0 7rem 0 1rem;display:block;overflow:hidden;position:absolute;top:0;right:0;left:0;z-index:2;font-family:Consolas,Monaco,"Ubuntu Mono",monospace;line-height:2rem;text-overflow:ellipsis;text-wrap:nowrap;pointer-events:none}.tna-code-block__copy{position:absolute;top:0;right:0;z-index:3}/*# sourceMappingURL=code-block.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../../src/nationalarchives/tools/_colour.scss","../../src/nationalarchives/tools/_a11y.scss","../../src/nationalarchives/tools/_spacing.scss","../../src/nationalarchives/code-block.scss","../../src/nationalarchives/tools/_typography.scss","../../src/nationalarchives/tools/_borders.scss","../../src/nationalarchives/variables/_borders.scss","../../src/nationalarchives/variables/_typography.scss"],"names":[],"mappings":"AAiUA,gFACE,qCAtOA,4CC4CA,gDA9EA,wBAEA,2BClCF,gBACE,gBAUA,4BACE,aC7BJ,6CAEE,cACA,gBACA,cACA,kBACA,gBACA,oBAEA,qBACA,kBACA,iBACA,aAEA,gBACA,cACA,WAGF,sBACE,cAEA,yBAKF,yDAIE,cAGF,iBACE,WAGF,gCAEE,cAGF,mCAEE,cAGF,iJAUE,cAGF,8CAGE,cAGF,2BAEE,cAGF,+BAEE,cAGF,6CAGE,iBAGF,cACE,kBAIA,iGAEE,cAGF,gDACE,mBAGF,iKAIE,cAGF,6CACE,cAGF,0MAKE,cAGF,iFAEE,cAGF,sPAME,cAGF,sQAME,cAGF,8HAGE,WAGF,yCACE,cAGF,kFAEE,WASF,mCAxEA,qGAEE,cAGF,kDACE,mBAGF,yKAIE,cAGF,+CACE,cAGF,oNAKE,cAGF,qFAEE,cAGF,kQAME,cAGF,kRAME,cAGF,oIAGE,WAGF,2CACE,cAGF,sFAEE,YAcJ,gBAGE,kBC3KA,eD8KA,gBH5DI,wDKrHJ,cCDsB,IHuLtB,qBACE,aAEA,cAEA,kBAEA,mBAEA,4CACE,yBAEA,YAIJ,kEAEE,YApMwB,KAsMxB,gFACE,WAEA,OAzMsB,KA2MtB,kBACA,MACA,QACA,OACA,UHiUJ,8BG1UE,gFH/FE,gEAmaJ,+BGpUE,gFH/FE,gEGmHF,+BACE,oBAEA,aAEA,sBAEA,cACA,gBAEA,kBACA,MACA,QACA,OACA,UAEA,YI1Ia,wCJ2Ib,YA3OsB,KA4OtB,uBACA,iBAEA,oBAIJ,sBACE,kBACA,MACA,QACA","file":"code-block.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n@use \"../variables/borders\";\n@use \"../variables/forms\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\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 @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\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 @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\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 @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\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 @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\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(sass($important): !important; else: null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour)\n if(sass($important): !important; else: null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if(sass($important): !important; else: 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(sass($important): !important; else: null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if(sass($important): !important; else: null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n outline-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if(sass($important): !important; else: null);\n}\n\n%colour-input {\n @include colour-font(\"input-foreground\");\n @include colour-background(\"input-background\");\n @include colour-border(\"input-border\", forms.$form-field-border-width);\n}\n\n@mixin colour-input() {\n @extend %colour-input;\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n // @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n @include colour-css-vars;\n\n @media (prefers-contrast: more) {\n // @include colour-css-vars-high-contrast(\n // \"form-error-border\",\n // \"focus-outline\"\n // );\n @include colour-css-vars-high-contrast;\n }\n}\n\n@mixin always-light {\n @extend %always-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-border: var(--accent-border-bright);\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-border: var(--accent-border-bright);\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%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\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-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\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(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"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 --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-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\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 --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-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\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-border-bright: #{colour.brand-colour(\"yellow\")} !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.7)} !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-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"yellow\")} !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.7)} !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-accented-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-border-bright: #{colour.brand-colour(\"grey\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-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(\"maroon\")} !important;\n --accent-border-bright: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-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(\"chestnut\")} !important;\n --accent-border-bright: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-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(\"forest\")} !important;\n --accent-border-bright: #{colour.brand-colour(\"green\")} !important;\n --button-accented-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(\"navy\")} !important;\n --accent-border-bright: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-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\n%image-loader-background {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n\n @media (prefers-reduced-motion) {\n animation: none !important;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n @extend %image-loader-background;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n@use \"borders\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n}\n\n%focus-outline {\n outline: a11y.$focus-outline-outer-width colour.brand-colour(\"black\") solid !important;\n outline-offset: a11y.$focus-outline-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition:\n outline-offset 0.1s,\n box-shadow 0.1s;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin focus-outline {\n @extend %focus-outline;\n}\n\n@mixin no-focus-outline {\n outline: none !important;\n\n box-shadow: none !important;\n}\n\n%active-outline {\n outline: a11y.$focus-outline-active-outer-width colour.brand-colour(\"black\")\n solid !important;\n outline-offset: a11y.$focus-outline-active-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition: none;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin active-outline {\n @extend %active-outline;\n}\n\n%faux-full-outline {\n position: relative;\n}\n\n%faux-full-outline-anchor {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 9;\n\n @include borders.rounded-border;\n }\n\n &:focus,\n &:active {\n @include no-focus-outline;\n }\n\n &:focus {\n &::before {\n @include focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include active-outline;\n }\n }\n}\n\n@mixin faux-full-outline($anchor_selector) {\n @extend %faux-full-outline;\n\n #{$anchor_selector} {\n @extend %faux-full-outline-anchor;\n }\n}\n\n%focus-indicator-only-on-keyboard-focus {\n &:focus:not(:focus-visible) {\n @include no-focus-outline;\n }\n}\n\n@mixin focus-indicator-only-on-keyboard-focus {\n @extend %focus-indicator-only-on-keyboard-focus;\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"variables/typography\" as typographyVars;\n@use \"tools/a11y\";\n@use \"tools/borders\";\n@use \"tools/colour\";\n@use \"tools/spacing\";\n@use \"tools/typography\";\n\n$code-block-top-bar-height: spacing.space(2);\n\ncode[class*=\"language-\"],\npre[class*=\"language-\"] {\n color: #393a34;\n text-align: left;\n direction: ltr;\n word-break: normal;\n white-space: pre;\n word-spacing: normal;\n\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n}\n\npre[class*=\"language-\"] {\n overflow: auto;\n\n background-color: #f5f2f0;\n\n @include a11y.focus-indicator-only-on-keyboard-focus;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n color: #6e6e5e;\n}\n\n.token.namespace {\n opacity: 0.7;\n}\n\n.token.string,\n.token.attr-value {\n color: #be0e5a;\n}\n\n.token.punctuation,\n.token.operator {\n color: #393a34; /* no highlight */\n}\n\n.token.entity,\n.token.url,\n.token.symbol,\n.token.number,\n.token.boolean,\n.token.variable,\n.token.constant,\n.token.property,\n.token.regex,\n.token.inserted {\n color: #247a78;\n}\n\n.token.atrule,\n.token.keyword,\n.token.attr-name {\n color: #00759d;\n}\n\n.token.tag,\n.token.selector {\n color: #00009f;\n}\n\n.token.function,\n.token.deleted {\n color: #9a050f;\n}\n\n.token.important,\n.token.function,\n.token.bold {\n font-weight: bold;\n}\n\n.token.italic {\n font-style: italic;\n}\n\n@mixin dark-theme-code {\n code[class*=\"language-\"],\n pre[class*=\"language-\"] {\n color: #f8f8f2;\n }\n\n pre[class*=\"language-\"] {\n background: #2b2b2b;\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata {\n color: #d4d0ab;\n }\n\n .token.punctuation {\n color: #fefefe;\n }\n\n .token.property,\n .token.tag,\n .token.constant,\n .token.symbol,\n .token.deleted {\n color: #ffa07a;\n }\n\n .token.boolean,\n .token.number {\n color: #00e0e0;\n }\n\n .token.selector,\n .token.attr-name,\n .token.string,\n .token.char,\n .token.builtin,\n .token.inserted {\n color: #abe338;\n }\n\n .token.operator,\n .token.entity,\n .token.url,\n .language-css .token.string,\n .style .token.string,\n .token.variable {\n color: #00e0e0;\n }\n\n .token.atrule,\n .token.attr-value,\n .token.function {\n color: #ffd700;\n }\n\n .token.keyword {\n color: #00e0e0;\n }\n\n .token.regex,\n .token.important {\n color: #ffd700;\n }\n}\n\n.tna-template--dark-theme {\n @include dark-theme-code;\n}\n\n.tna-template--system-theme {\n @media (prefers-color-scheme: dark) {\n @include dark-theme-code;\n }\n}\n\n.tna-code-block {\n @include spacing.space-above;\n\n position: relative;\n\n @include typography.font-size(16);\n line-height: 1.5;\n\n @include colour.colour-border(\"keyline\", 1px);\n @include borders.rounded-border;\n\n &__pre {\n padding: spacing.space(1);\n\n overflow: auto;\n\n position: relative;\n\n border-radius: 0.1px;\n\n code[class*=\"language-\"] {\n background: transparent;\n\n border: none;\n }\n }\n\n &:has(&__copy),\n &[title] {\n padding-top: $code-block-top-bar-height;\n\n &::after {\n content: \"\";\n\n height: $code-block-top-bar-height;\n\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n z-index: 1;\n\n @include colour.tint;\n\n @include colour.on-high-contrast-and-forced-colours {\n @include colour.colour-border(\"keyline\", 1px, solid, bottom);\n }\n }\n }\n\n &[title] {\n &::before {\n content: attr(title);\n\n margin-top: 0;\n\n padding: 0 spacing.space(7) 0 spacing.space(1);\n\n display: block;\n overflow: hidden;\n\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n font-family: typographyVars.$code-font-family;\n line-height: $code-block-top-bar-height;\n text-overflow: ellipsis;\n text-wrap: nowrap;\n\n pointer-events: none;\n }\n }\n\n &__copy {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 3;\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 interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\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","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 2px !default;\n","@use \"sass:math\";\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: 19 !default;\n$body-font-size-px-medium: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !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: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !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.5 !default;\n\n$code-font-family: Consolas, Monaco, \"Ubuntu Mono\", monospace !default;\n"]}
@@ -0,0 +1,257 @@
1
+ @use "variables/typography" as typographyVars;
2
+ @use "tools/a11y";
3
+ @use "tools/borders";
4
+ @use "tools/colour";
5
+ @use "tools/spacing";
6
+ @use "tools/typography";
7
+
8
+ $code-block-top-bar-height: spacing.space(2);
9
+
10
+ code[class*="language-"],
11
+ pre[class*="language-"] {
12
+ color: #393a34;
13
+ text-align: left;
14
+ direction: ltr;
15
+ word-break: normal;
16
+ white-space: pre;
17
+ word-spacing: normal;
18
+
19
+ -webkit-hyphens: none;
20
+ -moz-hyphens: none;
21
+ -ms-hyphens: none;
22
+ hyphens: none;
23
+
24
+ -moz-tab-size: 4;
25
+ -o-tab-size: 4;
26
+ tab-size: 4;
27
+ }
28
+
29
+ pre[class*="language-"] {
30
+ overflow: auto;
31
+
32
+ background-color: #f5f2f0;
33
+
34
+ @include a11y.focus-indicator-only-on-keyboard-focus;
35
+ }
36
+
37
+ .token.comment,
38
+ .token.prolog,
39
+ .token.doctype,
40
+ .token.cdata {
41
+ color: #6e6e5e;
42
+ }
43
+
44
+ .token.namespace {
45
+ opacity: 0.7;
46
+ }
47
+
48
+ .token.string,
49
+ .token.attr-value {
50
+ color: #be0e5a;
51
+ }
52
+
53
+ .token.punctuation,
54
+ .token.operator {
55
+ color: #393a34; /* no highlight */
56
+ }
57
+
58
+ .token.entity,
59
+ .token.url,
60
+ .token.symbol,
61
+ .token.number,
62
+ .token.boolean,
63
+ .token.variable,
64
+ .token.constant,
65
+ .token.property,
66
+ .token.regex,
67
+ .token.inserted {
68
+ color: #247a78;
69
+ }
70
+
71
+ .token.atrule,
72
+ .token.keyword,
73
+ .token.attr-name {
74
+ color: #00759d;
75
+ }
76
+
77
+ .token.tag,
78
+ .token.selector {
79
+ color: #00009f;
80
+ }
81
+
82
+ .token.function,
83
+ .token.deleted {
84
+ color: #9a050f;
85
+ }
86
+
87
+ .token.important,
88
+ .token.function,
89
+ .token.bold {
90
+ font-weight: bold;
91
+ }
92
+
93
+ .token.italic {
94
+ font-style: italic;
95
+ }
96
+
97
+ @mixin dark-theme-code {
98
+ code[class*="language-"],
99
+ pre[class*="language-"] {
100
+ color: #f8f8f2;
101
+ }
102
+
103
+ pre[class*="language-"] {
104
+ background: #2b2b2b;
105
+ }
106
+
107
+ .token.comment,
108
+ .token.prolog,
109
+ .token.doctype,
110
+ .token.cdata {
111
+ color: #d4d0ab;
112
+ }
113
+
114
+ .token.punctuation {
115
+ color: #fefefe;
116
+ }
117
+
118
+ .token.property,
119
+ .token.tag,
120
+ .token.constant,
121
+ .token.symbol,
122
+ .token.deleted {
123
+ color: #ffa07a;
124
+ }
125
+
126
+ .token.boolean,
127
+ .token.number {
128
+ color: #00e0e0;
129
+ }
130
+
131
+ .token.selector,
132
+ .token.attr-name,
133
+ .token.string,
134
+ .token.char,
135
+ .token.builtin,
136
+ .token.inserted {
137
+ color: #abe338;
138
+ }
139
+
140
+ .token.operator,
141
+ .token.entity,
142
+ .token.url,
143
+ .language-css .token.string,
144
+ .style .token.string,
145
+ .token.variable {
146
+ color: #00e0e0;
147
+ }
148
+
149
+ .token.atrule,
150
+ .token.attr-value,
151
+ .token.function {
152
+ color: #ffd700;
153
+ }
154
+
155
+ .token.keyword {
156
+ color: #00e0e0;
157
+ }
158
+
159
+ .token.regex,
160
+ .token.important {
161
+ color: #ffd700;
162
+ }
163
+ }
164
+
165
+ .tna-template--dark-theme {
166
+ @include dark-theme-code;
167
+ }
168
+
169
+ .tna-template--system-theme {
170
+ @media (prefers-color-scheme: dark) {
171
+ @include dark-theme-code;
172
+ }
173
+ }
174
+
175
+ .tna-code-block {
176
+ @include spacing.space-above;
177
+
178
+ position: relative;
179
+
180
+ @include typography.font-size(16);
181
+ line-height: 1.5;
182
+
183
+ @include colour.colour-border("keyline", 1px);
184
+ @include borders.rounded-border;
185
+
186
+ &__pre {
187
+ padding: spacing.space(1);
188
+
189
+ overflow: auto;
190
+
191
+ position: relative;
192
+
193
+ border-radius: 0.1px;
194
+
195
+ code[class*="language-"] {
196
+ background: transparent;
197
+
198
+ border: none;
199
+ }
200
+ }
201
+
202
+ &:has(&__copy),
203
+ &[title] {
204
+ padding-top: $code-block-top-bar-height;
205
+
206
+ &::after {
207
+ content: "";
208
+
209
+ height: $code-block-top-bar-height;
210
+
211
+ position: absolute;
212
+ top: 0;
213
+ right: 0;
214
+ left: 0;
215
+ z-index: 1;
216
+
217
+ @include colour.tint;
218
+
219
+ @include colour.on-high-contrast-and-forced-colours {
220
+ @include colour.colour-border("keyline", 1px, solid, bottom);
221
+ }
222
+ }
223
+ }
224
+
225
+ &[title] {
226
+ &::before {
227
+ content: attr(title);
228
+
229
+ margin-top: 0;
230
+
231
+ padding: 0 spacing.space(7) 0 spacing.space(1);
232
+
233
+ display: block;
234
+ overflow: hidden;
235
+
236
+ position: absolute;
237
+ top: 0;
238
+ right: 0;
239
+ left: 0;
240
+ z-index: 2;
241
+
242
+ font-family: typographyVars.$code-font-family;
243
+ line-height: $code-block-top-bar-height;
244
+ text-overflow: ellipsis;
245
+ text-wrap: nowrap;
246
+
247
+ pointer-events: none;
248
+ }
249
+ }
250
+
251
+ &__copy {
252
+ position: absolute;
253
+ top: 0;
254
+ right: 0;
255
+ z-index: 3;
256
+ }
257
+ }