govuk_tech_docs 3.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yaml +1 -1
  3. data/CHANGELOG.md +20 -7
  4. data/README.md +2 -2
  5. data/lib/govuk_tech_docs/contribution_banner.rb +1 -1
  6. data/lib/govuk_tech_docs/version.rb +1 -1
  7. data/lib/source/layouts/core.erb +1 -1
  8. data/node_modules/govuk-frontend/govuk/all.js +1548 -311
  9. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +70 -0
  10. data/node_modules/govuk-frontend/govuk/common/index.js +172 -0
  11. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +373 -0
  12. data/node_modules/govuk-frontend/govuk/common.js +138 -3
  13. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  14. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +5 -6
  15. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +754 -36
  16. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -2
  17. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +29 -21
  18. data/node_modules/govuk-frontend/govuk/components/button/button.js +365 -107
  19. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +9 -0
  20. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1092 -109
  21. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +3 -2
  22. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +30 -2
  23. data/node_modules/govuk-frontend/govuk/components/details/details.js +51 -33
  24. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +289 -6
  25. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +13 -23
  26. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +30 -24
  27. data/node_modules/govuk-frontend/govuk/components/header/header.js +59 -11
  28. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +13 -23
  29. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +252 -2
  30. data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  31. data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  32. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +1 -1
  33. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -12
  34. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +30 -2
  35. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +11 -0
  36. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -3
  37. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +10 -4
  38. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +45 -13
  39. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +1 -1
  40. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +28 -0
  41. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +1 -1
  42. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -5
  43. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +5 -0
  44. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +13 -11
  45. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -2
  46. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  47. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -3
  48. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +16 -9
  49. data/node_modules/govuk-frontend/govuk/i18n.js +390 -0
  50. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +10 -26
  51. data/node_modules/govuk-frontend/govuk/objects/_template.scss +1 -1
  52. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +0 -4
  53. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +56 -12
  54. data/node_modules/govuk-frontend/govuk/settings/_all.scss +1 -0
  55. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +12 -0
  56. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +26 -0
  57. data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +4 -8
  58. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +23 -0
  59. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +12 -0
  60. data/node_modules/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  61. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +20 -6
  62. data/node_modules/govuk-frontend/govuk/tools/_exports.scss +1 -1
  63. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  64. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  65. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +2 -2
  66. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  67. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +21 -0
  68. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +300 -0
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +21 -0
  70. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +7 -0
  71. data/node_modules/govuk-frontend/govuk-prototype-kit/init.scss +12 -0
  72. data/package-lock.json +12 -12
  73. data/package.json +1 -1
  74. metadata +14 -2
@@ -0,0 +1,247 @@
1
+ @include govuk-exports("govuk/component/pagination") {
2
+ // Flexbox enhancement for small screen visual design
3
+ // Falls back to a float: left layout on non-flex browsers
4
+ .govuk-pagination {
5
+ @include govuk-responsive-margin(6, "bottom");
6
+ display: -ms-flexbox;
7
+ display: flex;
8
+ -ms-flex-direction: column;
9
+ flex-direction: column;
10
+ -ms-flex-align: center;
11
+ align-items: center;
12
+ -ms-flex-wrap: wrap;
13
+ flex-wrap: wrap;
14
+
15
+ @include govuk-media-query($from: tablet) {
16
+ -ms-flex-direction: row;
17
+ flex-direction: row;
18
+ -ms-flex-align: start;
19
+ align-items: flex-start;
20
+ }
21
+ }
22
+
23
+ .govuk-pagination__list {
24
+ margin: 0;
25
+ padding: 0;
26
+ list-style: none;
27
+ }
28
+
29
+ .govuk-pagination__item,
30
+ .govuk-pagination__next,
31
+ .govuk-pagination__prev {
32
+ @include govuk-font(19);
33
+ box-sizing: border-box;
34
+ position: relative;
35
+ min-width: 45px;
36
+ min-height: 45px;
37
+ padding: govuk-spacing(2) govuk-spacing(3);
38
+ float: left; // Float is ignored if flex is active for prev/next links
39
+
40
+ &:hover {
41
+ background-color: govuk-colour("light-grey", $legacy: "grey-4");
42
+ }
43
+ }
44
+
45
+ .govuk-pagination__item {
46
+ // Hide items on small screens except the prev/next items,
47
+ // non-link items and the first and last items
48
+ display: none;
49
+
50
+ // Center align pagination links in their parent list item so that they
51
+ // visually sit in the middle of their touch area
52
+ text-align: center;
53
+
54
+ @include govuk-media-query($from: tablet) {
55
+ display: block;
56
+ }
57
+ }
58
+
59
+ .govuk-pagination__prev,
60
+ .govuk-pagination__next {
61
+ @include govuk-typography-weight-bold;
62
+
63
+ // Use flex to get around a whitespace issue between the arrow svg and the link text
64
+ // without having to rely on whitespace control from backend tooling
65
+ .govuk-pagination__link {
66
+ display: -ms-flexbox;
67
+ display: flex;
68
+ -ms-flex-align: center;
69
+ align-items: center;
70
+ }
71
+ }
72
+
73
+ .govuk-pagination__prev {
74
+ padding-left: 0;
75
+ }
76
+
77
+ .govuk-pagination__next {
78
+ padding-right: 0;
79
+ }
80
+
81
+ // Only show first, last and non-link items on mobile
82
+ .govuk-pagination__item--current,
83
+ .govuk-pagination__item--ellipses,
84
+ .govuk-pagination__item:first-child,
85
+ .govuk-pagination__item:last-child {
86
+ display: block;
87
+ }
88
+
89
+ .govuk-pagination__item--current {
90
+ @include govuk-typography-weight-bold;
91
+ outline: 1px solid transparent;
92
+ background-color: $govuk-link-colour;
93
+
94
+ &:hover {
95
+ background-color: $govuk-link-colour;
96
+ }
97
+
98
+ .govuk-pagination__link {
99
+ @include govuk-link-style-inverse;
100
+ }
101
+ }
102
+
103
+ .govuk-pagination__item--ellipses {
104
+ @include govuk-typography-weight-bold;
105
+ color: $govuk-secondary-text-colour;
106
+
107
+ // Remove hover state for ellipsis items as they don't have links within them
108
+ &:hover {
109
+ background-color: transparent;
110
+ }
111
+ }
112
+
113
+ .govuk-pagination__link {
114
+ display: block;
115
+ min-width: govuk-spacing(3);
116
+
117
+ // Increase the touch area for the link to the parent element.
118
+ @media screen {
119
+ &:after {
120
+ content: "";
121
+ position: absolute;
122
+ top: 0;
123
+ right: 0;
124
+ bottom: 0;
125
+ left: 0;
126
+ }
127
+ }
128
+
129
+ // Add link hover decoration to prev/next text if no label present on prev/next only mode
130
+ // We do this so that we have a hover state in all possible instances
131
+ &:hover,
132
+ &:active {
133
+ .govuk-pagination__link-title--decorated {
134
+ @include govuk-link-decoration;
135
+ }
136
+
137
+ .govuk-pagination__link-label,
138
+ .govuk-pagination__link-title--decorated {
139
+ @include govuk-link-hover-decoration;
140
+ }
141
+ }
142
+
143
+ &:focus {
144
+ .govuk-pagination__icon {
145
+ color: $govuk-focus-text-colour;
146
+ }
147
+
148
+ .govuk-pagination__link-label {
149
+ text-decoration: none;
150
+ }
151
+
152
+ .govuk-pagination__link-title--decorated {
153
+ text-decoration: none;
154
+ }
155
+ }
156
+ }
157
+
158
+ .govuk-pagination__link-label {
159
+ @include govuk-font($size: 19, $weight: "regular");
160
+ @include govuk-link-decoration;
161
+ display: inline-block;
162
+ padding-left: govuk-spacing(6);
163
+ }
164
+
165
+ .govuk-pagination__icon {
166
+ // Set size using rems to make the icon scale with text if user resizes text in their browser
167
+ width: govuk-px-to-rem(15px);
168
+ height: govuk-px-to-rem(13px);
169
+ color: $govuk-secondary-text-colour;
170
+ fill: currentcolor;
171
+ forced-color-adjust: auto;
172
+ }
173
+
174
+ .govuk-pagination__icon--prev {
175
+ margin-right: govuk-spacing(3);
176
+ }
177
+
178
+ .govuk-pagination__icon--next {
179
+ margin-left: govuk-spacing(3);
180
+ }
181
+
182
+ // Block mode - position previous and next links above and below numbers
183
+ .govuk-pagination--block {
184
+ display: block;
185
+
186
+ .govuk-pagination__item {
187
+ padding: govuk-spacing(3);
188
+ float: none;
189
+ }
190
+
191
+ .govuk-pagination__next,
192
+ .govuk-pagination__prev {
193
+ padding-left: 0;
194
+ float: none;
195
+ }
196
+
197
+ .govuk-pagination__next {
198
+ padding-right: govuk-spacing(3);
199
+
200
+ .govuk-pagination__icon {
201
+ margin-left: 0;
202
+ }
203
+ }
204
+
205
+ // Only apply a border between prev and next if both are present
206
+ .govuk-pagination__prev + .govuk-pagination__next {
207
+ border-top: 1px solid $govuk-border-colour;
208
+ }
209
+
210
+ // Reset both these elements to their inline default, both to ensure that the focus state
211
+ // for block mode "shrink wraps" text as expected
212
+ .govuk-pagination__link,
213
+ .govuk-pagination__link-title {
214
+ display: inline;
215
+ }
216
+
217
+ // Set the after pseudo element to a block which makes the title visually display
218
+ // as block level whilst programmatically being inline
219
+ // We do this to get around an NVDA quirk where adjacent block level
220
+ // elements are always read out separately
221
+ .govuk-pagination__link-title:after {
222
+ content: "";
223
+ display: block;
224
+ }
225
+
226
+ .govuk-pagination__link {
227
+ text-align: left;
228
+
229
+ &:focus {
230
+ // apply focus styling to the label within the link as if it were being focused
231
+ // to get around a display issue with a focusable inline element containing a mixture
232
+ // of inline and inline-block level elements
233
+ .govuk-pagination__link-label {
234
+ @include govuk-focused-text;
235
+ }
236
+ }
237
+
238
+ &:not(:focus) {
239
+ text-decoration: none;
240
+ }
241
+ }
242
+
243
+ .govuk-pagination__icon {
244
+ margin-right: govuk-spacing(2);
245
+ }
246
+ }
247
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -33,7 +33,7 @@
33
33
  background: govuk-colour("green", $legacy: "turquoise");
34
34
 
35
35
  @include govuk-media-query($media-type: print) {
36
- border-color: currentColor;
36
+ border-color: currentcolor;
37
37
  color: $govuk-print-text-colour;
38
38
  background: none;
39
39
  }
@@ -87,7 +87,7 @@
87
87
  width: $govuk-radios-size;
88
88
  height: $govuk-radios-size;
89
89
 
90
- border: $govuk-border-width-form-element solid currentColor;
90
+ border: $govuk-border-width-form-element solid currentcolor;
91
91
  border-radius: 50%;
92
92
  background: transparent;
93
93
  }
@@ -106,10 +106,10 @@
106
106
  width: 0;
107
107
  height: 0;
108
108
 
109
- border: govuk-spacing(2) solid currentColor;
109
+ border: govuk-spacing(2) solid currentcolor;
110
110
  border-radius: 50%;
111
111
  opacity: 0;
112
- background: currentColor;
112
+ background: currentcolor;
113
113
  }
114
114
 
115
115
  .govuk-radios__hint {
@@ -149,7 +149,8 @@
149
149
  cursor: default;
150
150
  }
151
151
 
152
- .govuk-radios__input:disabled + .govuk-radios__label {
152
+ .govuk-radios__input:disabled + .govuk-radios__label,
153
+ .govuk-radios__input:disabled ~ .govuk-hint {
153
154
  opacity: .5;
154
155
  }
155
156
 
@@ -167,14 +168,6 @@
167
168
  clear: none;
168
169
  }
169
170
  }
170
-
171
- // Prevent inline modifier being used with conditional reveals
172
- &.govuk-radios--conditional {
173
- .govuk-radios__item {
174
- margin-right: 0;
175
- float: none;
176
- }
177
- }
178
171
  }
179
172
 
180
173
  // =========================================================
@@ -1014,10 +1014,24 @@ if (detect) return
1014
1014
 
1015
1015
  }).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
1016
1016
 
1017
+ /**
1018
+ * Common helpers which do not require polyfill.
1019
+ *
1020
+ * IMPORTANT: If a helper require a polyfill, please isolate it in its own module
1021
+ * so that the polyfill can be properly tree-shaken and does not burden
1022
+ * the components that do not need that helper
1023
+ *
1024
+ * @module common/index
1025
+ */
1026
+
1017
1027
  /**
1018
1028
  * TODO: Ideally this would be a NodeList.prototype.forEach polyfill
1019
1029
  * This seems to fail in IE8, requires more investigation.
1020
1030
  * See: https://github.com/imagitama/nodelist-foreach-polyfill
1031
+ *
1032
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
1033
+ * @param {nodeListIterator} callback - Callback function to run for each node
1034
+ * @returns {undefined}
1021
1035
  */
1022
1036
  function nodeListForEach (nodes, callback) {
1023
1037
  if (window.NodeList.prototype.forEach) {
@@ -1028,6 +1042,20 @@ function nodeListForEach (nodes, callback) {
1028
1042
  }
1029
1043
  }
1030
1044
 
1045
+ /**
1046
+ * @callback nodeListIterator
1047
+ * @param {Element} value - The current node being iterated on
1048
+ * @param {number} index - The current index in the iteration
1049
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
1050
+ * @returns {undefined}
1051
+ */
1052
+
1053
+ /**
1054
+ * Radios component
1055
+ *
1056
+ * @class
1057
+ * @param {HTMLElement} $module - HTML element to use for radios
1058
+ */
1031
1059
  function Radios ($module) {
1032
1060
  this.$module = $module;
1033
1061
  this.$inputs = $module.querySelectorAll('input[type="radio"]');
@@ -1098,7 +1126,7 @@ Radios.prototype.syncAllConditionalReveals = function () {
1098
1126
  * Synchronise the visibility of the conditional reveal, and its accessible
1099
1127
  * state, with the input's checked state.
1100
1128
  *
1101
- * @param {HTMLInputElement} $input Radio input
1129
+ * @param {HTMLInputElement} $input - Radio input
1102
1130
  */
1103
1131
  Radios.prototype.syncConditionalRevealWithInputState = function ($input) {
1104
1132
  var $target = document.getElementById($input.getAttribute('aria-controls'));
@@ -1119,7 +1147,7 @@ Radios.prototype.syncConditionalRevealWithInputState = function ($input) {
1119
1147
  * with the same name (because checking one radio could have un-checked a radio
1120
1148
  * in another $module)
1121
1149
  *
1122
- * @param {MouseEvent} event Click event
1150
+ * @param {MouseEvent} event - Click event
1123
1151
  */
1124
1152
  Radios.prototype.handleClick = function (event) {
1125
1153
  var $clickedInput = event.target;
@@ -7,6 +7,12 @@
7
7
  @include govuk-font($size: 19, $line-height: 1.25);
8
8
 
9
9
  box-sizing: border-box; // should this be global?
10
+
11
+ // This min-width was chosen because:
12
+ // - it makes the Select noticeably wider than it is taller (which is what users expect)
13
+ // - 11.5em matches the 'length-10' variant of the input component
14
+ // - it fits comfortably on screens as narrow as 240px wide
15
+ min-width: 11.5em;
10
16
  max-width: 100%;
11
17
  height: 40px;
12
18
  @if $govuk-typography-use-rem {
@@ -15,6 +21,11 @@
15
21
  padding: govuk-spacing(1); // was 5px 4px 4px - size of it should be adjusted to match other form elements
16
22
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
17
23
 
24
+ // Default user agent colours for selects can have low contrast,
25
+ // and may look disabled (#2435)
26
+ color: $govuk-text-colour;
27
+ background-color: govuk-colour("white");
28
+
18
29
  &:focus {
19
30
  outline: $govuk-focus-width solid $govuk-focus-colour;
20
31
  // Ensure outline appears outside of the element
@@ -11,9 +11,7 @@
11
11
 
12
12
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
13
13
  @supports (padding: unquote("max(calc(0px))")) {
14
- $padding-safe-area-right: -webkit-calc(#{govuk-spacing(3)} + env(safe-area-inset-right));
15
14
  $padding-safe-area-right: calc(#{govuk-spacing(3)} + env(safe-area-inset-right));
16
- $padding-safe-area-left: -webkit-calc(#{govuk-spacing(3)} + env(safe-area-inset-left));
17
15
  $padding-safe-area-left: calc(#{govuk-spacing(3)} + env(safe-area-inset-left));
18
16
 
19
17
  // Use max() to pick largest padding, default or with safe area
@@ -28,7 +26,7 @@
28
26
  background-color: $govuk-focus-colour;
29
27
 
30
28
  // Undo unwanted changes when global styles are enabled
31
- @if ($govuk-global-styles) {
29
+ @if $govuk-global-styles {
32
30
  box-shadow: none;
33
31
  }
34
32
  }
@@ -1014,6 +1014,12 @@ if (detect) return
1014
1014
  })
1015
1015
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
1016
1016
 
1017
+ /**
1018
+ * Skip link component
1019
+ *
1020
+ * @class
1021
+ * @param {HTMLElement} $module - HTML element to use for skip link
1022
+ */
1017
1023
  function SkipLink ($module) {
1018
1024
  this.$module = $module;
1019
1025
  this.$linkedElement = null;
@@ -1039,10 +1045,10 @@ SkipLink.prototype.init = function () {
1039
1045
  };
1040
1046
 
1041
1047
  /**
1042
- * Get linked element
1043
- *
1044
- * @returns {HTMLElement} $linkedElement - DOM element linked to from the skip link
1045
- */
1048
+ * Get linked element
1049
+ *
1050
+ * @returns {HTMLElement} $linkedElement - DOM element linked to from the skip link
1051
+ */
1046
1052
  SkipLink.prototype.getLinkedElement = function () {
1047
1053
  var linkedElementId = this.getFragmentFromUrl();
1048
1054
 
@@ -23,11 +23,21 @@
23
23
  }
24
24
  }
25
25
 
26
+ // Remove right padding from the last column in the row
27
+ .govuk-summary-list__row:not(.govuk-summary-list__row--no-actions) > :last-child {
28
+ padding-right: 0;
29
+ }
30
+
26
31
  // Provide an empty 'cell' for rows that don't have actions – otherwise the
27
32
  // bottom border is not drawn for that part of the row in some browsers.
28
- .govuk-summary-list__row--no-actions:after {
29
- content: "";
30
- display: table-cell;
33
+ .govuk-summary-list__row--no-actions {
34
+ @include govuk-media-query($from: tablet) {
35
+ &:after {
36
+ content: "";
37
+ display: table-cell;
38
+ width: 20%;
39
+ }
40
+ }
31
41
  }
32
42
 
33
43
  .govuk-summary-list__key,
@@ -47,7 +57,7 @@
47
57
  margin-bottom: govuk-spacing(3);
48
58
  @include govuk-media-query($from: tablet) {
49
59
  width: 20%;
50
- padding-right: 0;
60
+ padding-right: 0; // Needed for IE8
51
61
  text-align: right;
52
62
  }
53
63
  }
@@ -88,21 +98,43 @@
88
98
  }
89
99
 
90
100
  .govuk-summary-list__actions-list-item {
91
- display: inline;
92
- margin-right: govuk-spacing(2);
93
- padding-right: govuk-spacing(2);
101
+ display: inline-block;
94
102
  }
95
103
 
96
104
  // In older browsers such as IE8, :last-child is not available,
97
105
  // so only show the border divider where it is available.
98
- .govuk-summary-list__actions-list-item:not(:last-child) {
99
- border-right: 1px solid $govuk-border-colour;
106
+ @include govuk-media-query($until: tablet) {
107
+ .govuk-summary-list__actions-list-item {
108
+ margin-right: govuk-spacing(2);
109
+ padding-right: govuk-spacing(2);
110
+ }
111
+
112
+ .govuk-summary-list__actions-list-item:not(:last-child) {
113
+ border-right: 1px solid $govuk-border-colour;
114
+ }
115
+
116
+ .govuk-summary-list__actions-list-item:last-child {
117
+ margin-right: 0;
118
+ padding-right: 0;
119
+ border: 0;
120
+ }
100
121
  }
101
122
 
102
- .govuk-summary-list__actions-list-item:last-child {
103
- margin-right: 0;
104
- padding-right: 0;
105
- border: 0;
123
+ @include govuk-media-query($from: tablet) {
124
+ .govuk-summary-list__actions-list-item {
125
+ margin-left: govuk-spacing(2);
126
+ padding-left: govuk-spacing(2);
127
+ }
128
+
129
+ .govuk-summary-list__actions-list-item:not(:first-child) {
130
+ border-left: 1px solid $govuk-border-colour;
131
+ }
132
+
133
+ .govuk-summary-list__actions-list-item:first-child {
134
+ margin-left: 0;
135
+ padding-left: 0;
136
+ border: 0;
137
+ }
106
138
  }
107
139
 
108
140
  // No border on entire summary list
@@ -21,7 +21,7 @@
21
21
  vertical-align: top;
22
22
  // GOV.UK Elements sets the font-size and line-height for all headers and cells
23
23
  // in tables.
24
- @include govuk-compatibility(govuk_elements) {
24
+ @include _govuk-compatibility(govuk_elements) {
25
25
  font-size: inherit;
26
26
  line-height: inherit;
27
27
  }
@@ -1054,10 +1054,24 @@ if (detect) return
1054
1054
  })
1055
1055
  .call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
1056
1056
 
1057
+ /**
1058
+ * Common helpers which do not require polyfill.
1059
+ *
1060
+ * IMPORTANT: If a helper require a polyfill, please isolate it in its own module
1061
+ * so that the polyfill can be properly tree-shaken and does not burden
1062
+ * the components that do not need that helper
1063
+ *
1064
+ * @module common/index
1065
+ */
1066
+
1057
1067
  /**
1058
1068
  * TODO: Ideally this would be a NodeList.prototype.forEach polyfill
1059
1069
  * This seems to fail in IE8, requires more investigation.
1060
1070
  * See: https://github.com/imagitama/nodelist-foreach-polyfill
1071
+ *
1072
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
1073
+ * @param {nodeListIterator} callback - Callback function to run for each node
1074
+ * @returns {undefined}
1061
1075
  */
1062
1076
  function nodeListForEach (nodes, callback) {
1063
1077
  if (window.NodeList.prototype.forEach) {
@@ -1068,6 +1082,20 @@ function nodeListForEach (nodes, callback) {
1068
1082
  }
1069
1083
  }
1070
1084
 
1085
+ /**
1086
+ * @callback nodeListIterator
1087
+ * @param {Element} value - The current node being iterated on
1088
+ * @param {number} index - The current index in the iteration
1089
+ * @param {NodeListOf<Element>} nodes - NodeList from querySelectorAll()
1090
+ * @returns {undefined}
1091
+ */
1092
+
1093
+ /**
1094
+ * Tabs component
1095
+ *
1096
+ * @class
1097
+ * @param {HTMLElement} $module - HTML element to use for tabs
1098
+ */
1071
1099
  function Tabs ($module) {
1072
1100
  this.$module = $module;
1073
1101
  this.$tabs = $module.querySelectorAll('.govuk-tabs__tab');
@@ -6,7 +6,7 @@
6
6
 
7
7
  // fix double-width section break and forced visible section break
8
8
  // when combined with styles from alphagov/elements
9
- @include govuk-compatibility(govuk_elements) {
9
+ @include _govuk-compatibility(govuk_elements) {
10
10
  height: 0;
11
11
  }
12
12
  }
@@ -29,8 +29,8 @@
29
29
  /// @access public
30
30
 
31
31
  @function govuk-colour($colour, $legacy: false) {
32
- @if ($govuk-use-legacy-palette and $legacy) {
33
- @if (type-of($legacy) == "color") {
32
+ @if $govuk-use-legacy-palette and $legacy {
33
+ @if type-of($legacy) == "color" {
34
34
  @return $legacy;
35
35
  }
36
36
  $colour: $legacy;
@@ -65,7 +65,7 @@
65
65
 
66
66
  $org-colour: map-get($govuk-colours-organisations, $organisation);
67
67
 
68
- @if ($websafe and map-has-key($org-colour, colour-websafe)) {
68
+ @if $websafe and map-has-key($org-colour, colour-websafe) {
69
69
  @return map-get($org-colour, colour-websafe);
70
70
  } @else {
71
71
  @return map-get($org-colour, colour);
@@ -75,7 +75,7 @@
75
75
  /// Make a colour darker by mixing it with black
76
76
  ///
77
77
  /// @param {Colour} $colour - colour to shade
78
- /// @param {Number} $percentage - percentage of `$colour` in returned colour
78
+ /// @param {Number} $percentage - percentage of black to mix with $colour
79
79
  /// @return {Colour}
80
80
  /// @access public
81
81
 
@@ -86,7 +86,7 @@
86
86
  /// Make a colour lighter by mixing it with white
87
87
  ///
88
88
  /// @param {Colour} $colour - colour to tint
89
- /// @param {Number} $percentage - percentage of `$colour` in returned colour
89
+ /// @param {Number} $percentage - percentage of white to mix with $colour
90
90
  /// @return {Colour}
91
91
  /// @access public
92
92
 
@@ -25,4 +25,9 @@
25
25
  // When link is focussed, hide the default underline since the
26
26
  // box shadow adds the "underline"
27
27
  text-decoration: none;
28
+
29
+ // When a focused box is broken by e.g. a line break, ensure that the
30
+ // box-shadow is applied to each fragment independently.
31
+ -webkit-box-decoration-break: clone;
32
+ box-decoration-break: clone;
28
33
  }