katalyst-govuk-formbuilder 1.20.0 → 1.21.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.
@@ -1,11 +1,14 @@
1
1
  :root {
2
2
  // This variable is automatically overwritten during builds and releases.
3
3
  // It doesn't need to be updated manually.
4
- --govuk-frontend-version: "5.10.2";
4
+ --govuk-frontend-version: "5.11.1";
5
5
 
6
6
  // CSS custom property for each breakpoint
7
7
  @each $name, $value in $govuk-breakpoints {
8
- --govuk-frontend-breakpoint-#{$name}: #{govuk-px-to-rem($value)};
8
+ --govuk-breakpoint-#{$name}: #{govuk-px-to-rem($value)};
9
+
10
+ // Deprecated, use `--govuk-breakpoint-[name]` instead
11
+ --govuk-frontend-breakpoint-#{$name}: var(--govuk-breakpoint-#{$name});
9
12
  }
10
13
  }
11
14
 
@@ -121,7 +121,9 @@
121
121
  /// @access public
122
122
 
123
123
  @function govuk-shade($colour, $percentage) {
124
- @return mix(#000000, $colour, $percentage);
124
+ // Ensure the output is a hex string so that Safari <12 can render the colour
125
+ // without issues from float values in `rgb()`
126
+ @return _as-hexadecimal(mix(#000000, $colour, $percentage));
125
127
  }
126
128
 
127
129
  /// Make a colour lighter by mixing it with white
@@ -132,7 +134,34 @@
132
134
  /// @access public
133
135
 
134
136
  @function govuk-tint($colour, $percentage) {
135
- @return mix(govuk-colour("white"), $colour, $percentage);
137
+ // Ensure the output is a hex string so that Safari <12 can render the colour
138
+ // without issues from float values in `rgb()`
139
+ @return _as-hexadecimal(mix(govuk-colour("white"), $colour, $percentage));
140
+ }
141
+
142
+ /// Converts a colour with potential float values for its RGB channels
143
+ /// into hexadecimal notation
144
+ ///
145
+ /// This ensures the colour is rendered properly by Safari < 12
146
+ ///
147
+ /// @param {Colour} $colour - The colour to convert
148
+ /// @return {Colour}
149
+ /// @access private
150
+ @function _as-hexadecimal($colour) {
151
+ @if not function-exists(change-color) {
152
+ @return $colour;
153
+ }
154
+
155
+ // `red`,`green` and `blue` functions are limited to 'legacy' colour spaces
156
+ // ensuring we don't get floating computations on them
157
+ $parts: (
158
+ "red": red($colour),
159
+ "green": green($colour),
160
+ "blue": blue($colour),
161
+ "alpha": alpha($colour)
162
+ );
163
+
164
+ @return change-color($colour, $parts...);
136
165
  }
137
166
 
138
167
  /*# sourceMappingURL=_colour.scss.map */
@@ -77,7 +77,10 @@
77
77
 
78
78
  @mixin govuk-visually-hidden-focusable($important: true) {
79
79
  // IE 11 doesn't support the combined `:not(:active, :focus)` syntax.
80
- &:not(:active):not(:focus) {
80
+ // Also allows for ':focus' companion classes from postcss-pseudo-classes
81
+ // which the plugin unfortunately doesn't handle automatically.
82
+ // stylelint-disable-next-line selector-class-pattern
83
+ &:not(:active):not(:focus):not(.\:focus) {
81
84
  @include _govuk-visually-hide-content($important: $important);
82
85
  }
83
86
  }
@@ -184,12 +184,12 @@ $govuk-link-active-colour: govuk-colour("black") !default;
184
184
  ///
185
185
  /// @type Colour
186
186
  /// @access private
187
- $_govuk-rebrand-template-background-colour: #f4f8fb; // Blue tint 95%
187
+ $_govuk-rebrand-template-background-colour: govuk-tint($govuk-brand-colour, 95%);
188
188
 
189
189
  /// Border colour for areas on a light-blue background
190
190
  ///
191
191
  /// @type Colour
192
192
  /// @access private
193
- $_govuk-rebrand-border-colour-on-blue-tint-95: #8eb8dc; // Blue tint 50%
193
+ $_govuk-rebrand-border-colour-on-blue-tint-95: govuk-tint($govuk-brand-colour, 50%);
194
194
 
195
195
  /*# sourceMappingURL=_colours-applied.scss.map */
@@ -20,4 +20,17 @@
20
20
 
21
21
  @import "links";
22
22
 
23
+ // LibSass evaluates this as a single unquoted string, equivalent to
24
+ // "true == false", whereas Dart Sass evaluates it as "true" == "false".
25
+ // Because a string in Sass is truthy, LibSass will output the warning; Dart
26
+ // Sass will not.
27
+ @if #{true} == #{false} {
28
+ @include _warning(
29
+ "libsass",
30
+ "It looks like you may be using LibSass to compile your Sass. LibSass is " +
31
+ "deprecated and will not be supported by the next major version of " +
32
+ "GOV.UK Frontend. See https://sass-lang.com/libsass/ for more information."
33
+ );
34
+ }
35
+
23
36
  /*# sourceMappingURL=_index.scss.map */
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-govuk-formbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive