govuk_tech_docs 3.4.5 → 4.0.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 (327) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yaml +8 -4
  3. data/.github/workflows/test.yaml +11 -4
  4. data/.rubocop.yml +1 -1
  5. data/CHANGELOG.md +22 -1
  6. data/example/.ruby-version +1 -1
  7. data/example/source/javascripts/govuk_frontend.js +1 -0
  8. data/govuk_tech_docs.gemspec +17 -11
  9. data/lib/assets/javascripts/_modules/page-expiry.js +2 -2
  10. data/lib/assets/javascripts/_modules/table-of-contents.js +48 -2
  11. data/lib/assets/javascripts/govuk_frontend_all.js +3 -0
  12. data/lib/assets/javascripts/govuk_tech_docs.js +0 -2
  13. data/lib/assets/stylesheets/_govuk_tech_docs.scss +4 -10
  14. data/lib/assets/stylesheets/modules/_page-review.scss +0 -2
  15. data/lib/assets/stylesheets/modules/_search.scss +0 -4
  16. data/lib/govuk_tech_docs/meta_tags.rb +1 -1
  17. data/lib/govuk_tech_docs/redirects.rb +1 -1
  18. data/lib/govuk_tech_docs/table_of_contents/heading_tree_builder.rb +1 -1
  19. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +2 -2
  20. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +6 -2
  21. data/lib/govuk_tech_docs/version.rb +1 -1
  22. data/lib/govuk_tech_docs.rb +20 -3
  23. data/lib/source/layouts/_header.erb +8 -12
  24. data/lib/source/layouts/_page_review.erb +1 -1
  25. data/lib/source/layouts/_search.erb +2 -2
  26. data/lib/source/layouts/core.erb +8 -2
  27. data/lib/source/stylesheets/manifest.css +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/_base.scss +5 -0
  29. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +2554 -0
  30. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +2529 -0
  31. data/node_modules/govuk-frontend/dist/govuk/all.mjs +18 -0
  32. data/node_modules/govuk-frontend/dist/govuk/all.scss +3 -0
  33. data/node_modules/govuk-frontend/dist/govuk/assets/images/favicon.svg +1 -0
  34. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-crest.svg +1 -0
  35. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-180.png +0 -0
  36. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-192.png +0 -0
  37. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-512.png +0 -0
  38. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-icon-mask.svg +1 -0
  39. data/node_modules/govuk-frontend/dist/govuk/assets/images/govuk-opengraph-image.png +0 -0
  40. data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs +7 -0
  41. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +4 -0
  42. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs +159 -0
  43. data/node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs +18 -0
  44. data/node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs +31 -0
  45. data/node_modules/govuk-frontend/dist/govuk/components/_all.scss +10 -0
  46. data/node_modules/govuk-frontend/{govuk/components/_all.scss → dist/govuk/components/_index.scss} +8 -3
  47. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_accordion.scss +4 -0
  48. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/accordion/_index.scss +55 -77
  49. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +785 -0
  50. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +777 -0
  51. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +349 -0
  52. data/node_modules/govuk-frontend/dist/govuk/components/back-link/_back-link.scss +4 -0
  53. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/back-link/_index.scss +12 -36
  54. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_breadcrumbs.scss +4 -0
  55. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/breadcrumbs/_index.scss +11 -36
  56. data/node_modules/govuk-frontend/dist/govuk/components/button/_button.scss +4 -0
  57. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/button/_index.scss +30 -103
  58. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +318 -0
  59. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +310 -0
  60. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs +73 -0
  61. data/node_modules/govuk-frontend/dist/govuk/components/character-count/_character-count.scss +4 -0
  62. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/character-count/_index.scss +8 -6
  63. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +761 -0
  64. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +753 -0
  65. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +295 -0
  66. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/_checkboxes.scss +4 -0
  67. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/checkboxes/_index.scss +108 -132
  68. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +268 -0
  69. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +260 -0
  70. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs +111 -0
  71. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_cookie-banner.scss +4 -0
  72. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/cookie-banner/_index.scss +19 -15
  73. data/node_modules/govuk-frontend/dist/govuk/components/date-input/_date-input.scss +4 -0
  74. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/date-input/_index.scss +3 -2
  75. data/node_modules/govuk-frontend/dist/govuk/components/details/_details.scss +4 -0
  76. data/node_modules/govuk-frontend/dist/govuk/components/details/_index.scss +139 -0
  77. data/node_modules/govuk-frontend/dist/govuk/components/error-message/_error-message.scss +4 -0
  78. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-message/_index.scss +2 -0
  79. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/_error-summary.scss +4 -0
  80. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/error-summary/_index.scss +19 -6
  81. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +378 -0
  82. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +370 -0
  83. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs +103 -0
  84. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_exit-this-page.scss +4 -0
  85. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/exit-this-page/_index.scss +5 -10
  86. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +662 -0
  87. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +654 -0
  88. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +226 -0
  89. data/node_modules/govuk-frontend/dist/govuk/components/fieldset/_fieldset.scss +4 -0
  90. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/fieldset/_index.scss +20 -15
  91. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_file-upload.scss +4 -0
  92. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/file-upload/_index.scss +11 -15
  93. data/node_modules/govuk-frontend/dist/govuk/components/footer/_footer.scss +4 -0
  94. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/footer/_index.scss +25 -68
  95. data/node_modules/govuk-frontend/dist/govuk/components/header/_header.scss +4 -0
  96. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/header/_index.scss +84 -79
  97. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.js +252 -0
  98. data/node_modules/govuk-frontend/dist/govuk/components/header/header.bundle.mjs +244 -0
  99. data/node_modules/govuk-frontend/dist/govuk/components/header/header.mjs +88 -0
  100. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_hint.scss +2 -0
  101. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/hint/_index.scss +3 -0
  102. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_index.scss +24 -49
  103. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/input/_input.scss +2 -0
  104. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/inset-text/_index.scss +2 -0
  105. data/node_modules/govuk-frontend/dist/govuk/components/inset-text/_inset-text.scss +4 -0
  106. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_index.scss +12 -7
  107. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/label/_label.scss +2 -0
  108. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/notification-banner/_index.scss +11 -7
  109. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_notification-banner.scss +4 -0
  110. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +320 -0
  111. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +312 -0
  112. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs +51 -0
  113. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/pagination/_index.scss +36 -55
  114. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_pagination.scss +4 -0
  115. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +58 -0
  116. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/panel/_panel.scss +2 -0
  117. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +57 -0
  118. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_password-input.scss +4 -0
  119. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +594 -0
  120. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +586 -0
  121. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +154 -0
  122. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/phase-banner/_index.scss +10 -1
  123. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_phase-banner.scss +4 -0
  124. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/radios/_index.scss +92 -113
  125. data/node_modules/govuk-frontend/dist/govuk/components/radios/_radios.scss +4 -0
  126. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +245 -0
  127. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +237 -0
  128. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs +88 -0
  129. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/select/_index.scss +9 -16
  130. data/node_modules/govuk-frontend/dist/govuk/components/select/_select.scss +4 -0
  131. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +168 -0
  132. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_service-navigation.scss +4 -0
  133. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +249 -0
  134. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +241 -0
  135. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs +85 -0
  136. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/skip-link/_index.scss +10 -5
  137. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/_skip-link.scss +4 -0
  138. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +244 -0
  139. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +236 -0
  140. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +58 -0
  141. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/summary-list/_index.scss +22 -20
  142. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_summary-list.scss +4 -0
  143. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_index.scss +21 -17
  144. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/table/_table.scss +2 -0
  145. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_index.scss +13 -9
  146. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tabs/_tabs.scss +2 -0
  147. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +453 -0
  148. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +445 -0
  149. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs +283 -0
  150. data/node_modules/govuk-frontend/dist/govuk/components/tag/_index.scss +97 -0
  151. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/tag/_tag.scss +2 -0
  152. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_index.scss +79 -0
  153. data/node_modules/govuk-frontend/dist/govuk/components/task-list/_task-list.scss +4 -0
  154. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/textarea/_index.scss +6 -10
  155. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_textarea.scss +4 -0
  156. data/node_modules/govuk-frontend/{govuk → dist/govuk}/components/warning-text/_index.scss +13 -13
  157. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_warning-text.scss +4 -0
  158. data/node_modules/govuk-frontend/dist/govuk/core/_all.scss +10 -0
  159. data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_global-styles.scss +2 -1
  160. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +12 -0
  161. data/node_modules/govuk-frontend/{govuk/core/_all.scss → dist/govuk/core/_index.scss} +3 -1
  162. data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_links.scss +8 -1
  163. data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_lists.scss +2 -1
  164. data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_section-break.scss +2 -7
  165. data/node_modules/govuk-frontend/{govuk → dist/govuk}/core/_typography.scss +8 -5
  166. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +57 -0
  167. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs +60 -0
  168. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -0
  169. data/node_modules/govuk-frontend/dist/govuk/helpers/_all.scss +10 -0
  170. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_clearfix.scss +3 -1
  171. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +127 -0
  172. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_device-pixels.scss +4 -3
  173. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_focused.scss +22 -6
  174. data/node_modules/govuk-frontend/dist/govuk/helpers/_font-faces.scss +41 -0
  175. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_grid.scss +3 -1
  176. data/node_modules/govuk-frontend/{govuk/helpers/_all.scss → dist/govuk/helpers/_index.scss} +2 -0
  177. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_links.scss +38 -76
  178. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_media-queries.scss +3 -12
  179. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_shape-arrow.scss +3 -1
  180. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_spacing.scss +12 -10
  181. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +288 -0
  182. data/node_modules/govuk-frontend/{govuk → dist/govuk}/helpers/_visually-hidden.scss +39 -50
  183. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +195 -0
  184. data/node_modules/govuk-frontend/dist/govuk/index.scss +11 -0
  185. data/node_modules/govuk-frontend/dist/govuk/init.mjs +162 -0
  186. data/node_modules/govuk-frontend/dist/govuk/objects/_all.scss +10 -0
  187. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_button-group.scss +7 -12
  188. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_form-group.scss +2 -0
  189. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_grid.scss +4 -2
  190. data/node_modules/govuk-frontend/{govuk/objects/_all.scss → dist/govuk/objects/_index.scss} +2 -0
  191. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_main-wrapper.scss +2 -0
  192. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_template.scss +2 -1
  193. data/node_modules/govuk-frontend/{govuk → dist/govuk}/objects/_width-container.scss +2 -9
  194. data/node_modules/govuk-frontend/dist/govuk/overrides/_all.scss +9 -0
  195. data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_display.scss +2 -0
  196. data/node_modules/govuk-frontend/{govuk/overrides/_all.scss → dist/govuk/overrides/_index.scss} +2 -0
  197. data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_spacing.scss +3 -19
  198. data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_text-align.scss +2 -0
  199. data/node_modules/govuk-frontend/dist/govuk/overrides/_typography.scss +42 -0
  200. data/node_modules/govuk-frontend/{govuk → dist/govuk}/overrides/_width.scss +2 -0
  201. data/node_modules/govuk-frontend/dist/govuk/settings/_all.scss +10 -0
  202. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_assets.scss +2 -0
  203. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_colours-applied.scss +9 -7
  204. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +378 -0
  205. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-palette.scss +37 -0
  206. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_global-styles.scss +2 -0
  207. data/node_modules/govuk-frontend/{govuk/settings/_all.scss → dist/govuk/settings/_index.scss} +2 -3
  208. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_links.scss +3 -20
  209. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_measurements.scss +18 -6
  210. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_media-queries.scss +5 -3
  211. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_spacing.scss +2 -0
  212. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-font.scss +52 -0
  213. data/node_modules/govuk-frontend/dist/govuk/settings/_typography-responsive.scss +322 -0
  214. data/node_modules/govuk-frontend/{govuk → dist/govuk}/settings/_warnings.scss +33 -8
  215. data/node_modules/govuk-frontend/dist/govuk/tools/_all.scss +10 -0
  216. data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_exports.scss +2 -0
  217. data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_font-url.scss +3 -0
  218. data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_image-url.scss +3 -0
  219. data/node_modules/govuk-frontend/{govuk/tools/_all.scss → dist/govuk/tools/_index.scss} +2 -2
  220. data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-em.scss +2 -0
  221. data/node_modules/govuk-frontend/{govuk → dist/govuk}/tools/_px-to-rem.scss +2 -0
  222. data/node_modules/govuk-frontend/dist/govuk/utilities/_all.scss +10 -0
  223. data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_clearfix.scss +2 -0
  224. data/node_modules/govuk-frontend/{govuk/utilities/_all.scss → dist/govuk/utilities/_index.scss} +2 -0
  225. data/node_modules/govuk-frontend/{govuk → dist/govuk}/utilities/_visually-hidden.scss +2 -0
  226. data/node_modules/govuk-frontend/{govuk → dist/govuk}/vendor/_sass-mq.scss +3 -1
  227. data/node_modules/govuk-frontend/dist/govuk-prototype-kit/init.js +15 -0
  228. data/node_modules/govuk-frontend/{govuk-prototype-kit → dist/govuk-prototype-kit}/init.scss +3 -2
  229. data/package-lock.json +37 -37
  230. data/package.json +6 -1
  231. metadata +316 -206
  232. data/node_modules/govuk-frontend/govuk/_base.scss +0 -3
  233. data/node_modules/govuk-frontend/govuk/all-ie8.scss +0 -14
  234. data/node_modules/govuk-frontend/govuk/all.js +0 -5172
  235. data/node_modules/govuk-frontend/govuk/all.scss +0 -9
  236. data/node_modules/govuk-frontend/govuk/assets/images/favicon.ico +0 -0
  237. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
  238. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
  239. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
  240. data/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png +0 -0
  241. data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png +0 -0
  242. data/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png +0 -0
  243. data/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png +0 -0
  244. data/node_modules/govuk-frontend/govuk/assets/images/govuk-mask-icon.svg +0 -7
  245. data/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png +0 -0
  246. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +0 -75
  247. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +0 -17
  248. data/node_modules/govuk-frontend/govuk/common/index.js +0 -192
  249. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +0 -386
  250. data/node_modules/govuk-frontend/govuk/common.js +0 -194
  251. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +0 -2
  252. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +0 -2386
  253. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +0 -2
  254. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +0 -2
  255. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +0 -2
  256. data/node_modules/govuk-frontend/govuk/components/button/button.js +0 -1027
  257. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +0 -2
  258. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +0 -2281
  259. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +0 -2
  260. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +0 -1277
  261. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +0 -2
  262. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +0 -2
  263. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +0 -2
  264. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +0 -88
  265. data/node_modules/govuk-frontend/govuk/components/details/details.js +0 -873
  266. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +0 -2
  267. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +0 -2
  268. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +0 -1189
  269. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +0 -2
  270. data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +0 -2120
  271. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +0 -2
  272. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +0 -2
  273. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +0 -2
  274. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +0 -2
  275. data/node_modules/govuk-frontend/govuk/components/header/header.js +0 -794
  276. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +0 -2
  277. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +0 -2
  278. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +0 -843
  279. data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +0 -2
  280. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +0 -56
  281. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +0 -2
  282. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +0 -2
  283. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +0 -1222
  284. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +0 -2
  285. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +0 -2
  286. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +0 -1145
  287. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +0 -2
  288. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +0 -1621
  289. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +0 -81
  290. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +0 -2
  291. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +0 -2
  292. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +0 -5
  293. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +0 -98
  294. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +0 -41
  295. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +0 -214
  296. data/node_modules/govuk-frontend/govuk/i18n.js +0 -397
  297. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +0 -21
  298. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +0 -146
  299. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +0 -120
  300. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -100
  301. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +0 -34
  302. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +0 -32
  303. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +0 -112
  304. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +0 -195
  305. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +0 -50
  306. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +0 -87
  307. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +0 -274
  308. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +0 -23
  309. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +0 -36
  310. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +0 -597
  311. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +0 -58
  312. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +0 -307
  313. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +0 -33
  314. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +0 -261
  315. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +0 -261
  316. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +0 -151
  317. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +0 -512
  318. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +0 -256
  319. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +0 -96
  320. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +0 -23
  321. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +0 -30
  322. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +0 -8
  323. /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-affa96571d-v2.woff +0 -0
  324. /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/bold-b542beb274-v2.woff2 +0 -0
  325. /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-94a07e06a1-v2.woff2 +0 -0
  326. /data/node_modules/govuk-frontend/{govuk → dist/govuk}/assets/fonts/light-f591b13f7d-v2.woff +0 -0
  327. /data/{lib/source → node_modules/govuk-frontend/dist/govuk/assets/images}/favicon.ico +0 -0
@@ -30,14 +30,12 @@
30
30
  @mixin govuk-link-decoration {
31
31
  text-decoration: underline;
32
32
 
33
- @if $govuk-new-link-styles {
34
- @if $govuk-link-underline-thickness {
35
- text-decoration-thickness: $govuk-link-underline-thickness;
36
- }
33
+ @if $govuk-link-underline-thickness {
34
+ text-decoration-thickness: $govuk-link-underline-thickness;
35
+ }
37
36
 
38
- @if $govuk-link-underline-offset {
39
- text-underline-offset: $govuk-link-underline-offset;
40
- }
37
+ @if $govuk-link-underline-offset {
38
+ text-underline-offset: $govuk-link-underline-offset;
41
39
  }
42
40
  }
43
41
 
@@ -50,7 +48,7 @@
50
48
  /// @access public
51
49
 
52
50
  @mixin govuk-link-hover-decoration {
53
- @if $govuk-new-link-styles and $govuk-link-hover-underline-thickness {
51
+ @if $govuk-link-hover-underline-thickness {
54
52
  text-decoration-thickness: $govuk-link-hover-underline-thickness;
55
53
  // Disable ink skipping on underlines on hover. Browsers haven't
56
54
  // standardised on this part of the spec yet, so set both properties
@@ -98,17 +96,6 @@
98
96
  &:focus {
99
97
  color: $govuk-focus-text-colour;
100
98
  }
101
-
102
- // alphagov/govuk_template includes a specific a:link:focus selector
103
- // designed to make unvisited link s a slightly darker blue when focussed, so
104
- // we need to override the text colour for that combination of selectors so
105
- // so that unvisited links styled as buttons do not end up with dark blue
106
- // text when focussed.
107
- @include _govuk-compatibility(govuk_template) {
108
- &:link:focus {
109
- color: $govuk-focus-text-colour;
110
- }
111
- }
112
99
  }
113
100
 
114
101
  /// Error link styles
@@ -146,17 +133,6 @@
146
133
  &:focus {
147
134
  color: $govuk-focus-text-colour;
148
135
  }
149
-
150
- // alphagov/govuk_template includes a specific a:link:focus selector
151
- // designed to make unvisited link s a slightly darker blue when focussed, so
152
- // we need to override the text colour for that combination of selectors so
153
- // so that unvisited links styled as buttons do not end up with dark blue
154
- // text when focussed.
155
- @include _govuk-compatibility(govuk_template) {
156
- &:link:focus {
157
- color: $govuk-focus-text-colour;
158
- }
159
- }
160
136
  }
161
137
 
162
138
  /// Success link styles
@@ -194,17 +170,6 @@
194
170
  &:focus {
195
171
  color: $govuk-focus-text-colour;
196
172
  }
197
-
198
- // alphagov/govuk_template includes a specific a:link:focus selector
199
- // designed to make unvisited link s a slightly darker blue when focussed, so
200
- // we need to override the text colour for that combination of selectors so
201
- // so that unvisited links styled as buttons do not end up with dark blue
202
- // text when focussed.
203
- @include _govuk-compatibility(govuk_template) {
204
- &:link:focus {
205
- color: $govuk-focus-text-colour;
206
- }
207
- }
208
173
  }
209
174
 
210
175
  /// Muted link styles
@@ -239,15 +204,6 @@
239
204
  &:focus {
240
205
  color: $govuk-focus-text-colour;
241
206
  }
242
-
243
- // alphagov/govuk_template includes a specific a:link:focus selector designed
244
- // to make unvisited links a slightly darker blue when focussed, so we need to
245
- // override the text colour for that combination of selectors.
246
- @include _govuk-compatibility(govuk_template) {
247
- &:link:focus {
248
- @include govuk-text-colour;
249
- }
250
- }
251
207
  }
252
208
 
253
209
  /// Text link styles
@@ -273,10 +229,10 @@
273
229
  }
274
230
 
275
231
  // Force a colour change on hover to work around a bug in Safari
276
- // https://bugs.webkit.org/show_bug.cgi?id=224483
232
+ // https://webkit.org/b/224483
277
233
  &:hover {
278
234
  @if type-of($govuk-text-colour) == color {
279
- color: rgba($govuk-text-colour, .99);
235
+ color: rgba($govuk-text-colour, 0.99);
280
236
  }
281
237
  }
282
238
 
@@ -284,15 +240,6 @@
284
240
  &:focus {
285
241
  @include govuk-text-colour;
286
242
  }
287
-
288
- // alphagov/govuk_template includes a specific a:link:focus selector designed
289
- // to make unvisited links a slightly darker blue when focussed, so we need to
290
- // override the text colour for that combination of selectors.
291
- @include _govuk-compatibility(govuk_template) {
292
- &:link:focus {
293
- @include govuk-text-colour;
294
- }
295
- }
296
243
  }
297
244
 
298
245
  /// Inverse link styles
@@ -318,24 +265,15 @@
318
265
  }
319
266
 
320
267
  // Force a colour change on hover to work around a bug in Safari
321
- // https://bugs.webkit.org/show_bug.cgi?id=224483
268
+ // https://webkit.org/b/224483
322
269
  &:hover,
323
270
  &:active {
324
- color: rgba(govuk-colour("white"), .99);
271
+ color: rgba(govuk-colour("white"), 0.99);
325
272
  }
326
273
 
327
274
  &:focus {
328
275
  color: $govuk-focus-text-colour;
329
276
  }
330
-
331
- // alphagov/govuk_template includes a specific a:link:focus selector designed
332
- // to make unvisited links a slightly darker blue when focussed, so we need to
333
- // override the text colour for that combination of selectors.
334
- @include _govuk-compatibility(govuk_template) {
335
- &:link:focus {
336
- color: $govuk-focus-text-colour;
337
- }
338
- }
339
277
  }
340
278
 
341
279
  /// Default link styles, without a visited state
@@ -385,8 +323,7 @@
385
323
  /// Remove underline from links
386
324
  ///
387
325
  /// Remove underlines from links unless the link is active or a user hovers
388
- /// their cursor over it. This has no effect in Internet Explorer 8 (IE8),
389
- /// because IE8 does not support `:not`.
326
+ /// their cursor over it.
390
327
  ///
391
328
  /// @example scss
392
329
  /// .govuk-component__link {
@@ -414,8 +351,9 @@
414
351
  @include govuk-media-query($media-type: print) {
415
352
  &[href^="/"],
416
353
  &[href^="http://"],
417
- &[href^="https://"] {
418
- &:after {
354
+ &[href^="https://"]
355
+ {
356
+ &::after {
419
357
  content: " (" attr(href) ")";
420
358
  font-size: 90%;
421
359
 
@@ -427,3 +365,27 @@
427
365
  }
428
366
  }
429
367
  }
368
+
369
+ /// Image link styles
370
+ ///
371
+ /// Prepares and provides the focus state for links that only contain images
372
+ /// with no accompanying text.
373
+ ///
374
+ /// @access public
375
+
376
+ @mixin govuk-link-image {
377
+ // Needed to draw the focus around the entire image
378
+ display: inline-block;
379
+
380
+ // Remove extra space at the bottom of the image that's added by line-height
381
+ line-height: 0;
382
+
383
+ // Don't render an underline
384
+ text-decoration: none;
385
+
386
+ &:focus {
387
+ @include govuk-focused-box;
388
+ }
389
+ }
390
+
391
+ /*# sourceMappingURL=_links.scss.map */
@@ -6,9 +6,8 @@
6
6
  // Wrangle sass-mq config...
7
7
  // =========================================================
8
8
 
9
- // Pass our breakpoints and static breakpoint definitions through to sass-mq.
9
+ // Pass our breakpoint definitions through to sass-mq.
10
10
  $mq-breakpoints: if(variable-exists(govuk-breakpoints), $govuk-breakpoints, ());
11
- $mq-static-breakpoint: if(variable-exists(govuk-ie8-breakpoint), $govuk-ie8-breakpoint, desktop);
12
11
 
13
12
  $mq-show-breakpoints: ();
14
13
 
@@ -16,14 +15,6 @@ $mq-show-breakpoints: ();
16
15
  $mq-show-breakpoints: map-keys($govuk-breakpoints);
17
16
  }
18
17
 
19
- // When building a stylesheet for IE8, set $mq-responsive to false in order to
20
- // 'rasterize' any media queries.
21
-
22
- $mq-responsive: true;
23
- @if variable-exists(govuk-is-ie8) and $govuk-is-ie8 {
24
- $mq-responsive: false;
25
- }
26
-
27
18
  // This is a horrible, horrible hack to prevent the 'dev mode' CSS to display
28
19
  // the current breakpoint from being included multiple times.
29
20
  //
@@ -55,8 +46,6 @@ $sass-mq-already-included: true;
55
46
  ///
56
47
  /// @ignore Undocumented mq API, for advanced use only:
57
48
  /// @ignore @param {Map} $breakpoints [$govuk-breakpoints]
58
- /// @ignore @param {String} $static-breakpoint [$govuk-ie8-breakpoint]
59
- /// @ignore @param {Boolean} $responsive [$govuk-is-ie8]
60
49
  ///
61
50
  /// @content styling rules, wrapped into a @media query when $responsive is true
62
51
  ///
@@ -89,3 +78,5 @@ $sass-mq-already-included: true;
89
78
  @content;
90
79
  }
91
80
  }
81
+
82
+ /*# sourceMappingURL=_media-queries.scss.map */
@@ -54,7 +54,7 @@
54
54
  -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
55
55
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%); // 3
56
56
 
57
- border-width: 0 $perpendicular $height $perpendicular;
57
+ border-width: 0 $perpendicular $height;
58
58
  border-bottom-color: inherit; // 2
59
59
  } @else if $direction == "right" {
60
60
  -webkit-clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
@@ -78,3 +78,5 @@
78
78
  @error "Invalid arrow direction: expected `up`, `right`, `down` or `left`, got `#{$direction}`";
79
79
  }
80
80
  }
81
+
82
+ /*# sourceMappingURL=_shape-arrow.scss.map */
@@ -2,8 +2,6 @@
2
2
  /// @group helpers/spacing
3
3
  ////
4
4
 
5
- // stylelint-disable indentation
6
-
7
5
  /// Single point spacing
8
6
  ///
9
7
  /// Returns measurement corresponding to the spacing point requested.
@@ -31,11 +29,10 @@
31
29
  /// @access public
32
30
 
33
31
  @function govuk-spacing($spacing-point) {
34
-
35
32
  $actual-input-type: type-of($spacing-point);
36
33
  @if $actual-input-type != "number" {
37
34
  @error "Expected a number (integer), but got a "
38
- + "#{$actual-input-type}.";
35
+ + "#{$actual-input-type}.";
39
36
  }
40
37
 
41
38
  $is-negative: false;
@@ -71,8 +68,13 @@
71
68
  ///
72
69
  /// @access private
73
70
 
74
- @mixin _govuk-responsive-spacing($responsive-spacing-point, $property, $direction: "all", $important: false, $adjustment: false) {
75
-
71
+ @mixin _govuk-responsive-spacing(
72
+ $responsive-spacing-point,
73
+ $property,
74
+ $direction: "all",
75
+ $important: false,
76
+ $adjustment: false
77
+ ) {
76
78
  $actual-input-type: type-of($responsive-spacing-point);
77
79
  @if $actual-input-type != "number" {
78
80
  @error "Expected a number (integer), but got a " + "#{$actual-input-type}.";
@@ -80,7 +82,7 @@
80
82
 
81
83
  @if not map-has-key($govuk-spacing-responsive-scale, $responsive-spacing-point) {
82
84
  @error "Unknown spacing point `#{$responsive-spacing-point}`. Make sure you are using a point from the "
83
- + "responsive spacing scale in `_settings/spacing.scss`.";
85
+ + "responsive spacing scale in `_settings/spacing.scss`.";
84
86
  }
85
87
 
86
88
  // Make sure that the return value from `_settings/spacing.scss` is a map.
@@ -88,19 +90,17 @@
88
90
  $actual-map-type: type-of($scale-map);
89
91
  @if $actual-map-type != "map" {
90
92
  @error "Expected a number (integer), but got a "
91
- + "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)";
93
+ + "#{$actual-map-type}. Make sure you are using a map to set the responsive spacing in `_settings/spacing.scss`)";
92
94
  }
93
95
 
94
96
  // Loop through each breakpoint in the map
95
97
  @each $breakpoint, $breakpoint-value in $scale-map {
96
-
97
98
  @if $adjustment {
98
99
  $breakpoint-value: $breakpoint-value + $adjustment;
99
100
  }
100
101
 
101
102
  // The 'null' breakpoint is for mobile.
102
103
  @if not $breakpoint {
103
-
104
104
  @if $direction == all {
105
105
  #{$property}: $breakpoint-value if($important, !important, null);
106
106
  } @else {
@@ -169,3 +169,5 @@
169
169
  @mixin govuk-responsive-padding($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) {
170
170
  @include _govuk-responsive-spacing($responsive-spacing-point, "padding", $direction, $important, $adjustment);
171
171
  }
172
+
173
+ /*# sourceMappingURL=_spacing.scss.map */
@@ -0,0 +1,288 @@
1
+ ////
2
+ /// @group helpers/typography
3
+ ////
4
+
5
+ @import "../tools/px-to-rem";
6
+
7
+ /// 'Common typography' helper
8
+ ///
9
+ /// Sets the font family and associated properties, such as font smoothing. Also
10
+ /// overrides the font for print.
11
+ ///
12
+ /// @param {List} $font-family [$govuk-font-family] Font family to use
13
+ /// @access public
14
+
15
+ @mixin govuk-typography-common($font-family: $govuk-font-family) {
16
+ font-family: $font-family;
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
+
20
+ // If the user is using the default GDS Transport font we need to include
21
+ // the font-face declarations.
22
+ @if $govuk-include-default-font-face {
23
+ @include _govuk-font-face-gds-transport;
24
+ }
25
+
26
+ @include govuk-media-query($media-type: print) {
27
+ font-family: $govuk-font-family-print;
28
+ }
29
+ }
30
+
31
+ /// Text colour helper
32
+ ///
33
+ /// Sets the text colour, including a suitable override for print.
34
+ ///
35
+ /// @access public
36
+
37
+ @mixin govuk-text-colour {
38
+ color: $govuk-text-colour;
39
+
40
+ @include govuk-media-query($media-type: print) {
41
+ color: $govuk-print-text-colour;
42
+ }
43
+ }
44
+
45
+ /// Regular font weight helper
46
+ ///
47
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
48
+ /// `!important`. Generally Used to create override classes.
49
+ /// @access public
50
+
51
+ @mixin govuk-typography-weight-regular($important: false) {
52
+ font-weight: $govuk-font-weight-regular if($important, !important, null);
53
+ }
54
+
55
+ /// Bold font weight helper
56
+ ///
57
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
58
+ /// `!important`. Generally Used to create override classes.
59
+ /// @access public
60
+
61
+ @mixin govuk-typography-weight-bold($important: false) {
62
+ font-weight: $govuk-font-weight-bold if($important, !important, null);
63
+ }
64
+
65
+ /// Tabular number helper
66
+ ///
67
+ /// Switches numerical glyphs (0–9) to use alternative forms with a
68
+ /// monospaced bounding box. This ensures that columns of numbers, such
69
+ /// as those in tables, remain horizontally aligned with one another.
70
+ /// This also has the useful side effect of making numbers more legible
71
+ /// in some situations, such as reference codes, as the numbers are more
72
+ /// distinct and visually separated from one another.
73
+ ///
74
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
75
+ /// `!important`. Generally Used to create override classes.
76
+ /// @access public
77
+
78
+ @mixin govuk-font-tabular-numbers($important: false) {
79
+ font-variant-numeric: tabular-nums if($important, !important, null);
80
+ }
81
+
82
+ /// Word break helper
83
+ ///
84
+ /// Forcibly breaks long words that lack spaces, such as email addresses,
85
+ /// across multiple lines when they wouldn't otherwise fit.
86
+ ///
87
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
88
+ /// `!important`. Generally used to create override classes.
89
+ /// @access public
90
+
91
+ @mixin govuk-text-break-word($important: false) {
92
+ // IE 11 and Edge 16–17 only support the non-standard `word-wrap` property
93
+ word-wrap: break-word if($important, !important, null);
94
+
95
+ // All other browsers support `overflow-wrap`
96
+ overflow-wrap: break-word if($important, !important, null);
97
+ }
98
+
99
+ /// Convert line-heights specified in pixels into a relative value, unless
100
+ /// they are already unit-less (and thus already treated as relative values)
101
+ /// or the units do not match the units used for the font size.
102
+ ///
103
+ /// @param {Number} $line-height Line height
104
+ /// @param {Number} $font-size Font size
105
+ /// @return {Number} The line height as either a relative value or unmodified
106
+ ///
107
+ /// @access private
108
+
109
+ @function _govuk-line-height($line-height, $font-size) {
110
+ @if not unitless($line-height) and unit($line-height) == unit($font-size) {
111
+ $line-height: $line-height / $font-size;
112
+ }
113
+
114
+ @return $line-height;
115
+ }
116
+
117
+ /// Font size and line height helper
118
+ ///
119
+ /// @param {Number} $size - Point from the type scale (the size as it would
120
+ /// appear on tablet and above)
121
+ /// @param {Number} $override-line-height [false] - Non responsive custom line
122
+ /// height. Omit to use the line height from the font map.
123
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
124
+ /// `!important`.
125
+ ///
126
+ /// @throw if `$size` is not a valid point from the type scale
127
+ ///
128
+ /// @access public
129
+ ///
130
+ /// @alias govuk-font-size
131
+ /// @deprecated Use `govuk-font-size` instead
132
+
133
+ @mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {
134
+ @include _warning(
135
+ "govuk-typography-responsive",
136
+ "govuk-typography-responsive is deprecated. Use govuk-font-size instead."
137
+ );
138
+ @include govuk-font-size($size, $override-line-height, $important);
139
+ }
140
+
141
+ /// Font size and line height helper
142
+ ///
143
+ /// Takes a point from the responsive 'font map' as an argument (the size as it
144
+ /// would appear on tablet and above), and uses it to create font-size and
145
+ /// line-height declarations for different breakpoints, and print.
146
+ ///
147
+ /// Example font map:
148
+ ///
149
+ /// ```scss
150
+ /// 19: (
151
+ /// null: (
152
+ /// font-size: 16px,
153
+ /// line-height: 20px
154
+ /// ),
155
+ /// tablet: (
156
+ /// font-size: 19px,
157
+ /// line-height: 25px
158
+ /// ),
159
+ /// print: (
160
+ /// font-size: 14pt,
161
+ /// line-height: 1.15
162
+ /// )
163
+ /// );
164
+ /// ```
165
+ ///
166
+ /// @param {Number | String} $size - Point from the type scale (the size as
167
+ /// it would appear on tablet and above)
168
+ /// @param {Number} $line-height [false] - Non responsive custom line
169
+ /// height. Omit to use the line height from the font map.
170
+ /// @param {Boolean} $important [false] - Whether to mark declarations as
171
+ /// `!important`.
172
+ ///
173
+ /// @throw if `$size` is not a valid point from the type scale
174
+ ///
175
+ /// @access public
176
+
177
+ @mixin govuk-font-size($size, $line-height: false, $important: false) {
178
+ // Flag font sizes that start with underscores so we can suppress warnings on
179
+ // deprecated sizes used internally, for example `govuk-font($size: "_14")`
180
+ $size-internal-use-only: str-slice(#{$size}, 1, 1) == "_";
181
+
182
+ // Remove underscore from font sizes flagged for internal use
183
+ @if $size-internal-use-only {
184
+ $size: str-slice(#{$size}, 2);
185
+ }
186
+
187
+ // Check for a font map exactly matching the given size
188
+ $font-map: map-get($govuk-typography-scale, $size);
189
+
190
+ // No match? Try with string type (e.g. $size: "16" not 16)
191
+ @if not $font-map {
192
+ @each $font-size in map-keys($govuk-typography-scale) {
193
+ @if not $font-map and #{$font-size} == #{$size} {
194
+ $font-map: map-get($govuk-typography-scale, $font-size);
195
+ }
196
+ }
197
+ }
198
+
199
+ // Still no match? Throw error
200
+ @if not $font-map {
201
+ @error "Unknown font size `#{$size}` - expected a point from the type scale.";
202
+ }
203
+
204
+ // Check for a deprecation within the type scale
205
+ $deprecation: map-get($font-map, "deprecation");
206
+
207
+ @if $deprecation {
208
+ // Warn on deprecated font sizes unless flagged for internal use
209
+ @if not $size-internal-use-only {
210
+ @include _warning(map-get($deprecation, "key"), map-get($deprecation, "message"));
211
+ }
212
+
213
+ // remove the deprecation map keys so they do not break the breakpoint loop
214
+ $font-map: map-remove($font-map, "deprecation");
215
+ }
216
+
217
+ @each $breakpoint, $breakpoint-map in $font-map {
218
+ $font-size: map-get($breakpoint-map, "font-size");
219
+ $font-size-rem: govuk-px-to-rem($font-size);
220
+
221
+ // $calculated-line-height is a separate variable from $line-height,
222
+ // as otherwise the value would get redefined with each loop and
223
+ // eventually break _govuk-line-height.
224
+ //
225
+ // We continue to call the param $line-height to stay consistent with the
226
+ // naming with govuk-font.
227
+ $calculated-line-height: _govuk-line-height(
228
+ $line-height: if($line-height, $line-height, map-get($breakpoint-map, "line-height")),
229
+ $font-size: $font-size
230
+ );
231
+
232
+ // Mark rules as !important if $important is true - this will result in
233
+ // these variables becoming strings, so this needs to happen *after* they
234
+ // are used in calculations
235
+ $font-size: $font-size if($important, !important, null);
236
+ $font-size-rem: $font-size-rem if($important, !important, null);
237
+ $calculated-line-height: $calculated-line-height if($important, !important, null);
238
+
239
+ @if not $breakpoint {
240
+ font-size: $font-size-rem;
241
+ line-height: $calculated-line-height;
242
+ } @else if $breakpoint == "print" {
243
+ @include govuk-media-query($media-type: print) {
244
+ font-size: $font-size;
245
+ line-height: $calculated-line-height;
246
+ }
247
+ } @else {
248
+ @include govuk-media-query($from: $breakpoint) {
249
+ font-size: $font-size-rem;
250
+ line-height: $calculated-line-height;
251
+ }
252
+ }
253
+ }
254
+ }
255
+
256
+ /// Font helper
257
+ ///
258
+ /// @param {Number | Boolean | String} $size Point from the type scale (the
259
+ /// size as it would appear on tablet and above). Use `false` to avoid setting
260
+ /// a size.
261
+ /// @param {String} $weight [regular] - Weight: `bold` or `regular`
262
+ /// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not
263
+ /// @param {Number} $line-height [false] - Line-height, if overriding the
264
+ /// default
265
+ ///
266
+ /// @throw if `$size` is not a valid point from the type scale (or false)
267
+ ///
268
+ /// @access public
269
+
270
+ @mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {
271
+ @include govuk-typography-common;
272
+
273
+ @if $tabular {
274
+ @include govuk-font-tabular-numbers;
275
+ }
276
+
277
+ @if $weight == regular {
278
+ @include govuk-typography-weight-regular;
279
+ } @else if $weight == bold {
280
+ @include govuk-typography-weight-bold;
281
+ }
282
+
283
+ @if $size {
284
+ @include govuk-font-size($size, $line-height);
285
+ }
286
+ }
287
+
288
+ /*# sourceMappingURL=_typography.scss.map */