defra_ruby_template 6.4.0 → 6.6.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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +73 -19
  3. data/Rakefile +10 -33
  4. data/lib/defra_ruby_template/version.rb +1 -1
  5. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +202 -137
  6. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  7. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +202 -137
  8. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  9. data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -1
  10. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +5 -1
  11. data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -1
  12. data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs +13 -0
  13. data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs.map +1 -0
  14. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  15. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs.map +1 -1
  16. data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
  17. data/node_modules/govuk-frontend/dist/govuk/component.mjs +2 -1
  18. data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -1
  19. data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +2 -0
  20. data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +2 -0
  21. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +87 -62
  22. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  23. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +87 -62
  24. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  25. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +60 -56
  26. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
  27. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +17 -6
  28. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
  29. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +17 -6
  30. data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
  31. data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +90 -32
  33. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  34. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +90 -32
  35. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  36. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +64 -27
  37. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
  38. data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +173 -6
  39. data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +13 -6
  40. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-error-message.html +12 -0
  41. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-threshold.html +9 -0
  42. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-value.html +9 -0
  43. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters.html +9 -0
  44. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-length.html +9 -0
  45. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-error-message.html +12 -0
  46. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-threshold.html +9 -0
  47. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-value.html +9 -0
  48. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words.html +9 -0
  49. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-maxwords.html +9 -0
  50. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +10 -3
  51. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +12 -5
  52. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
  53. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +12 -5
  54. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
  55. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
  56. data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +6 -0
  57. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +17 -6
  58. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
  59. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +17 -6
  60. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
  61. data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
  62. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +43 -18
  63. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  64. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +43 -18
  65. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  66. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +16 -12
  67. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
  68. data/node_modules/govuk-frontend/dist/govuk/components/feedback/README.md +15 -0
  69. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
  70. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
  71. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
  72. data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -0
  73. data/node_modules/govuk-frontend/dist/govuk/components/feedback/fixtures.json +95 -0
  74. data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro-options.json +50 -0
  75. data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro.njk +3 -0
  76. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-default.html +12 -0
  77. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-silly-example.html +19 -0
  78. data/node_modules/govuk-frontend/dist/govuk/components/feedback/template.njk +24 -0
  79. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +54 -30
  80. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
  81. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +54 -30
  82. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
  83. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +27 -24
  84. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
  85. data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +6 -0
  86. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/README.md +15 -0
  87. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
  88. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
  89. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
  90. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -0
  91. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/fixtures.json +482 -0
  92. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro-options.json +88 -0
  93. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro.njk +3 -0
  94. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-default.html +12 -0
  95. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-inverse.html +12 -0
  96. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-language-description.html +12 -0
  97. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-large-amount-of-multiple-languages.html +99 -0
  98. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-mixed-text-directions.html +12 -0
  99. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-multiple-languages.html +24 -0
  100. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-translated-navigation-label.html +12 -0
  101. data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template.njk +33 -0
  102. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +17 -6
  103. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
  104. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +17 -6
  105. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
  106. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
  107. data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +13 -11
  108. data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-headings-content-and-lists.html +6 -1
  109. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +32 -9
  110. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  111. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +32 -9
  112. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  113. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -3
  114. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
  115. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +12 -5
  116. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
  117. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +12 -5
  118. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
  119. data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
  120. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +48 -3
  121. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +121 -0
  122. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +20 -0
  123. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +12 -5
  124. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
  125. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +12 -5
  126. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
  127. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
  128. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse-with-language-navigation.html +72 -0
  129. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-inline-end-slot.html +33 -0
  130. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-language-navigation.html +62 -0
  131. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-right-aligned-language-navigation.html +62 -0
  132. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +8 -3
  133. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +14 -6
  134. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
  135. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +14 -6
  136. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
  137. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +2 -1
  138. data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
  139. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +12 -5
  140. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
  141. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +12 -5
  142. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
  143. data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
  144. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
  145. data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +1 -0
  146. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +8 -5
  147. data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
  148. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  149. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  150. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  151. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  152. data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +1 -1
  153. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
  154. data/node_modules/govuk-frontend/dist/govuk/init.mjs +8 -8
  155. data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
  156. data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +16 -2
  157. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +9 -1
  158. data/node_modules/govuk-frontend/package.json +9 -7
  159. data/vendor/assets/javascripts/defra_ruby_template.js +202 -137
  160. data/vendor/assets/stylesheets/components/_index.import.scss +2 -0
  161. data/vendor/assets/stylesheets/components/_index.scss +2 -0
  162. data/vendor/assets/stylesheets/components/cookie-banner/_mixin.scss +6 -0
  163. data/vendor/assets/stylesheets/components/feedback/_feedback.import.scss +6 -0
  164. data/vendor/assets/stylesheets/components/feedback/_index.import.scss +8 -0
  165. data/vendor/assets/stylesheets/components/feedback/_index.scss +5 -0
  166. data/vendor/assets/stylesheets/components/feedback/_mixin.scss +48 -0
  167. data/vendor/assets/stylesheets/components/footer/_mixin.scss +6 -0
  168. data/vendor/assets/stylesheets/components/language-navigation/_index.import.scss +8 -0
  169. data/vendor/assets/stylesheets/components/language-navigation/_index.scss +6 -0
  170. data/vendor/assets/stylesheets/components/language-navigation/_language-navigation.import.scss +6 -0
  171. data/vendor/assets/stylesheets/components/language-navigation/_mixin.scss +68 -0
  172. data/vendor/assets/stylesheets/components/service-navigation/_mixin.scss +48 -3
  173. data/vendor/assets/stylesheets/custom-properties/_frontend-version.mixin.scss +1 -1
  174. data/vendor/assets/stylesheets/custom-properties/_functional-colours.mixin.scss +1 -0
  175. data/vendor/assets/stylesheets/defra_ruby_template.scss +8 -30
  176. data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
  177. data/vendor/assets/stylesheets/helpers/_colour.scss +1 -1
  178. data/vendor/assets/stylesheets/settings/_colours-organisations.scss +16 -2
  179. metadata +53 -3
  180. data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-word-count.html +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a44a6552ed7efbac194e9ad18ca3b89790962a374e138038b963cc3612242f14
4
- data.tar.gz: c54f85edbb5c6f44c01b236ba5ff25858df2f2607573a0738a60206e33cb5427
3
+ metadata.gz: 42e02e87fae59b0d67acc88406a2d4505cb4a426bc04628ef7dacdb64fe87fcc
4
+ data.tar.gz: ef0fdc6b77bd8705ce78e87eafb34ab6490a83b552f776e9ee56fad049db301d
5
5
  SHA512:
6
- metadata.gz: ea3b66c2cdcfc820e4b75f502fe4fe4c5af7af10bfcd2a161bed5b7d6fa017a38f471028df605059d146dcfcfc1c58b0404e756aabbc2964d1a48bb0880b30c2
7
- data.tar.gz: fd08b5eac1fb61b6b43302837ecbab4b364f7fc2eefa9b1035b33a39d7982329e48bd3d7421f1661c0e22a6f764b18ea6625e74b74671f7b659c5bbeb8c763e0
6
+ metadata.gz: f421d6f36948c6ed6d2b8fcd536ed45ad6d70503b7b7388b77fa8f850afe073bde4b7091f1861c5e798a1d027c07c0706cd8a0d94351b5607d5effceaae20f49
7
+ data.tar.gz: 422abfcd9c4f675fc454e8569f46adeb933ff78715e7693db336afb11b11abd46fc4594a6f6d51d7b6f2470cc7a5a18a12793da3be44907fe832db1314bc9850
data/README.md CHANGED
@@ -9,8 +9,9 @@
9
9
 
10
10
  Adds a GOV.UK-ready layout template and the [govuk_frontend assets](https://github.com/alphagov/govuk-frontend) to a Rails application.
11
11
 
12
- The gem's version tracks the version of govuk-frontend it vendors, so 6.4.0 of
13
- this gem ships govuk-frontend 6.4.0.
12
+ The gem's major and minor version track the version of govuk-frontend it
13
+ vendors, so 6.6.x of this gem ships govuk-frontend 6.6.0. Patch releases are
14
+ changes to the gem itself.
14
15
 
15
16
  ## Installation
16
17
 
@@ -62,6 +63,31 @@ provides with `content_for`, then render it:
62
63
  <%= render template: "layouts/defra_ruby_template" %>
63
64
  ```
64
65
 
66
+ ### Stylesheets
67
+
68
+ The gem's stylesheet entry point is a Sass module. Load it from the
69
+ application's own stylesheet with `@use`:
70
+
71
+ ```scss
72
+ @use "defra_ruby_template" as *;
73
+ ```
74
+
75
+ That emits govuk-frontend's CSS and makes its settings, tools and helpers
76
+ available unprefixed, the way `@import` did - `govuk-colour`, `govuk-font`,
77
+ `$govuk-text-colour` and so on. The same rule configures govuk-frontend's own
78
+ settings:
79
+
80
+ ```scss
81
+ @use "defra_ruby_template" as * with (
82
+ $govuk-assets-path: "/custom-assets/"
83
+ );
84
+ ```
85
+
86
+ Unlike `@import`, a `@use` applies only to the file it appears in, and it has
87
+ to come before any other rule in that file. A partial that is still
88
+ `@import`ed is pulled into the importing file's scope, so it keeps working
89
+ untouched - only a partial loaded with `@use` needs its own `@use` line.
90
+
65
91
  ## Requirements
66
92
 
67
93
  ### Dart Sass
@@ -88,29 +114,23 @@ to the Gemfile:
88
114
  gem "dartsass-sprockets"
89
115
  ```
90
116
 
91
- `dartsass-rails` is the other option. It compiles outside Sprockets, which means
92
- the Rails asset helpers are not available as Sass functions - this gem's
93
- stylesheet detects that and falls back to govuk-frontend's own
94
- `$govuk-assets-path`, but any application stylesheet calling `image-url` or
95
- `font-url` would need rewriting. Serving the prebuilt
117
+ `dartsass-rails` will not work. It compiles outside Sprockets, so the Rails
118
+ asset helpers are not registered as Sass functions and this gem's stylesheet
119
+ fails to compile. Serving the prebuilt
96
120
  `vendor/assets/stylesheets/govuk-frontend.min.css` and dropping SCSS compilation
97
- altogether is a third option, but it gives up the settings, tools and helpers
121
+ altogether is the other option, but it gives up the settings, tools and helpers
98
122
  that application stylesheets use.
99
123
 
100
- Dart Sass warns that `@import` is deprecated. Sprockets stylesheets are built on
101
- `@import`, so until Rails' asset pipeline moves to `@use` these warnings are
102
- expected. Silence them per application with:
103
-
104
- ```ruby
105
- config.sass.silence_deprecations = ["import"]
106
- ```
124
+ Dart Sass warns that `@import` is deprecated. Nothing the gem ships uses it, so
125
+ an application that loads the gem with `@use` and has converted its own
126
+ partials does not need `config.sass.silence_deprecations = ["import"]`.
107
127
 
108
128
  [dartsass-sprockets]: https://github.com/tablecheck/dartsass-sprockets
109
129
 
110
130
  ### govuk_design_system_formbuilder
111
131
 
112
- Pin `govuk_design_system_formbuilder` to `~> 6.4.0`. That is the release that
113
- tracks govuk-frontend 6.4.0; earlier 6.x releases target earlier govuk-frontend
132
+ Pin `govuk_design_system_formbuilder` to `~> 6.6.0`. That is the release that
133
+ tracks govuk-frontend 6.6.0; earlier 6.x releases target earlier govuk-frontend
114
134
  6.x versions, and 5.x emits govuk-frontend 5 markup.
115
135
 
116
136
  ### Content Security Policy
@@ -125,10 +145,44 @@ This gem instead ships that one statement as an asset,
125
145
  `<body>`. No inline script is used, so no `unsafe-inline` or nonce is needed for
126
146
  it.
127
147
 
148
+ ## Upgrading from 6.4.0
149
+
150
+ 6.6.0 vendors govuk-frontend 6.6.0, and turns the stylesheet entry point from
151
+ an `@import` shim into a Sass module so that neither Sass nor govuk-frontend
152
+ emits a deprecation warning. The gem now only compiles under Sprockets, which
153
+ is what registers the Rails asset helpers as Sass functions.
154
+
155
+ In each application:
156
+
157
+ 1. Pin `govuk_design_system_formbuilder` to `~> 6.6.0`.
158
+ 2. Replace `@import "defra_ruby_template"` with `@use "defra_ruby_template" as *`
159
+ at the top of the stylesheet. Partials it `@import`s keep working as they are.
160
+ 3. Convert those `@import`s to `@use` too, giving each partial that uses
161
+ govuk-frontend's settings, tools or helpers its own `@use` line.
162
+ 4. Drop `config.sass.silence_deprecations = ["import"]`.
163
+
164
+ `@import "defra_ruby_template"` still works, so the steps can be taken
165
+ separately, but it keeps the deprecation warning.
166
+
167
+ govuk-frontend 6.5 and 6.6 carry no breaking changes. They add the Language
168
+ navigation and Feedback components, both in trial status, and deprecate three
169
+ organisation colours following the July 2026 machinery of government changes.
170
+
171
+ ### Deprecated colour names
172
+
173
+ govuk-frontend 6 renamed the colour palette. The old names still resolve, but
174
+ each one warns - replace them with the name the warning gives, for example
175
+ `govuk-colour("black", $variant: "tint-95")` for `govuk-colour("light-grey")`.
176
+
177
+ Adding `pre-brand-colour` to `$govuk-suppressed-warnings` does not silence it:
178
+ govuk-frontend 6.6.0 calls an undefined `_should-warn()` in
179
+ `helpers/_colour.scss`, which Sass falls back to treating as a plain CSS
180
+ function, so the suppression check is always true.
181
+
128
182
  ## Upgrading from 5.x
129
183
 
130
184
  1. Move the application to a Dart Sass pipeline (see above).
131
- 2. Update `govuk_design_system_formbuilder` to `~> 6.4.0`.
185
+ 2. Update `govuk_design_system_formbuilder` to `~> 6.6.0`.
132
186
  3. Replace the contents of the `:header_content` slot (see below).
133
187
  4. Check any application stylesheet or markup using classes govuk-frontend 6
134
188
  removed - `govuk-template--rebranded`, `govuk-header__content`,
@@ -183,7 +237,7 @@ writes three files that are generated rather than copied:
183
237
 
184
238
  | File | Generated from |
185
239
  |------|----------------|
186
- | `vendor/assets/stylesheets/defra_ruby_template.scss` | the entry point applications import |
240
+ | `vendor/assets/stylesheets/defra_ruby_template.scss` | the entry point applications load |
187
241
  | `vendor/assets/javascripts/defra_ruby_template_supported.js` | the inline script in govuk-frontend's `template.njk` |
188
242
  | `vendor/assets/assets/manifest.json.erb` | govuk-frontend's `manifest.json`, with its icon paths rewritten to `asset_path` |
189
243
 
data/Rakefile CHANGED
@@ -121,46 +121,23 @@ end
121
121
  # @use/@forward and ships sibling *.import.scss shims for @import callers. Both
122
122
  # need Dart Sass - LibSass does not implement the module system and quietly
123
123
  # emits the @use rules as literal CSS, producing a stylesheet with no styles in
124
- # it. Consuming apps import this file, so all it does is point the asset URL
125
- # helpers at Sprockets (when Sprockets is what is compiling it) and hand over to
126
- # govuk-frontend.
124
+ # it. Consuming apps load this file, so all it does is point the asset URL
125
+ # helpers at Sprockets and hand over to govuk-frontend.
127
126
  #
128
127
  # It deliberately no longer wraps govuk-frontend's all.scss, which exists only
129
128
  # to emit an "Importing using 'govuk/all' is deprecated" warning on every
130
129
  # compile.
131
130
  SCSS_ENTRY_POINT = <<~SCSS
132
- // Compiled through Sprockets (sassc-rails, dartsass-sprockets) the Rails
133
- // asset helpers are registered as Sass functions, so hand govuk-frontend
134
- // their names and asset URLs resolve to digest paths. Compiled standalone
135
- // (dartsass-rails, a plain `sass` run) they do not exist, and govuk-frontend
136
- // falls back to $govuk-images-path / $govuk-fonts-path.
137
- //
138
- // The variables are declared before the @if so that the assignment inside it
139
- // updates the global rather than creating one scoped to the @if.
131
+ // The gem is compiled through Sprockets (dartsass-sprockets), which registers
132
+ // the Rails asset helpers as Sass functions. Handing govuk-frontend references
133
+ // to them is what makes asset URLs come out as digest paths. Compiling this
134
+ // file outside Sprockets is not supported - meta.get-function raises there.
140
135
  @use "sass:meta";
141
136
 
142
- $govuk-image-url-function: null;
143
- $govuk-font-url-function: null;
144
-
145
- @if meta.function-exists("image-url") {
146
- $govuk-image-url-function: "image-url";
147
- }
148
-
149
- @if meta.function-exists("font-url") {
150
- $govuk-font-url-function: "font-url";
151
- }
152
-
153
- // Passing the helpers by name is the only form available to @import users,
154
- // and govuk-frontend deprecates it in favour of meta.get-function, which
155
- // needs @use. Silence the warning until this file can be migrated.
156
- $govuk-suppressed-warnings: ("image-url-string", "font-url-string");
157
-
158
- // index.import rather than index: Dart Sass maps `@import "index"` onto
159
- // index.import.scss itself, but Sprockets-based pipelines supply their own
160
- // importer and resolve `index` to index.scss - the module entry point, which
161
- // silently ignores the settings above and emits undigested asset URLs.
162
- // Naming the shim explicitly makes both routes behave the same.
163
- @import "index.import";
137
+ @forward "index" with (
138
+ $govuk-image-url-function: meta.get-function("image-url"),
139
+ $govuk-font-url-function: meta.get-function("font-url")
140
+ );
164
141
  SCSS
165
142
 
166
143
  def create_scss_file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DefraRubyTemplate
4
- VERSION = "6.4.0"
4
+ VERSION = "6.6.0"
5
5
  end