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.
- checksums.yaml +4 -4
- data/README.md +73 -19
- data/Rakefile +10 -33
- data/lib/defra_ruby_template/version.rb +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +202 -137
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +202 -137
- data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs +5 -1
- data/node_modules/govuk-frontend/dist/govuk/common/configuration.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs +13 -0
- data/node_modules/govuk-frontend/dist/govuk/common/create-element.mjs.map +1 -0
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/common/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs +2 -1
- data/node_modules/govuk-frontend/dist/govuk/component.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/_index.import.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/_index.scss +2 -0
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +87 -62
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +87 -62
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs +60 -56
- data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/button/button.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +90 -32
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +90 -32
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs +64 -27
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/fixtures.json +173 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/macro-options.json +13 -6
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-error-message.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-threshold.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters-and-value.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-characters.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-length.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-error-message.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-threshold.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words-and-value.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-count-type-words.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template-with-maxwords.html +9 -0
- data/node_modules/govuk-frontend/dist/govuk/components/character-count/template.njk +10 -3
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/cookie-banner/_mixin.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +43 -18
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +43 -18
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs +16 -12
- data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_feedback.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_index.scss +5 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/_mixin.scss +48 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/fixtures.json +95 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro-options.json +50 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-default.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template-silly-example.html +19 -0
- data/node_modules/govuk-frontend/dist/govuk/components/feedback/template.njk +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +54 -30
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +54 -30
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +27 -24
- data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/footer/_mixin.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/README.md +15 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.import.scss +8 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_index.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_language-navigation.import.scss +6 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/_mixin.scss +68 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/fixtures.json +482 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro-options.json +88 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/macro.njk +3 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-default.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-inverse.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-language-description.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-large-amount-of-multiple-languages.html +99 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-mixed-text-directions.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-multiple-languages.html +24 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template-with-translated-navigation-label.html +12 -0
- data/node_modules/govuk-frontend/dist/govuk/components/language-navigation/template.njk +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs +17 -6
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/panel/fixtures.json +13 -11
- data/node_modules/govuk-frontend/dist/govuk/components/panel/template-interruption-with-headings-content-and-lists.html +6 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +32 -9
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +32 -9
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs +5 -3
- data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_mixin.scss +48 -3
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/fixtures.json +121 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/macro-options.json +20 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-inverse-with-language-navigation.html +72 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-inline-end-slot.html +33 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-language-navigation.html +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template-with-right-aligned-language-navigation.html +62 -0
- data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/template.njk +8 -3
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js +14 -6
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs +14 -6
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs +2 -1
- data/node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs +12 -5
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.bundle.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_frontend-version.mixin.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/custom-properties/_functional-colours.mixin.scss +1 -0
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs +8 -5
- data/node_modules/govuk-frontend/dist/govuk/errors/index.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
- data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/helpers/_colour.scss +1 -1
- data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/init.mjs +8 -8
- data/node_modules/govuk-frontend/dist/govuk/init.mjs.map +1 -1
- data/node_modules/govuk-frontend/dist/govuk/settings/_colours-organisations.scss +16 -2
- data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +9 -1
- data/node_modules/govuk-frontend/package.json +9 -7
- data/vendor/assets/javascripts/defra_ruby_template.js +202 -137
- data/vendor/assets/stylesheets/components/_index.import.scss +2 -0
- data/vendor/assets/stylesheets/components/_index.scss +2 -0
- data/vendor/assets/stylesheets/components/cookie-banner/_mixin.scss +6 -0
- data/vendor/assets/stylesheets/components/feedback/_feedback.import.scss +6 -0
- data/vendor/assets/stylesheets/components/feedback/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/feedback/_index.scss +5 -0
- data/vendor/assets/stylesheets/components/feedback/_mixin.scss +48 -0
- data/vendor/assets/stylesheets/components/footer/_mixin.scss +6 -0
- data/vendor/assets/stylesheets/components/language-navigation/_index.import.scss +8 -0
- data/vendor/assets/stylesheets/components/language-navigation/_index.scss +6 -0
- data/vendor/assets/stylesheets/components/language-navigation/_language-navigation.import.scss +6 -0
- data/vendor/assets/stylesheets/components/language-navigation/_mixin.scss +68 -0
- data/vendor/assets/stylesheets/components/service-navigation/_mixin.scss +48 -3
- data/vendor/assets/stylesheets/custom-properties/_frontend-version.mixin.scss +1 -1
- data/vendor/assets/stylesheets/custom-properties/_functional-colours.mixin.scss +1 -0
- data/vendor/assets/stylesheets/defra_ruby_template.scss +8 -30
- data/vendor/assets/stylesheets/govuk-frontend.min.css +2 -2
- data/vendor/assets/stylesheets/helpers/_colour.scss +1 -1
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +16 -2
- metadata +53 -3
- 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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42e02e87fae59b0d67acc88406a2d4505cb4a426bc04628ef7dacdb64fe87fcc
|
|
4
|
+
data.tar.gz: ef0fdc6b77bd8705ce78e87eafb34ab6490a83b552f776e9ee56fad049db301d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
13
|
-
this gem ships govuk-frontend 6.
|
|
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`
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
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.
|
|
101
|
-
|
|
102
|
-
|
|
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.
|
|
113
|
-
tracks govuk-frontend 6.
|
|
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.
|
|
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
|
|
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
|
|
125
|
-
# helpers at Sprockets
|
|
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
|
-
//
|
|
133
|
-
// asset helpers
|
|
134
|
-
//
|
|
135
|
-
//
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|