govuk_tech_docs 3.4.0 → 3.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -1
  3. data/lib/assets/stylesheets/_govuk_tech_docs.scss +13 -0
  4. data/lib/govuk_tech_docs/version.rb +1 -1
  5. data/lib/source/favicon.ico +0 -0
  6. data/lib/source/layouts/_header.erb +13 -15
  7. data/node_modules/govuk-frontend/govuk/all-ie8.scss +8 -0
  8. data/node_modules/govuk-frontend/govuk/all.js +4918 -3796
  9. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +54 -49
  10. data/node_modules/govuk-frontend/govuk/common/govuk-frontend-version.js +17 -0
  11. data/node_modules/govuk-frontend/govuk/common/index.js +172 -152
  12. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +334 -321
  13. data/node_modules/govuk-frontend/govuk/common.js +171 -151
  14. data/node_modules/govuk-frontend/govuk/components/_all.scss +3 -2
  15. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +26 -7
  16. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +2203 -1650
  17. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +24 -16
  18. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +34 -11
  19. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +49 -9
  20. data/node_modules/govuk-frontend/govuk/components/button/button.js +961 -916
  21. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +2142 -2038
  22. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -6
  23. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +1204 -1145
  24. data/node_modules/govuk-frontend/govuk/components/details/details.js +826 -799
  25. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1097 -1044
  26. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_exit-this-page.scss +2 -0
  27. data/node_modules/govuk-frontend/govuk/components/exit-this-page/_index.scss +97 -0
  28. data/node_modules/govuk-frontend/govuk/components/exit-this-page/exit-this-page.js +2120 -0
  29. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +6 -1
  30. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -7
  31. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +6 -0
  32. data/node_modules/govuk-frontend/govuk/components/header/header.js +683 -1003
  33. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +15 -3
  34. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +786 -751
  35. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -5
  36. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +1151 -1105
  37. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +7 -1
  38. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +1045 -1014
  39. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +107 -0
  40. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +1514 -1268
  41. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +18 -18
  42. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +8 -1
  43. data/node_modules/govuk-frontend/govuk/core/_all.scss +1 -0
  44. data/node_modules/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  45. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -2
  46. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  47. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +1 -1
  48. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +12 -0
  49. data/node_modules/govuk-frontend/govuk/i18n.js +371 -364
  50. data/node_modules/govuk-frontend/govuk/objects/_template.scss +20 -0
  51. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +1 -1
  52. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +4 -0
  53. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +16 -0
  54. data/node_modules/govuk-frontend/govuk/settings/_links.scss +5 -1
  55. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +5 -5
  56. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +38 -2
  57. data/node_modules/govuk-frontend/govuk/vendor/polyfills/DOMTokenList.js +243 -241
  58. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +14 -12
  59. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js +18 -16
  60. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/classList.js +553 -545
  61. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +40 -36
  62. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +257 -250
  63. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/matches.js +22 -20
  64. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +204 -197
  65. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +204 -197
  66. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element.js +109 -105
  67. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Event.js +407 -399
  68. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Function/prototype/bind.js +242 -238
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Object/defineProperty.js +73 -71
  70. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +15 -13
  71. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Window.js +18 -16
  72. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +1 -0
  73. data/package-lock.json +7 -7
  74. data/package.json +1 -1
  75. metadata +8 -3
@@ -14,6 +14,26 @@
14
14
  -moz-text-size-adjust: 100%;
15
15
  text-size-adjust: 100%;
16
16
 
17
+ // Add scroll padding to the top of govuk-template but remove it if the
18
+ // exit this page component is present.
19
+ //
20
+ // This is a solution to exit this page potentially failing WCAG SC 2.4.12:
21
+ // Focus Not Obscured (https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)
22
+ // due to it's sticky positioning.
23
+ //
24
+ // This will apply scroll-padding-top in any browsers that don't support :has
25
+ // (https://caniuse.com/css-has). This is part of the reason we do this in
26
+ // a "wrong way round" way as we hypothesise that the risks of having
27
+ // scroll-padding unnecessarily is better than risking not having scroll-padding
28
+ // and needing it to account for exit this page.
29
+ @supports ((position: -webkit-sticky) or (position: sticky)) {
30
+ scroll-padding-top: govuk-spacing(9);
31
+
32
+ &:not(:has(.govuk-exit-this-page)) {
33
+ scroll-padding-top: 0;
34
+ }
35
+ }
36
+
17
37
  // Force the scrollbar to always display in IE, to prevent horizontal page
18
38
  // jumps as content height changes (e.g. autocomplete results open).
19
39
  @include govuk-media-query($media-type: screen) {
@@ -68,7 +68,7 @@
68
68
  }
69
69
  }
70
70
 
71
- @include govuk-if-ie8 {
71
+ @include _govuk-if-ie8 {
72
72
  width: $width;
73
73
  // Since media queries are not supported in IE8,
74
74
  // we need to duplicate this margin that centers the page.
@@ -54,6 +54,10 @@ $govuk-colours-organisations: (
54
54
  colour: #cf102d,
55
55
  colour-websafe: #005ea5
56
56
  ),
57
+ "department-for-business-and-trade": (
58
+ colour: #cf102d,
59
+ colour-websafe: #005ea5
60
+ ),
57
61
  "department-for-levelling-up-housing-and-communities": (
58
62
  colour: #012169,
59
63
  ),
@@ -6,13 +6,29 @@
6
6
  ///
7
7
  /// @type Boolean
8
8
  /// @access public
9
+ /// @deprecated Will be removed in v5.0
9
10
 
10
11
  $govuk-is-ie8: false !default;
11
12
 
13
+ @if $govuk-is-ie8 == true {
14
+ @include _warning(
15
+ ie8,
16
+ "The $govuk-is-ie8 setting is deprecated and will be removed in v5.0."
17
+ );
18
+ }
19
+
12
20
  /// The name of the breakpoint to use as the target when rasterizing media
13
21
  /// queries
14
22
  ///
15
23
  /// @type String
16
24
  /// @access public
25
+ /// @deprecated Will be removed in v5.0
17
26
 
18
27
  $govuk-ie8-breakpoint: desktop !default;
28
+
29
+ @if not $govuk-ie8-breakpoint == desktop {
30
+ @include _warning(
31
+ ie8,
32
+ "The $govuk-ie8-breakpoint setting is deprecated and will be removed in v5.0."
33
+ );
34
+ }
@@ -38,12 +38,16 @@ $govuk-link-underline-thickness: unquote("max(1px, .0625rem)") !default;
38
38
 
39
39
  /// Offset of link underlines from text baseline
40
40
  ///
41
+ /// The default is 3px expressed as ems, as calculated against the default body
42
+ /// font size (on desktop) of 19px.
43
+ /// 3 ÷ 19 = 0.1578
44
+ ///
41
45
  /// Set this variable to `false` to avoid setting an offset.
42
46
  ///
43
47
  /// @type Number
44
48
  /// @access public
45
49
 
46
- $govuk-link-underline-offset: .1em !default;
50
+ $govuk-link-underline-offset: .1578em !default;
47
51
 
48
52
  /// Thickness of link underlines in hover state
49
53
  ///
@@ -19,11 +19,11 @@ $govuk-page-width: 960px !default;
19
19
  /// @access public
20
20
 
21
21
  $govuk-grid-widths: (
22
- one-quarter: 25%,
23
- one-third: 33.3333%,
24
- one-half: 50%,
25
- two-thirds: 66.6666%,
26
- three-quarters: 75%,
22
+ one-quarter: (100% / 4),
23
+ one-third: (100% / 3),
24
+ one-half: (100% / 2),
25
+ two-thirds: (200% / 3),
26
+ three-quarters: (300% / 4),
27
27
  full: 100%
28
28
  ) !default;
29
29
 
@@ -1,7 +1,20 @@
1
+ @import "../settings/warnings";
2
+
1
3
  ////
2
4
  /// @group tools/internet-explorer-8
3
5
  ////
4
6
 
7
+ /// A private version of the govuk-if-ie8 mixin to avoid deprecation
8
+ /// warnings where we use it internally
9
+ ///
10
+ /// @access private
11
+
12
+ @mixin _govuk-if-ie8 {
13
+ @if $govuk-is-ie8 {
14
+ @content;
15
+ }
16
+ }
17
+
5
18
  /// Conditionally include rules only for IE8
6
19
  ///
7
20
  /// @content Passed content is only outputted if we're compiling a stylesheet
@@ -18,9 +31,26 @@
18
31
  /// }
19
32
  ///
20
33
  /// @access public
34
+ /// @deprecated Will be removed in v5.0
21
35
 
22
36
  @mixin govuk-if-ie8 {
23
- @if $govuk-is-ie8 {
37
+ @include _warning(
38
+ ie8,
39
+ "The govuk-if-ie8 mixin is deprecated and will be removed in v5.0."
40
+ );
41
+
42
+ @include _govuk-if-ie8 {
43
+ @content;
44
+ }
45
+ }
46
+
47
+ /// A private version of the govuk-not-ie8 mixin to avoid deprecation
48
+ /// warnings where we use it internally
49
+ ///
50
+ /// @access private
51
+
52
+ @mixin _govuk-not-ie8 {
53
+ @if not $govuk-is-ie8 {
24
54
  @content;
25
55
  }
26
56
  }
@@ -43,9 +73,15 @@
43
73
  /// }
44
74
  ///
45
75
  /// @access public
76
+ /// @deprecated Will be removed in v5.0
46
77
 
47
78
  @mixin govuk-not-ie8 {
48
- @if not $govuk-is-ie8 {
79
+ @include _warning(
80
+ ie8,
81
+ "The govuk-not-ie8 mixin is deprecated and will be removed in v5.0."
82
+ );
83
+
84
+ @include _govuk-not-ie8 {
49
85
  @content;
50
86
  }
51
87
  }