govuk_publishing_components 27.10.3 → 27.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +1 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +6 -4
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +232 -97
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +30 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss +5 -0
  9. data/app/models/govuk_publishing_components/shared_accessibility_criteria.rb +17 -0
  10. data/app/views/govuk_publishing_components/components/_input.html.erb +35 -22
  11. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +29 -41
  12. data/app/views/govuk_publishing_components/components/_search.html.erb +2 -1
  13. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +23 -0
  14. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +4 -5
  15. data/app/views/govuk_publishing_components/components/docs/input.yml +10 -0
  16. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +32 -0
  17. data/app/views/govuk_publishing_components/components/search/_search_icon.html.erb +5 -5
  18. data/config/locales/ar.yml +0 -3
  19. data/config/locales/az.yml +0 -3
  20. data/config/locales/be.yml +0 -3
  21. data/config/locales/bg.yml +0 -3
  22. data/config/locales/bn.yml +0 -3
  23. data/config/locales/cs.yml +0 -3
  24. data/config/locales/cy.yml +0 -3
  25. data/config/locales/da.yml +0 -3
  26. data/config/locales/de.yml +0 -3
  27. data/config/locales/dr.yml +0 -3
  28. data/config/locales/el.yml +0 -3
  29. data/config/locales/en.yml +7 -6
  30. data/config/locales/es-419.yml +0 -3
  31. data/config/locales/es.yml +0 -3
  32. data/config/locales/et.yml +0 -3
  33. data/config/locales/fa.yml +0 -3
  34. data/config/locales/fi.yml +0 -3
  35. data/config/locales/fr.yml +0 -3
  36. data/config/locales/gd.yml +0 -3
  37. data/config/locales/gu.yml +0 -3
  38. data/config/locales/he.yml +0 -3
  39. data/config/locales/hi.yml +0 -3
  40. data/config/locales/hr.yml +0 -3
  41. data/config/locales/hu.yml +0 -3
  42. data/config/locales/hy.yml +0 -3
  43. data/config/locales/id.yml +0 -3
  44. data/config/locales/is.yml +0 -3
  45. data/config/locales/it.yml +0 -3
  46. data/config/locales/ja.yml +0 -3
  47. data/config/locales/ka.yml +0 -3
  48. data/config/locales/kk.yml +0 -3
  49. data/config/locales/ko.yml +0 -3
  50. data/config/locales/lt.yml +0 -3
  51. data/config/locales/lv.yml +0 -3
  52. data/config/locales/ms.yml +0 -3
  53. data/config/locales/mt.yml +0 -3
  54. data/config/locales/nl.yml +0 -3
  55. data/config/locales/no.yml +0 -3
  56. data/config/locales/pa-pk.yml +0 -3
  57. data/config/locales/pa.yml +0 -3
  58. data/config/locales/pl.yml +0 -3
  59. data/config/locales/ps.yml +0 -3
  60. data/config/locales/pt.yml +0 -3
  61. data/config/locales/ro.yml +0 -3
  62. data/config/locales/ru.yml +0 -3
  63. data/config/locales/si.yml +0 -3
  64. data/config/locales/sk.yml +0 -3
  65. data/config/locales/sl.yml +0 -3
  66. data/config/locales/so.yml +0 -3
  67. data/config/locales/sq.yml +0 -3
  68. data/config/locales/sr.yml +0 -3
  69. data/config/locales/sv.yml +0 -3
  70. data/config/locales/sw.yml +0 -3
  71. data/config/locales/ta.yml +0 -3
  72. data/config/locales/th.yml +0 -3
  73. data/config/locales/tk.yml +0 -3
  74. data/config/locales/tr.yml +0 -3
  75. data/config/locales/uk.yml +0 -3
  76. data/config/locales/ur.yml +0 -3
  77. data/config/locales/uz.yml +0 -3
  78. data/config/locales/vi.yml +0 -3
  79. data/config/locales/zh-hk.yml +0 -3
  80. data/config/locales/zh-tw.yml +0 -3
  81. data/config/locales/zh.yml +0 -3
  82. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +11 -0
  83. data/lib/govuk_publishing_components/version.rb +1 -1
  84. data/lib/govuk_publishing_components.rb +0 -1
  85. data/node_modules/govuk-frontend/govuk/components/accordion/macro-options.json +2 -2
  86. data/node_modules/govuk-frontend/govuk/components/back-link/macro-options.json +3 -3
  87. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +3 -4
  88. data/node_modules/govuk-frontend/govuk/components/button/fixtures.json +9 -0
  89. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +6 -6
  90. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +14 -0
  91. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +8 -8
  92. data/node_modules/govuk-frontend/govuk/components/cookie-banner/macro-options.json +1 -1
  93. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +5 -5
  94. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +2 -1
  95. data/node_modules/govuk-frontend/govuk/components/details/macro-options.json +2 -2
  96. data/node_modules/govuk-frontend/govuk/components/error-message/macro-options.json +3 -3
  97. data/node_modules/govuk-frontend/govuk/components/fieldset/macro-options.json +1 -1
  98. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +1 -0
  99. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +4 -4
  100. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +3 -0
  101. data/node_modules/govuk-frontend/govuk/components/footer/macro-options.json +2 -2
  102. data/node_modules/govuk-frontend/govuk/components/header/macro-options.json +6 -6
  103. data/node_modules/govuk-frontend/govuk/components/hint/macro-options.json +1 -1
  104. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +7 -7
  105. data/node_modules/govuk-frontend/govuk/components/inset-text/macro-options.json +1 -1
  106. data/node_modules/govuk-frontend/govuk/components/label/macro-options.json +1 -1
  107. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +13 -1
  108. data/node_modules/govuk-frontend/govuk/components/panel/macro-options.json +1 -1
  109. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +14 -0
  110. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +8 -8
  111. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +3 -3
  112. data/node_modules/govuk-frontend/govuk/components/summary-list/fixtures.json +2 -2
  113. data/node_modules/govuk-frontend/govuk/components/summary-list/macro-options.json +7 -7
  114. data/node_modules/govuk-frontend/govuk/components/tabs/macro-options.json +4 -4
  115. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +5 -5
  116. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +2 -2
  117. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +22 -4
  118. data/node_modules/govuk-frontend/govuk/overrides/_all.scss +1 -0
  119. data/node_modules/govuk-frontend/govuk/overrides/_text-align.scss +20 -0
  120. data/node_modules/govuk-frontend/package.json +1 -1
  121. metadata +21 -17
  122. data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +0 -33
@@ -1,3 +1,5 @@
1
+ @import "mixins/prefixed-transform";
2
+
1
3
  /// Set grid row or column value using the fraction unit.
2
4
  ///
3
5
  /// @param {Integer} $number - number of fractions that the grid row or column
@@ -46,6 +48,10 @@
46
48
  grid-template-columns: fractions($columns);
47
49
  -ms-grid-rows: fractions($rows);
48
50
  grid-template-rows: fractions($rows);
51
+ }
52
+
53
+ @mixin columns-children($items, $columns, $selector: "*") {
54
+ $rows: ceil($items / $columns);
49
55
 
50
56
  // Internet Explorer 10-11 require each element to be placed in the grid -
51
57
  // the `grid-auto-flow` property isn't supported. This means that both the
@@ -94,19 +100,21 @@
94
100
 
95
101
  $icon-size: 20px;
96
102
  $chevron-indent-spacing: 7px;
103
+ $black-bar-height: 50px;
104
+ $search-width-or-height: $black-bar-height;
97
105
 
98
106
  @mixin chevron($colour, $update: false) {
99
107
  @if ($update == true) {
100
108
  border-bottom-color: $colour;
101
109
  border-right-color: $colour;
102
110
  } @else {
103
- border-bottom: 3px solid $colour;
104
- border-right: 3px solid $colour;
111
+ @include prefixed-transform($rotate: 45deg, $translateY: -35%);
112
+ border-bottom: 2px solid $colour;
113
+ border-right: 2px solid $colour;
105
114
  content: " ";
106
115
  display: inline-block;
107
116
  height: 8px;
108
117
  margin: 0 8px 0 2px;
109
- transform: translateY(-35%) rotate(45deg);
110
118
  vertical-align: middle;
111
119
  width: 8px;
112
120
  }
@@ -127,9 +135,9 @@ $chevron-indent-spacing: 7px;
127
135
  bottom: 0;
128
136
  content: " ";
129
137
  height: govuk-spacing(1);
130
- left: govuk-spacing(4);
138
+ left: govuk-spacing(3);
131
139
  position: absolute;
132
- right: govuk-spacing(4);
140
+ right: govuk-spacing(3);
133
141
  top: auto;
134
142
  }
135
143
 
@@ -161,7 +169,7 @@ $chevron-indent-spacing: 7px;
161
169
  position: relative;
162
170
 
163
171
  .lte-ie8 & {
164
- height: govuk-spacing(9);
172
+ height: $black-bar-height;
165
173
  }
166
174
 
167
175
  [hidden] {
@@ -179,8 +187,8 @@ $chevron-indent-spacing: 7px;
179
187
 
180
188
  .gem-c-layout-super-navigation-header__header-logo {
181
189
  height: govuk-spacing(6);
182
- padding-bottom: govuk-spacing(3);
183
- padding-top: govuk-spacing(3);
190
+ padding-bottom: govuk-spacing(2);
191
+ padding-top: govuk-spacing(2);
184
192
 
185
193
  @include govuk-media-query($from: "desktop") {
186
194
  display: block;
@@ -224,24 +232,18 @@ $chevron-indent-spacing: 7px;
224
232
  @include govuk-media-query($from: "desktop") {
225
233
  display: inline-block;
226
234
  }
227
-
228
- .js-module-initialised & {
229
- padding: 0 0 govuk-spacing(9) 0;
230
-
231
- @include govuk-media-query($from: "desktop") {
232
- padding: 0;
233
- }
234
- }
235
235
  }
236
236
 
237
237
  .gem-c-layout-super-navigation-header__navigation-item,
238
238
  .gem-c-layout-super-navigation-header__search-item {
239
239
  display: block;
240
- margin: 0 govuk-spacing(3);
240
+ margin: 0;
241
+ padding: govuk-spacing(2) govuk-spacing(3);
241
242
  position: relative;
242
243
 
243
244
  @include govuk-media-query($from: "tablet") {
244
245
  margin: 0 govuk-spacing(6);
246
+ padding: govuk-spacing(2) 0;
245
247
  }
246
248
 
247
249
  @include govuk-media-query($from: "desktop") {
@@ -257,8 +259,15 @@ $chevron-indent-spacing: 7px;
257
259
  .gem-c-layout-super-navigation-header__navigation-item {
258
260
  border-bottom: 1px solid $govuk-border-colour;
259
261
 
262
+ .js-module-initialised & {
263
+ &:last-child {
264
+ border-bottom: none;
265
+ }
266
+ }
267
+
260
268
  @include govuk-media-query($from: "desktop") {
261
269
  border-bottom: 0;
270
+ padding: 0;
262
271
  }
263
272
  }
264
273
 
@@ -268,13 +277,14 @@ $chevron-indent-spacing: 7px;
268
277
  .gem-c-layout-super-navigation-header__navigation-second-toggle-button {
269
278
  @include govuk-link-common;
270
279
  @include govuk-link-style-no-visited-state;
271
- @include govuk-link-style-no-underline;
272
280
 
273
281
  display: inline-block;
274
282
  font-size: 19px;
275
- font-size: govuk-px-to-rem(19px);
283
+ @if $govuk-typography-use-rem {
284
+ font-size: govuk-px-to-rem(19px);
285
+ }
276
286
  font-weight: bold;
277
- margin: govuk-spacing(3) 0;
287
+ margin: govuk-spacing(3) 0 govuk-spacing(3) 0;
278
288
 
279
289
  @include govuk-media-query($from: "desktop") {
280
290
  display: block;
@@ -313,9 +323,15 @@ $chevron-indent-spacing: 7px;
313
323
  @include govuk-media-query($from: "desktop") {
314
324
  float: left;
315
325
  font-size: 16px;
316
- font-size: govuk-px-to-rem(16px);
326
+
327
+ // stylelint-disable max-nesting-depth
328
+ @if $govuk-typography-use-rem {
329
+ font-size: govuk-px-to-rem(16px);
330
+ }
331
+ // stylelint-enable max-nesting-depth
332
+
317
333
  height: govuk-spacing(4);
318
- padding: govuk-spacing(4);
334
+ padding: govuk-spacing(3);
319
335
  position: relative;
320
336
 
321
337
  &:before {
@@ -332,28 +348,40 @@ $chevron-indent-spacing: 7px;
332
348
 
333
349
  // stylelint-disable max-nesting-depth
334
350
  @include focus-and-focus-visible {
335
- box-shadow: none;
336
- color: $govuk-focus-text-colour;
351
+ &,
352
+ &:hover {
353
+ box-shadow: none;
354
+ color: $govuk-focus-text-colour;
337
355
 
338
- &:after {
339
- background: $govuk-focus-text-colour;
356
+ &:after {
357
+ background: $govuk-focus-text-colour;
358
+ }
340
359
  }
341
360
  }
342
361
 
343
362
  @include focus-not-focus-visible {
344
363
  &,
345
364
  &:hover {
346
- color: govuk-colour("white");
347
365
  text-decoration: none;
348
366
  }
349
- }
350
- // stylelint-enable max-nesting-depth
351
367
 
352
- &:focus:not(:focus-visible) {
368
+ & {
369
+ color: govuk-colour("white");
370
+ }
371
+
372
+ &:hover {
373
+ color: govuk-colour("mid-grey");
374
+
375
+ &:after {
376
+ background: govuk-colour("mid-grey");
377
+ }
378
+ }
379
+
353
380
  &:after {
354
381
  background: none;
355
382
  }
356
383
  }
384
+ // stylelint-enable max-nesting-depth
357
385
 
358
386
  &:after {
359
387
  @include pseudo-underline;
@@ -369,6 +397,7 @@ $chevron-indent-spacing: 7px;
369
397
  .gem-c-layout-super-navigation-header__navigation-item-link {
370
398
  .js-module-initialised & {
371
399
  margin-left: govuk-spacing(4);
400
+ @include govuk-link-style-no-underline;
372
401
  }
373
402
  }
374
403
 
@@ -408,9 +437,11 @@ $chevron-indent-spacing: 7px;
408
437
  color: govuk-colour("white");
409
438
  float: left;
410
439
  font-size: 16px;
411
- font-size: govuk-px-to-rem(16px);
412
- height: govuk-spacing(9);
413
- padding: govuk-spacing(4);
440
+ @if $govuk-typography-use-rem {
441
+ font-size: govuk-px-to-rem(16px);
442
+ }
443
+ height: $black-bar-height;
444
+ padding: govuk-spacing(3);
414
445
  position: relative;
415
446
  text-decoration: none;
416
447
 
@@ -449,7 +480,7 @@ $chevron-indent-spacing: 7px;
449
480
  &.gem-c-layout-super-navigation-header__open-button {
450
481
  @include focus-not-focus-visible {
451
482
  &:before {
452
- transform: translateY(0) rotate(225deg);
483
+ @include prefixed-transform($rotate: 225deg, $translateY: 0);
453
484
  }
454
485
  }
455
486
 
@@ -481,6 +512,10 @@ $chevron-indent-spacing: 7px;
481
512
  }
482
513
  }
483
514
  }
515
+
516
+ .js-module-initialised & {
517
+ @include govuk-link-style-no-underline;
518
+ }
484
519
  }
485
520
 
486
521
  // Search link and dropdown.
@@ -491,7 +526,7 @@ $chevron-indent-spacing: 7px;
491
526
  background: $govuk-brand-colour;
492
527
 
493
528
  &:hover {
494
- background: none;
529
+ background: govuk-colour("black");
495
530
 
496
531
  &:before {
497
532
  left: 0;
@@ -506,6 +541,30 @@ $chevron-indent-spacing: 7px;
506
541
  content: none;
507
542
  }
508
543
  }
544
+
545
+ &:after {
546
+ left: 0;
547
+ right: 0;
548
+ }
549
+
550
+ @include focus-not-focus-visible {
551
+ background: $govuk-link-colour;
552
+
553
+ &:hover {
554
+ background: govuk-colour("black");
555
+ }
556
+ }
557
+
558
+ @include focus-and-focus-visible {
559
+ &:hover {
560
+ background: $govuk-focus-colour;
561
+ }
562
+
563
+ &:after,
564
+ &:hover:after {
565
+ background: $govuk-focus-colour;
566
+ }
567
+ }
509
568
  }
510
569
  }
511
570
  }
@@ -542,38 +601,39 @@ $chevron-indent-spacing: 7px;
542
601
 
543
602
  // Styles for top level navigation toggle button.
544
603
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button {
545
- @include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
604
+ @include govuk-link-common;
605
+ @include govuk-link-style-no-visited-state;
606
+ @include govuk-link-style-no-underline;
607
+
608
+ font-size: 16px;
609
+ @if $govuk-typography-use-rem {
610
+ font-size: govuk-px-to-rem(16px);
611
+ }
612
+ font-weight: 700;
546
613
  background: govuk-colour("black");
547
614
  border: 0;
548
- border-left: 1px solid govuk-colour("white");
549
- border-right: 1px solid govuk-colour("white");
550
615
  box-sizing: border-box;
551
616
  color: govuk-colour("white");
552
617
  cursor: pointer;
553
- height: govuk-spacing(9);
554
- margin-right: -1px;
555
- padding: govuk-spacing(4);
618
+ height: $black-bar-height;
619
+ padding: 0;
556
620
  position: absolute;
557
- right: (govuk-spacing(9) - govuk-spacing(3));
621
+ right: (($search-width-or-height - govuk-spacing(3)) - 1px); // width of the search button (50px) - 15px - 1px to create an overlap between buttons and stop the border appearing to hang off the buttons when they're focused/open
558
622
  top: 0;
559
-
560
- @include govuk-media-query($from: 360px) {
561
- right: govuk-spacing(9);
562
-
563
- &:before {
564
- @include chevron(govuk-colour("white"));
565
- }
566
- }
623
+ z-index: 10;
567
624
 
568
625
  @include focus-and-focus-visible {
569
626
  @include govuk-focused-text;
570
- border-color: $govuk-focus-colour;
571
627
  box-shadow: none;
572
- z-index: 10;
573
628
 
574
- @include govuk-media-query($from: 360px) {
575
- &:before {
576
- @include chevron(govuk-colour("black"), true);
629
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
630
+ border-color: $govuk-focus-colour;
631
+ color: govuk-colour("black");
632
+
633
+ @include govuk-media-query($from: 360px) {
634
+ &:before {
635
+ @include chevron(govuk-colour("black"), true);
636
+ }
577
637
  }
578
638
  }
579
639
  }
@@ -582,42 +642,70 @@ $chevron-indent-spacing: 7px;
582
642
  // See https://www.tpgi.com/focus-visible-and-backwards-compatibility/
583
643
  @include focus-not-focus-visible {
584
644
  background: none;
585
- border-color: govuk-colour("white");
586
645
  box-shadow: none;
587
- color: govuk-colour("white");
588
646
 
589
- @include govuk-media-query($from: 360px) {
590
- &:before {
591
- @include chevron(govuk-colour("white"), true);
647
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
648
+ border-color: govuk-colour("white");
649
+ color: govuk-colour("white");
650
+
651
+ @include govuk-media-query($from: 360px) {
652
+ &:before {
653
+ @include chevron(govuk-colour("white"), true);
654
+ }
592
655
  }
593
656
  }
594
657
  }
595
658
 
596
659
  // Open button modifier
597
660
  &.gem-c-layout-super-navigation-header__open-button {
661
+ // stylelint-disable max-nesting-depth
598
662
  @include focus-and-focus-visible {
599
663
  @include govuk-focused-text;
600
- border-color: $govuk-focus-colour;
601
664
  box-shadow: none;
602
- color: $govuk-focus-colour;
603
665
 
604
- @include govuk-media-query($from: 360px) {
605
- &:before {
606
- @include chevron($govuk-focus-colour, true);
666
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
667
+ color: govuk-colour("black");
668
+ border-color: $govuk-focus-colour;
669
+
670
+ @include govuk-media-query($from: 360px) {
671
+ &:before {
672
+ @include chevron(govuk-colour("black"), true);
673
+ @include prefixed-transform($rotate: 225deg, $translateY: 0);
674
+ }
607
675
  }
608
676
  }
609
677
  }
610
678
 
611
679
  @include focus-not-focus-visible {
612
680
  background: govuk-colour("light-grey");
613
- color: govuk-colour("light-grey");
614
681
 
615
- @include govuk-media-query($from: 360px) {
616
- &:before {
617
- @include chevron(govuk-colour("light-grey"));
682
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
683
+ color: govuk-colour("black");
684
+ border-color: govuk-colour("light-grey");
685
+
686
+ @include govuk-media-query($from: 360px) {
687
+ &:before {
688
+ @include chevron(govuk-colour("black"));
689
+ @include prefixed-transform($rotate: 225deg, $translateY: 0);
690
+ }
618
691
  }
619
692
  }
620
693
  }
694
+ // stylelint-enable max-nesting-depth
695
+ }
696
+ }
697
+
698
+ .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
699
+ display: inline-block;
700
+ border-left: 1px solid govuk-colour("white");
701
+ border-right: 1px solid govuk-colour("white");
702
+ margin: 0;
703
+ padding: govuk-spacing(2) govuk-spacing(4);
704
+
705
+ @include govuk-media-query($from: 360px) {
706
+ &:before {
707
+ @include chevron(govuk-colour("white"));
708
+ }
621
709
  }
622
710
  }
623
711
 
@@ -626,20 +714,20 @@ $chevron-indent-spacing: 7px;
626
714
  @include govuk-font($size: 19, $weight: "bold", $line-height: 20px);
627
715
  background: govuk-colour("black");
628
716
  border: 0;
629
- border-left: 1px solid govuk-colour("white");
630
717
  color: govuk-colour("white");
631
718
  cursor: pointer;
632
- height: govuk-spacing(9);
633
- padding: govuk-spacing(4);
719
+ height: $search-width-or-height;
720
+ padding: govuk-spacing(3);
634
721
  position: absolute;
635
722
  right: (0 - govuk-spacing(3));
636
723
  top: 0;
637
- width: govuk-spacing(9);
724
+ width: $search-width-or-height;
638
725
 
639
726
  @include focus-and-focus-visible {
640
727
  @include govuk-focused-text;
641
728
  border-color: $govuk-focus-colour;
642
729
  box-shadow: none;
730
+ z-index: 11;
643
731
  }
644
732
 
645
733
  &:focus:not(:focus-visible) {
@@ -649,21 +737,19 @@ $chevron-indent-spacing: 7px;
649
737
  color: govuk-colour("white");
650
738
  }
651
739
 
652
- @include govuk-media-query($from: 360px) {
740
+ @include govuk-media-query($from: "desktop") {
653
741
  right: 0;
654
- }
655
742
 
656
- @include govuk-media-query($from: "desktop") {
657
743
  @include focus-not-focus-visible {
658
744
  background: $govuk-brand-colour;
659
- border-bottom: govuk-spacing(1) solid $govuk-brand-colour;
745
+ border-bottom: 1px solid govuk-colour("dark-blue");
660
746
  border-left: none;
661
747
  position: relative;
662
748
  }
663
749
 
664
750
  &:hover {
665
751
  background: govuk-colour("black");
666
- border-bottom-color: govuk-colour("mid-grey");
752
+ border-bottom: govuk-spacing(1) solid govuk-colour("mid-grey");
667
753
  color: govuk-colour("mid-grey");
668
754
  }
669
755
 
@@ -704,7 +790,7 @@ $chevron-indent-spacing: 7px;
704
790
  font-weight: normal;
705
791
  left: 0;
706
792
  line-height: 22px;
707
- padding: govuk-spacing(4) 0;
793
+ padding: govuk-spacing(3) 0;
708
794
  pointer-events: none;
709
795
  position: absolute;
710
796
  right: 0;
@@ -724,7 +810,6 @@ $chevron-indent-spacing: 7px;
724
810
  left: 0;
725
811
  position: absolute;
726
812
  right: 0;
727
- top: govuk-spacing(9);
728
813
  }
729
814
  }
730
815
 
@@ -762,9 +847,7 @@ $chevron-indent-spacing: 7px;
762
847
 
763
848
  & > li {
764
849
  box-sizing: border-box;
765
- margin-bottom: 0;
766
- padding-left: govuk-spacing(3);
767
- padding-right: govuk-spacing(3);
850
+ margin: 0 govuk-spacing(3) govuk-spacing(2) govuk-spacing(3);
768
851
  }
769
852
  }
770
853
  }
@@ -772,13 +855,62 @@ $chevron-indent-spacing: 7px;
772
855
  .gem-c-layout-super-navigation-header__navigation-second-items--topics {
773
856
  @include govuk-media-query($from: "desktop") {
774
857
  @include columns(18, 2, "li");
858
+ @include columns-children(18, 2, "li");
775
859
  }
776
860
  }
777
861
 
778
862
  .gem-c-layout-super-navigation-header__navigation-second-items--government-activity {
863
+ & > li:first-child {
864
+ margin-bottom: govuk-spacing(7);
865
+ }
866
+
779
867
  @include govuk-media-query($from: "desktop") {
780
- @include columns(5, 2, "li");
781
- padding-bottom: govuk-spacing(3);
868
+ @include columns(7, 2, "li");
869
+ padding-bottom: 0;
870
+
871
+ & > li,
872
+ & > li:first-child {
873
+ margin-bottom: govuk-spacing(4);
874
+ }
875
+
876
+ @supports (display: grid) {
877
+ & > li:first-child {
878
+ grid-column: span 2;
879
+ }
880
+ }
881
+
882
+ & > li:first-child {
883
+ border-bottom: 1px solid $govuk-border-colour;
884
+ padding-bottom: 0;
885
+ -ms-grid-column-span: 2;
886
+ -ms-grid-column: 1;
887
+ -ms-grid-row: 1;
888
+ }
889
+
890
+ & > li:nth-child(2) {
891
+ -ms-grid-column: 1;
892
+ -ms-grid-row: 2;
893
+ }
894
+
895
+ & > li:nth-child(3) {
896
+ -ms-grid-column: 1;
897
+ -ms-grid-row: 3;
898
+ }
899
+
900
+ & > li:nth-child(4) {
901
+ -ms-grid-column: 1;
902
+ -ms-grid-row: 4;
903
+ }
904
+
905
+ & > li:nth-child(5) {
906
+ -ms-grid-column: 2;
907
+ -ms-grid-row: 2;
908
+ }
909
+
910
+ & > li:nth-child(6) {
911
+ -ms-grid-column: 2;
912
+ -ms-grid-row: 3;
913
+ }
782
914
  }
783
915
  }
784
916
 
@@ -790,6 +922,10 @@ $chevron-indent-spacing: 7px;
790
922
  @include govuk-media-query($from: "desktop") {
791
923
  font-weight: bold;
792
924
  padding: 0;
925
+
926
+ &:after {
927
+ content: none;
928
+ }
793
929
  }
794
930
  }
795
931
 
@@ -800,19 +936,21 @@ $chevron-indent-spacing: 7px;
800
936
  }
801
937
 
802
938
  // Dropdown menu footer links.
803
- .gem-c-layout-super-navigation-header__navigation-second-footer {
804
- border-top: 1px solid govuk-colour("mid-grey");
939
+ .gem-c-layout-super-navigation-header__navigation-second-footer-break {
940
+ @include govuk-media-query($until: "desktop") {
941
+ display: none;
942
+ }
805
943
  }
806
944
 
807
945
  .gem-c-layout-super-navigation-header__navigation-second-footer-list {
808
946
  list-style: none;
809
- padding-bottom: govuk-spacing(8);
810
- padding-top: govuk-spacing(4);
811
-
812
- @include govuk-grid-column($width: "two-thirds", $float: right, $at: "desktop");
947
+ padding: 0 0 govuk-spacing(8) 0;
813
948
 
814
949
  @include govuk-media-query($from: "desktop") {
815
- padding: govuk-spacing(7) 0 govuk-spacing(8) 0;
950
+ margin: 0 (0 - govuk-spacing(3)) 0 (0 - govuk-spacing(3));
951
+ padding: govuk-spacing(8) 0 govuk-spacing(9) 0;
952
+ @include columns(2, 2, "li");
953
+ @include columns-children(2, 2, "li");
816
954
  }
817
955
  }
818
956
 
@@ -821,15 +959,12 @@ $chevron-indent-spacing: 7px;
821
959
  position: relative;
822
960
 
823
961
  @include govuk-media-query($from: "desktop") {
824
- box-sizing: border-box;
825
- float: left;
826
- padding: 0 govuk-spacing(3);
827
- width: 50%;
962
+ padding: 0 govuk-spacing(3) 0 govuk-spacing(3);
828
963
  }
829
964
  }
830
965
 
831
966
  .gem-c-layout-super-navigation-header__navigation-second-footer-link {
832
- @include govuk-font($size: 19, $weight: bold);
967
+ @include govuk-font($size: 19, $weight: normal);
833
968
  display: inline-block;
834
969
  margin: govuk-spacing(1) 0;
835
970
 
@@ -0,0 +1,30 @@
1
+ .gem-c-single-page-notification-button__submit {
2
+ padding: govuk-spacing(2);
3
+ margin: govuk-spacing(0);
4
+ border: 1px solid $govuk-border-colour;
5
+ color: $govuk-link-colour;
6
+ cursor: pointer;
7
+ background: none;
8
+
9
+ &:focus {
10
+ @include govuk-focused-text;
11
+ background-color: $govuk-focus-colour;
12
+ border-color: transparent;
13
+ box-shadow: 0 $govuk-focus-width $govuk-text-colour;
14
+ }
15
+
16
+ &:hover {
17
+ background-color: govuk-colour("light-grey");
18
+ color: $govuk-link-hover-colour;
19
+
20
+ &:focus {
21
+ color: $govuk-text-colour;
22
+ }
23
+ }
24
+ }
25
+
26
+ .gem-c-single-page-notification-button__icon {
27
+ color: govuk-colour("black");
28
+ vertical-align: top;
29
+ margin-right: govuk-spacing(1);
30
+ }
@@ -0,0 +1,5 @@
1
+ @mixin prefixed-transform($translateY: 0, $rotate: 0, $scale: 1) {
2
+ -webkit-transform: translateY($translateY) rotate($rotate) scale($scale);
3
+ -ms-transform: translateY($translateY) rotate($rotate) scale($scale);
4
+ transform: translateY($translateY) rotate($rotate) scale($scale);
5
+ }
@@ -4,6 +4,23 @@ module GovukPublishingComponents
4
4
  "
5
5
  Links in the component must:
6
6
 
7
+ - accept focus
8
+ - be focusable with a keyboard
9
+ - be usable with a keyboard
10
+ - indicate when they have focus
11
+ - change in appearance when touched (in the touch-down state)
12
+ - change in appearance when hovered
13
+ - be usable with touch
14
+ - be usable with [voice commands](https://www.w3.org/WAI/perspectives/voice.html)
15
+ - have visible text
16
+ - have meaningful text
17
+ "
18
+ end
19
+
20
+ def self.button
21
+ "
22
+ Buttons in the component must:
23
+
7
24
  - accept focus
8
25
  - be focusable with a keyboard
9
26
  - be usable with a keyboard