govuk_publishing_components 35.16.0 → 35.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +19 -15
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-video-tracker.js +7 -1
  4. data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +9 -9
  5. data/app/assets/stylesheets/component_guide/application.scss +6 -6
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_action-link.scss +15 -15
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +3 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_breadcrumbs.scss +3 -3
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +2 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +5 -5
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_document-list.scss +2 -2
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +5 -5
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +40 -35
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +1 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +23 -19
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +6 -6
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -1
  20. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss +3 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +4 -4
  22. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_media-down.scss +2 -2
  23. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  24. data/app/views/govuk_publishing_components/components/_contents_list.html.erb +20 -10
  25. data/app/views/govuk_publishing_components/components/_option_select.html.erb +3 -3
  26. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +6 -6
  27. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -0
  28. data/config/locales/ar.yml +1 -0
  29. data/config/locales/az.yml +1 -0
  30. data/config/locales/be.yml +1 -0
  31. data/config/locales/bg.yml +1 -0
  32. data/config/locales/bn.yml +1 -0
  33. data/config/locales/cs.yml +1 -0
  34. data/config/locales/cy.yml +1 -0
  35. data/config/locales/da.yml +1 -0
  36. data/config/locales/de.yml +1 -0
  37. data/config/locales/dr.yml +1 -0
  38. data/config/locales/el.yml +1 -0
  39. data/config/locales/en.yml +2 -1
  40. data/config/locales/es-419.yml +1 -0
  41. data/config/locales/es.yml +1 -0
  42. data/config/locales/et.yml +1 -0
  43. data/config/locales/fa.yml +1 -0
  44. data/config/locales/fi.yml +1 -0
  45. data/config/locales/fr.yml +1 -0
  46. data/config/locales/gd.yml +1 -0
  47. data/config/locales/gu.yml +1 -0
  48. data/config/locales/he.yml +1 -0
  49. data/config/locales/hi.yml +1 -0
  50. data/config/locales/hr.yml +1 -0
  51. data/config/locales/hu.yml +1 -0
  52. data/config/locales/hy.yml +1 -0
  53. data/config/locales/id.yml +1 -0
  54. data/config/locales/is.yml +1 -0
  55. data/config/locales/it.yml +1 -0
  56. data/config/locales/ja.yml +1 -0
  57. data/config/locales/ka.yml +1 -0
  58. data/config/locales/kk.yml +1 -0
  59. data/config/locales/ko.yml +1 -0
  60. data/config/locales/lt.yml +1 -0
  61. data/config/locales/lv.yml +1 -0
  62. data/config/locales/ms.yml +1 -0
  63. data/config/locales/mt.yml +1 -0
  64. data/config/locales/nl.yml +1 -0
  65. data/config/locales/no.yml +1 -0
  66. data/config/locales/pa-pk.yml +1 -0
  67. data/config/locales/pa.yml +1 -0
  68. data/config/locales/pl.yml +1 -0
  69. data/config/locales/ps.yml +1 -0
  70. data/config/locales/pt.yml +1 -0
  71. data/config/locales/ro.yml +1 -0
  72. data/config/locales/ru.yml +1 -0
  73. data/config/locales/si.yml +1 -0
  74. data/config/locales/sk.yml +1 -0
  75. data/config/locales/sl.yml +1 -0
  76. data/config/locales/so.yml +1 -0
  77. data/config/locales/sq.yml +1 -0
  78. data/config/locales/sr.yml +1 -0
  79. data/config/locales/sv.yml +1 -0
  80. data/config/locales/sw.yml +1 -0
  81. data/config/locales/ta.yml +1 -0
  82. data/config/locales/th.yml +1 -0
  83. data/config/locales/tk.yml +1 -0
  84. data/config/locales/tr.yml +1 -0
  85. data/config/locales/uk.yml +1 -0
  86. data/config/locales/ur.yml +1 -0
  87. data/config/locales/uz.yml +1 -0
  88. data/config/locales/vi.yml +1 -0
  89. data/config/locales/zh-hk.yml +1 -0
  90. data/config/locales/zh-tw.yml +1 -0
  91. data/config/locales/zh.yml +1 -0
  92. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +8 -0
  93. data/lib/govuk_publishing_components/presenters/meta_tags.rb +3 -0
  94. data/lib/govuk_publishing_components/version.rb +1 -1
  95. metadata +2 -2
@@ -182,7 +182,7 @@ $after-button-padding-left: govuk-spacing(4);
182
182
  }
183
183
  }
184
184
 
185
- &:after {
185
+ &::after {
186
186
  @include make-selectable-area-bigger;
187
187
  @include pseudo-underline($left: $after-link-padding, $right: $after-link-padding);
188
188
  }
@@ -193,14 +193,14 @@ $after-button-padding-left: govuk-spacing(4);
193
193
  font-size: govuk-px-to-rem(16px);
194
194
  height: govuk-spacing(4);
195
195
 
196
- &:before {
196
+ &::before {
197
197
  @include chevron(govuk-colour("white"), true);
198
198
  }
199
199
 
200
200
  &:hover {
201
201
  color: govuk-colour("mid-grey");
202
202
 
203
- &:after {
203
+ &::after {
204
204
  background: govuk-colour("mid-grey");
205
205
  }
206
206
  }
@@ -216,7 +216,7 @@ $after-button-padding-left: govuk-spacing(4);
216
216
  box-shadow: none;
217
217
  color: $govuk-focus-text-colour;
218
218
 
219
- &:after {
219
+ &::after {
220
220
  background: $govuk-focus-text-colour;
221
221
  }
222
222
  }
@@ -235,12 +235,12 @@ $after-button-padding-left: govuk-spacing(4);
235
235
  &:hover {
236
236
  color: govuk-colour("mid-grey");
237
237
 
238
- &:after {
238
+ &::after {
239
239
  background: govuk-colour("mid-grey");
240
240
  }
241
241
  }
242
242
 
243
- &:after {
243
+ &::after {
244
244
  background: none;
245
245
  }
246
246
  }
@@ -255,14 +255,14 @@ $after-button-padding-left: govuk-spacing(4);
255
255
  padding: 0;
256
256
  margin: 0;
257
257
 
258
- &:after {
258
+ &::after {
259
259
  @include pseudo-underline($left: $after-button-padding-left, $right: $after-button-padding-right, $width: 100%);
260
260
  }
261
261
  }
262
262
  // stylelint-enable max-nesting-depth
263
263
  }
264
264
 
265
- &:after {
265
+ &::after {
266
266
  @include make-selectable-area-bigger;
267
267
  }
268
268
  }
@@ -299,7 +299,7 @@ $after-button-padding-left: govuk-spacing(4);
299
299
  &:hover {
300
300
  background: govuk-colour("black");
301
301
 
302
- &:before {
302
+ &::before {
303
303
  left: 0;
304
304
  right: 0;
305
305
  }
@@ -308,12 +308,12 @@ $after-button-padding-left: govuk-spacing(4);
308
308
  &:focus {
309
309
  background: $govuk-focus-colour;
310
310
 
311
- &:before {
311
+ &::before {
312
312
  content: none;
313
313
  }
314
314
  }
315
315
 
316
- &:after {
316
+ &::after {
317
317
  left: 0;
318
318
  right: 0;
319
319
  width: 100%;
@@ -332,8 +332,8 @@ $after-button-padding-left: govuk-spacing(4);
332
332
  background: $govuk-focus-colour;
333
333
  }
334
334
 
335
- &:after,
336
- &:hover:after {
335
+ &::after,
336
+ &:hover::after {
337
337
  background: $govuk-focus-colour;
338
338
  }
339
339
  }
@@ -364,19 +364,19 @@ $after-button-padding-left: govuk-spacing(4);
364
364
  @include govuk-link-style-no-visited-state;
365
365
  @include govuk-link-style-no-underline;
366
366
 
367
- &:after {
367
+ &::after {
368
368
  @include pseudo-underline($left: $after-button-padding-left, $right: $after-button-padding-right);
369
369
  }
370
370
 
371
371
  &:hover {
372
372
  color: govuk-colour("mid-grey");
373
373
 
374
- &:after {
374
+ &::after {
375
375
  background: govuk-colour("mid-grey");
376
376
  }
377
377
 
378
378
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
379
- &:before {
379
+ &::before {
380
380
  border-color: govuk-colour("mid-grey");
381
381
  }
382
382
  }
@@ -411,11 +411,11 @@ $after-button-padding-left: govuk-spacing(4);
411
411
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
412
412
  color: govuk-colour("black");
413
413
 
414
- &:after {
414
+ &::after {
415
415
  background: govuk-colour("black");
416
416
  }
417
417
 
418
- &:before {
418
+ &::before {
419
419
  @include chevron(govuk-colour("black"), true);
420
420
  }
421
421
  }
@@ -428,22 +428,23 @@ $after-button-padding-left: govuk-spacing(4);
428
428
  box-shadow: none;
429
429
 
430
430
  &:hover {
431
- &:after {
431
+ &::after {
432
432
  background-color: govuk-colour("black");
433
433
  }
434
434
  }
435
435
 
436
- &:after {
436
+ &::after {
437
437
  background-color: govuk-colour("black");
438
438
  }
439
-
439
+ // stylelint-disable max-nesting-depth
440
440
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
441
441
  border-color: $govuk-focus-colour;
442
442
 
443
- &:before {
443
+ &::before {
444
444
  @include chevron(govuk-colour("black"), true);
445
445
  }
446
446
  }
447
+ // stylelint-enable max-nesting-depth
447
448
  }
448
449
 
449
450
  // Undoes the :focus styles *only* for browsers that support :focus-visible.
@@ -453,16 +454,17 @@ $after-button-padding-left: govuk-spacing(4);
453
454
  box-shadow: none;
454
455
  color: govuk-colour("white");
455
456
 
457
+ // stylelint-disable max-nesting-depth
456
458
  &:hover {
457
459
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
458
- &:before {
460
+ &::before {
459
461
  @include chevron(govuk-colour("mid-grey"), true);
460
462
  }
461
463
 
462
464
  color: govuk-colour("mid-grey");
463
465
  }
464
466
 
465
- &:after {
467
+ &::after {
466
468
  background: govuk-colour("mid-grey");
467
469
  }
468
470
  }
@@ -471,11 +473,12 @@ $after-button-padding-left: govuk-spacing(4);
471
473
  border-color: $button-pipe-colour;
472
474
 
473
475
  @include govuk-media-query($from: 360px) {
474
- &:before {
476
+ &::before {
475
477
  @include chevron(govuk-colour("white"), true);
476
478
  }
477
479
  }
478
480
  }
481
+ // stylelint-enable max-nesting-depth
479
482
  }
480
483
 
481
484
  // Open button modifier
@@ -485,7 +488,7 @@ $after-button-padding-left: govuk-spacing(4);
485
488
  @include govuk-focused-text;
486
489
  box-shadow: none;
487
490
 
488
- &:after {
491
+ &::after {
489
492
  background-color: govuk-colour("black");
490
493
  }
491
494
 
@@ -494,7 +497,7 @@ $after-button-padding-left: govuk-spacing(4);
494
497
  border-color: $govuk-focus-colour;
495
498
 
496
499
  @include govuk-media-query($from: 360px) {
497
- &:before {
500
+ &::before {
498
501
  @include chevron(govuk-colour("black"), true);
499
502
  @include prefixed-transform($rotate: 225deg, $translateY: 1px);
500
503
  }
@@ -505,7 +508,7 @@ $after-button-padding-left: govuk-spacing(4);
505
508
  @include focus-not-focus-visible {
506
509
  background: govuk-colour("light-grey");
507
510
 
508
- &:after {
511
+ &::after {
509
512
  background-color: $govuk-link-colour;
510
513
  }
511
514
 
@@ -514,7 +517,7 @@ $after-button-padding-left: govuk-spacing(4);
514
517
  border-color: govuk-colour("light-grey");
515
518
 
516
519
  @include govuk-media-query($from: 360px) {
517
- &:before {
520
+ &::before {
518
521
  @include chevron($govuk-link-colour);
519
522
  @include prefixed-transform($rotate: 225deg, $translateY: 1px);
520
523
  }
@@ -533,7 +536,7 @@ $after-button-padding-left: govuk-spacing(4);
533
536
  padding: govuk-spacing(1) govuk-spacing(4);
534
537
 
535
538
  @include govuk-media-query($from: 360px) {
536
- &:before {
539
+ &::before {
537
540
  @include chevron(govuk-colour("white"));
538
541
  }
539
542
  }
@@ -597,11 +600,13 @@ $after-button-padding-left: govuk-spacing(4);
597
600
  box-shadow: none;
598
601
  color: $govuk-focus-colour;
599
602
 
603
+ // stylelint-disable max-nesting-depth
600
604
  @include govuk-media-query($from: 360px) {
601
- &:before {
605
+ &::before {
602
606
  @include chevron($govuk-focus-colour, true);
603
607
  }
604
608
  }
609
+ // stylelint-enable max-nesting-depth
605
610
  }
606
611
 
607
612
  @include focus-not-focus-visible {
@@ -708,14 +713,14 @@ $after-button-padding-left: govuk-spacing(4);
708
713
  font-size: govuk-px-to-rem(16px);
709
714
  font-weight: bold;
710
715
 
711
- &:after {
716
+ &::after {
712
717
  @include make-selectable-area-bigger;
713
718
  }
714
719
 
715
720
  @include govuk-media-query($from: "desktop") {
716
721
  padding: 0;
717
722
 
718
- &:after {
723
+ &::after {
719
724
  @include make-selectable-area-bigger;
720
725
  }
721
726
  }
@@ -726,7 +731,7 @@ $after-button-padding-left: govuk-spacing(4);
726
731
  font-size: govuk-px-to-rem(16px);
727
732
  font-weight: bold;
728
733
 
729
- &:after {
734
+ &::after {
730
735
  @include make-selectable-area-bigger;
731
736
  height: calc(100% - 20px);
732
737
  }
@@ -756,7 +761,7 @@ $after-button-padding-left: govuk-spacing(4);
756
761
  font-size: govuk-px-to-rem(16px);
757
762
  padding: 0;
758
763
 
759
- &:after {
764
+ &::after {
760
765
  @include make-selectable-area-bigger;
761
766
  }
762
767
  }
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  // Extend the touch area of the button to span the heading
66
- &:after {
66
+ &::after {
67
67
  content: "";
68
68
  position: absolute;
69
69
  top: 0;
@@ -89,7 +89,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
89
89
  }
90
90
 
91
91
  // Create inner chevron arrow
92
- &:after {
92
+ &::after {
93
93
  content: "";
94
94
  box-sizing: border-box;
95
95
  display: block;
@@ -128,7 +128,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
128
128
  background: govuk-colour("black");
129
129
  }
130
130
 
131
- .gem-c-step-nav__chevron:after {
131
+ .gem-c-step-nav__chevron::after {
132
132
  color: govuk-colour("light-grey");
133
133
  }
134
134
 
@@ -145,7 +145,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
145
145
  background: govuk-colour("black");
146
146
  }
147
147
 
148
- .gem-c-step-nav__chevron:after {
148
+ .gem-c-step-nav__chevron::after {
149
149
  color: $govuk-focus-colour;
150
150
  }
151
151
 
@@ -234,7 +234,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
234
234
  list-style: none;
235
235
 
236
236
  // line down the side of a step
237
- &:after {
237
+ &::after {
238
238
  @include step-nav-vertical-line;
239
239
  @include step-nav-line-position;
240
240
  top: govuk-em(govuk-spacing(3), 16);
@@ -244,7 +244,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
244
244
  @include govuk-media-query($from: tablet) {
245
245
  padding-left: govuk-em(govuk-spacing(9), 16);
246
246
 
247
- &:after { // stylelint-disable-line max-nesting-depth
247
+ &::after { // stylelint-disable-line max-nesting-depth
248
248
  @include step-nav-line-position-large;
249
249
  top: govuk-em(govuk-spacing(6), 16);
250
250
  }
@@ -254,7 +254,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
254
254
 
255
255
  .gem-c-step-nav__step:last-child {
256
256
  // little dash at the bottom of the line
257
- &:before {
257
+ &::before {
258
258
  content: "";
259
259
  position: absolute;
260
260
  z-index: 6;
@@ -266,23 +266,23 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
266
266
  border-bottom: solid $stroke-width govuk-colour("mid-grey", $legacy: "grey-2");
267
267
  }
268
268
 
269
- &:after {
269
+ &::after {
270
270
  height: -webkit-calc(100% - #{govuk-spacing(3)}); // fallback for iphone 4
271
271
  height: calc(100% - #{govuk-spacing(3)});
272
272
  }
273
273
 
274
- .gem-c-step-nav__help:after {
274
+ .gem-c-step-nav__help::after {
275
275
  height: 100%;
276
276
  }
277
277
 
278
278
  .gem-c-step-nav--large & {
279
279
  @include govuk-media-query($from: tablet) {
280
- &:before {
280
+ &::before {
281
281
  margin-left: $number-circle-size-large / 4;
282
282
  width: $number-circle-size-large / 2;
283
283
  }
284
284
 
285
- &:after {
285
+ &::after {
286
286
  height: calc(100% - #{govuk-spacing(6)});
287
287
  }
288
288
  }
@@ -290,10 +290,10 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
290
290
  }
291
291
 
292
292
  .gem-c-step-nav__step--active {
293
- &:last-child:before,
293
+ &:last-child::before,
294
294
  .gem-c-step-nav__circle--number,
295
- &:after,
296
- .gem-c-step-nav__help:after {
295
+ &::after,
296
+ .gem-c-step-nav__help::after {
297
297
  border-color: govuk-colour("black");
298
298
  }
299
299
  }
@@ -365,7 +365,11 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
365
365
  $shadow-colour: govuk-colour("white");
366
366
 
367
367
  // to make numbers readable for users zooming text only in browsers such as Firefox
368
- text-shadow: 0 -#{$shadow-offset} 0 $shadow-colour, $shadow-offset 0 0 $shadow-colour, 0 $shadow-offset 0 $shadow-colour, -#{$shadow-offset} 0 0 $shadow-colour;
368
+ text-shadow:
369
+ 0 -#{$shadow-offset} 0 $shadow-colour,
370
+ $shadow-offset 0 0 $shadow-colour,
371
+ 0 $shadow-offset 0 $shadow-colour,
372
+ -#{$shadow-offset} 0 0 $shadow-colour;
369
373
  }
370
374
 
371
375
  .gem-c-step-nav__circle-step-label,
@@ -468,13 +472,13 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
468
472
  margin-left: $links-margin;
469
473
  list-style: disc;
470
474
 
471
- .gem-c-step-nav__list-item--active:before {
475
+ .gem-c-step-nav__list-item--active::before {
472
476
  left: -(govuk-spacing(6) + govuk-spacing(3)) - $links-margin;
473
477
  }
474
478
 
475
479
  .gem-c-step-nav--large & {
476
480
  @include govuk-media-query($from: tablet) {
477
- .gem-c-step-nav__list-item--active:before {
481
+ .gem-c-step-nav__list-item--active::before {
478
482
  left: -(govuk-spacing(9)) - $links-margin;
479
483
  }
480
484
  }
@@ -497,7 +501,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
497
501
  .gem-c-step-nav__list-item--active {
498
502
  position: relative;
499
503
 
500
- &:before {
504
+ &::before {
501
505
  box-sizing: border-box;
502
506
  content: "";
503
507
  position: absolute;
@@ -513,7 +517,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
513
517
 
514
518
  .gem-c-step-nav--large & {
515
519
  @include govuk-media-query($from: tablet) {
516
- &:before {
520
+ &::before {
517
521
  left: -(govuk-spacing(9));
518
522
  margin-left: ($number-circle-size-large / 2);
519
523
  }
@@ -530,7 +534,7 @@ $top-border: solid 1px govuk-colour("mid-grey", $legacy: "grey-3");
530
534
  font-weight: normal;
531
535
  color: govuk-colour("dark-grey", $legacy: "grey-1");
532
536
 
533
- &:before {
537
+ &::before {
534
538
  content: " \2013\00a0"; // dash followed by  
535
539
  }
536
540
  }
@@ -44,7 +44,7 @@ $table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4")
44
44
  @include govuk-focused-text;
45
45
  }
46
46
 
47
- .app-table__sort-link:after {
47
+ .app-table__sort-link::after {
48
48
  content: "";
49
49
  position: absolute;
50
50
  top: 5px;
@@ -52,7 +52,7 @@ $table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4")
52
52
  @include govuk-shape-arrow($direction: up, $base: $sort-link-arrow-size-small, $display: block);
53
53
  }
54
54
 
55
- .app-table__sort-link:before {
55
+ .app-table__sort-link::before {
56
56
  content: "";
57
57
  position: absolute;
58
58
  top: 13px;
@@ -80,12 +80,12 @@ $table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4")
80
80
  }
81
81
  }
82
82
 
83
- .app-table__sort-link--ascending:before,
84
- .app-table__sort-link--descending:before {
83
+ .app-table__sort-link--ascending::before,
84
+ .app-table__sort-link--descending::before {
85
85
  content: none;
86
86
  }
87
87
 
88
- .app-table__sort-link--ascending:after {
88
+ .app-table__sort-link--ascending::after {
89
89
  content: "";
90
90
  position: absolute;
91
91
  top: $sort-link-arrow-spacing;
@@ -95,7 +95,7 @@ $table-row-even-background-colour: govuk-colour("light-grey", $legacy: "grey-4")
95
95
  @include govuk-shape-arrow($direction: up, $base: $sort-link-arrow-size, $display: inline-block);
96
96
  }
97
97
 
98
- .app-table__sort-link--descending:after {
98
+ .app-table__sort-link--descending::after {
99
99
  content: "";
100
100
  position: absolute;
101
101
  top: $sort-link-arrow-spacing;
@@ -10,7 +10,8 @@
10
10
  }
11
11
 
12
12
  // We have some styles within GOVUK (.content-block) which can leak into the list styles for this component.
13
- // These styles are defined in Static: https://github.com/alphagov/static/blob/a815620cada7ea1c65428c1c3b3ac4dbe28977bf/app/assets/stylesheets/helpers/_text.scss
13
+ // These styles are defined in Static:
14
+ // https://github.com/alphagov/static/blob/a815620cada7ea1c65428c1c3b3ac4dbe28977bf/app/assets/stylesheets/helpers/_text.scss
14
15
  // This sets more specific selectors so those unwanted styles are overidden
15
16
  ul.govuk-tabs__list { // stylelint-disable-line selector-no-qualifying-type
16
17
  margin: 0;
@@ -17,7 +17,8 @@
17
17
  width: 100%;
18
18
  box-sizing: border-box;
19
19
 
20
- &:before {
20
+ // stylelint-disable max-nesting-depth
21
+ &::before {
21
22
  background-color: govuk-colour("black");
22
23
  border-radius: 50%;
23
24
  color: govuk-colour("white");
@@ -37,6 +38,7 @@
37
38
  content: "#{$i}";
38
39
  }
39
40
  }
41
+ // stylelint-enable max-nesting-depth
40
42
  }
41
43
  }
42
44
  }
@@ -49,14 +49,14 @@
49
49
  padding-left: govuk-spacing(6);
50
50
  }
51
51
 
52
- &:before {
52
+ &::before {
53
53
  content: "\201C";
54
54
  float: left;
55
55
  clear: both;
56
56
  margin-left: (- govuk-spacing(3));
57
57
  }
58
58
 
59
- &:last-child:after {
59
+ &:last-child::after {
60
60
  content: "\201D";
61
61
  }
62
62
  }
@@ -78,14 +78,14 @@
78
78
  padding-left: 0;
79
79
  }
80
80
 
81
- &:before {
81
+ &::before {
82
82
  content: "\201D";
83
83
  float: right;
84
84
  margin-right: (- govuk-spacing(3));
85
85
  margin-left: 0;
86
86
  }
87
87
 
88
- &:last-child:after {
88
+ &:last-child::after {
89
89
  content: "\201C";
90
90
  }
91
91
  }
@@ -10,11 +10,11 @@ $is-ie: false !default;
10
10
  @mixin media-down($size: false, $max-width: false, $min-width: false) {
11
11
  @if $is-ie == false {
12
12
  @if $size == mobile {
13
- @media (max-width: 640px) {
13
+ @media (max-width: 640px) { // stylelint-disable-line media-feature-range-notation
14
14
  @content;
15
15
  }
16
16
  } @else if $size == tablet {
17
- @media (max-width: 800px) {
17
+ @media (max-width: 800px) { // stylelint-disable-line media-feature-range-notation
18
18
  @content;
19
19
  }
20
20
  }
@@ -99,7 +99,7 @@
99
99
  <% end %>
100
100
 
101
101
  <% if attachment.preview_url.present? %>
102
- <%= tag.p link_to(t("components.attachment.preview_link"), attachment.preview_url, class: "govuk-link"), class: "gem-c-attachment__metadata" %>
102
+ <%= tag.p link_to(t("components.attachment.preview_link"), attachment.preview_url, class: "govuk-link", "aria-label": t("components.attachment.preview_aria_label", title: attachment.title)), class: "gem-c-attachment__metadata" %>
103
103
  <% end %>
104
104
 
105
105
  <% if attachment.is_official_document && !hide_order_copy_link %>
@@ -14,9 +14,10 @@
14
14
 
15
15
  ga4_tracking ||= false
16
16
  ga4_data = {
17
- event_name: "navigation",
18
- type: "content",
19
- section: t("components.contents_list.contents", locale: :en) || ""
17
+ event_name: "navigation",
18
+ type: "contents list",
19
+ section: t("components.contents_list.contents", locale: :en) || "",
20
+ index_total: cl_helper.get_index_total
20
21
  } if ga4_tracking
21
22
  local_assigns[:aria] ||= {}
22
23
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -37,15 +38,15 @@
37
38
  <% end %>
38
39
 
39
40
  <ol class="gem-c-contents-list__list">
41
+ <% index_link = 1 if ga4_tracking %>
40
42
  <% contents.each.with_index(1) do |contents_item, position| %>
41
43
  <li class="<%= cl_helper.list_item_classes(contents_item, false) %>" <%= "aria-current=true" if contents_item[:active] %>>
42
44
  <% link_text = format_numbers ? cl_helper.wrap_numbers_with_spans(contents_item[:text]) : contents_item[:text]
43
- if ga4_tracking
45
+ if ga4_tracking
44
46
  ga4_data[:index] = {
45
- "index_link": position,
47
+ "index_link": index_link,
46
48
  }
47
- ga4_data[:index_total] = contents.length
48
- end
49
+ end
49
50
  %>
50
51
  <%= link_to_if !contents_item[:active], link_text, contents_item[:href],
51
52
  class: link_classes,
@@ -59,11 +60,18 @@
59
60
  ga4_link: (ga4_tracking ? ga4_data.to_json : nil)
60
61
  }
61
62
  %>
62
-
63
+ <% index_link += 1 if ga4_tracking %>
63
64
  <% if contents_item[:items] && contents_item[:items].any? %>
64
65
  <ol class="gem-c-contents-list__nested-list">
65
66
  <% contents_item[:items].each.with_index(1) do |nested_contents_item, nested_position| %>
66
67
  <li class="<%= cl_helper.list_item_classes(nested_contents_item, true) %>" <%= "aria-current=true" if nested_contents_item[:active] %>>
68
+ <%
69
+ if ga4_tracking
70
+ ga4_data[:index] = {
71
+ "index_link": index_link,
72
+ }
73
+ end
74
+ %>
67
75
  <%= link_to_if !nested_contents_item[:active], nested_contents_item[:text], nested_contents_item[:href],
68
76
  class: link_classes,
69
77
  data: {
@@ -72,13 +80,15 @@
72
80
  track_label: nested_contents_item[:href],
73
81
  track_options: {
74
82
  dimension29: nested_contents_item[:text]
75
- }
83
+ },
84
+ ga4_link: (ga4_tracking ? ga4_data.to_json : nil)
76
85
  }
77
86
  %>
78
87
  </li>
88
+ <% index_link += 1 if ga4_tracking %>
79
89
  <% end %>
80
90
  </ol>
81
- <% end %>
91
+ <% end %>
82
92
  </li>
83
93
  <% end %>
84
94
  </ol>
@@ -35,7 +35,7 @@
35
35
  <% end %>
36
36
 
37
37
  <div
38
- class="gem-c-option-select" data-module="option-select" data-ga4-change-category="update-filter checkbox" data-ga4-section="<%= title %>"
38
+ class="gem-c-option-select" data-module="option-select"
39
39
  <% if local_assigns.include?(:closed_on_load) && closed_on_load %>data-closed-on-load="true"<% end %>
40
40
  <% if local_assigns.include?(:closed_on_load_mobile) && closed_on_load_mobile %>data-closed-on-load-mobile="true"<% end %>
41
41
  <% if local_assigns.include?(:aria_controls_id) %>data-input-aria-controls="<%= aria_controls_id %>"<% end %>
@@ -43,8 +43,8 @@
43
43
  >
44
44
  <h3 class="gem-c-option-select__heading js-container-heading">
45
45
  <span class="gem-c-option-select__title js-container-button" id="<%= title_id %>"><%= title %></span>
46
- <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="gem-c-option-select__icon gem-c-option-select__icon--up" aria-hidden="true" focusable="false"><path d="m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"/></svg>
47
- <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="gem-c-option-select__icon gem-c-option-select__icon--down" aria-hidden="true" focusable="false"><path d="m225.84 414.16l256 256c16.683 16.683 43.691 16.683 60.331 0l256-256c16.683-16.683 16.683-43.691 0-60.331s-43.691-16.683-60.331 0l-225.84 225.84-225.84-225.84c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331z"/></svg>
46
+ <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--up" aria-hidden="true" focusable="false"><path d="m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"/></svg>
47
+ <svg version="1.1" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="0" height="0" class="gem-c-option-select__icon gem-c-option-select__icon--down" aria-hidden="true" focusable="false"><path d="m225.84 414.16l256 256c16.683 16.683 43.691 16.683 60.331 0l256-256c16.683-16.683 16.683-43.691 0-60.331s-43.691-16.683-60.331 0l-225.84 225.84-225.84-225.84c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331z"/></svg>
48
48
  </h3>
49
49
 
50
50
  <%= content_tag(:div, role: "group", aria: { labelledby: title_id }, class: classes, id: options_container_id, tabindex: "-1") do %>