govuk_publishing_components 27.11.0 → 27.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +48 -0
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +6 -4
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +0 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +172 -119
  7. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss +2 -2
  8. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_prefixed-transform.scss +5 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +9 -0
  10. data/app/views/govuk_publishing_components/components/_big_number.html.erb +0 -1
  11. data/app/views/govuk_publishing_components/components/_input.html.erb +35 -22
  12. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +3 -3
  13. data/app/views/govuk_publishing_components/components/_metadata.html.erb +2 -0
  14. data/app/views/govuk_publishing_components/components/_search.html.erb +2 -1
  15. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +7 -13
  16. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +4 -5
  17. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +0 -6
  18. data/app/views/govuk_publishing_components/components/docs/input.yml +10 -0
  19. data/app/views/govuk_publishing_components/components/docs/metadata.yml +7 -0
  20. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +21 -3
  21. data/config/locales/ar.yml +0 -3
  22. data/config/locales/az.yml +0 -3
  23. data/config/locales/be.yml +0 -3
  24. data/config/locales/bg.yml +0 -3
  25. data/config/locales/bn.yml +0 -3
  26. data/config/locales/cs.yml +0 -3
  27. data/config/locales/cy.yml +0 -3
  28. data/config/locales/da.yml +0 -3
  29. data/config/locales/de.yml +0 -3
  30. data/config/locales/dr.yml +0 -3
  31. data/config/locales/el.yml +0 -3
  32. data/config/locales/en.yml +1 -6
  33. data/config/locales/es-419.yml +0 -3
  34. data/config/locales/es.yml +0 -3
  35. data/config/locales/et.yml +0 -3
  36. data/config/locales/fa.yml +0 -3
  37. data/config/locales/fi.yml +0 -3
  38. data/config/locales/fr.yml +0 -3
  39. data/config/locales/gd.yml +0 -3
  40. data/config/locales/gu.yml +0 -3
  41. data/config/locales/he.yml +0 -3
  42. data/config/locales/hi.yml +0 -3
  43. data/config/locales/hr.yml +0 -3
  44. data/config/locales/hu.yml +0 -3
  45. data/config/locales/hy.yml +0 -3
  46. data/config/locales/id.yml +0 -3
  47. data/config/locales/is.yml +0 -3
  48. data/config/locales/it.yml +0 -3
  49. data/config/locales/ja.yml +0 -3
  50. data/config/locales/ka.yml +0 -3
  51. data/config/locales/kk.yml +0 -3
  52. data/config/locales/ko.yml +0 -3
  53. data/config/locales/lt.yml +0 -3
  54. data/config/locales/lv.yml +0 -3
  55. data/config/locales/ms.yml +0 -3
  56. data/config/locales/mt.yml +0 -3
  57. data/config/locales/nl.yml +0 -3
  58. data/config/locales/no.yml +0 -3
  59. data/config/locales/pa-pk.yml +0 -3
  60. data/config/locales/pa.yml +0 -3
  61. data/config/locales/pl.yml +0 -3
  62. data/config/locales/ps.yml +0 -3
  63. data/config/locales/pt.yml +0 -3
  64. data/config/locales/ro.yml +0 -3
  65. data/config/locales/ru.yml +0 -3
  66. data/config/locales/si.yml +0 -3
  67. data/config/locales/sk.yml +0 -3
  68. data/config/locales/sl.yml +0 -3
  69. data/config/locales/so.yml +0 -3
  70. data/config/locales/sq.yml +0 -3
  71. data/config/locales/sr.yml +0 -3
  72. data/config/locales/sv.yml +0 -3
  73. data/config/locales/sw.yml +0 -3
  74. data/config/locales/ta.yml +0 -3
  75. data/config/locales/th.yml +0 -3
  76. data/config/locales/tk.yml +0 -3
  77. data/config/locales/tr.yml +0 -3
  78. data/config/locales/uk.yml +0 -3
  79. data/config/locales/ur.yml +0 -3
  80. data/config/locales/uz.yml +0 -3
  81. data/config/locales/vi.yml +0 -3
  82. data/config/locales/zh-hk.yml +0 -3
  83. data/config/locales/zh-tw.yml +0 -3
  84. data/config/locales/zh.yml +0 -3
  85. data/lib/govuk_publishing_components/presenters/button_helper.rb +1 -0
  86. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +15 -4
  87. data/lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb +40 -0
  88. data/lib/govuk_publishing_components/version.rb +1 -1
  89. data/lib/govuk_publishing_components.rb +1 -1
  90. metadata +5 -4
  91. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss +0 -27
  92. data/lib/govuk_publishing_components/presenters/brexit_cta_helper.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cdfb123c38b321591389c84e2e9b397c5667f9782bc657efaaa59468d535f6a
4
- data.tar.gz: 8d71ce616148c775034f93537252b16b40b134918ed34ff46bfb971963f93ca4
3
+ metadata.gz: 1de3732f2f8d07ca871687595bcc8ee4ce0ed90ce07fba59000f91399e543646
4
+ data.tar.gz: 5bc957d6e609ab9c946872b7260118aa3e8fb718b0d0fd1a01813c3542715e09
5
5
  SHA512:
6
- metadata.gz: 16d792dd3e4cdf1350cf32bd1b5090e7dfe097ae3bbad51637b820745fb84d0ddb9ef9b0aa697c100f721ff9845c519cd335b1c459a10ba392c883eaaaca7cb0
7
- data.tar.gz: 02a880a029f8991916315ed45ca24e87bdc59db3c426966b005f8ab043f21fbcb9a7c00fcc9686a4e12a6fe6502168f4d022fdc0c32f5cbebcc1a2e5c54d7e71
6
+ metadata.gz: 8cffec1a9a81f634492fb7c47f95c9ffb6b2664c951b15bbfa1a6f790fa1fe2e3d9bdaed3910e6b5cbcebe6152e15ba60585bc9438951c205a72a662b0bb1fe1
7
+ data.tar.gz: bd6342f5215c706369f52a8461b756a203274253c15832dda29b3aa9b8d883ee48e5b52441e1fba95e9f798e4cb17a00830a8b61c85301b33e1287d039ec6ac1
@@ -102,7 +102,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
102
102
  // either `desktop` or `mobile` so it can be interpolated to access the
103
103
  // `data-toggle-{desktop|mobile}-group` attribute.
104
104
  var windowSize = function () {
105
- return window.innerWidth >= SETTINGS.breakpoint.desktop ? 'desktop' : 'mobile'
105
+ return document.documentElement.clientWidth >= SETTINGS.breakpoint.desktop ? 'desktop' : 'mobile'
106
106
  }
107
107
 
108
108
  function SuperNavigationMegaMenu ($module) {
@@ -0,0 +1,48 @@
1
+ /* global XMLHttpRequest */
2
+ window.GOVUK = window.GOVUK || {}
3
+ window.GOVUK.Modules = window.GOVUK.Modules || {};
4
+
5
+ (function (Modules) {
6
+ function SinglePageNotificationButton ($module) {
7
+ this.$module = $module
8
+ this.basePath = this.$module.querySelector('input[name="base_path"]').value
9
+ this.buttonLocation = this.$module.getAttribute('data-button-location')
10
+
11
+ this.personalisationEndpoint = '/api/personalisation/check-email-subscription?base_path=' + this.basePath
12
+ // This attribute is passed through to the personalisation API to ensure the updated button has the same button_location for analytics
13
+ if (this.buttonLocation) this.personalisationEndpoint += '&button_location=' + this.buttonLocation
14
+ }
15
+
16
+ SinglePageNotificationButton.prototype.init = function () {
17
+ var xhr = new XMLHttpRequest()
18
+ xhr.open('GET', this.personalisationEndpoint, true)
19
+
20
+ xhr.onreadystatechange = function () {
21
+ if (xhr.readyState === 4 && xhr.status === 200) {
22
+ var responseText = xhr.responseText
23
+ // if response text exists and is JSON parse-able, parse the response and get the button html
24
+ if (responseText && this.responseIsJSON(responseText)) {
25
+ var newButton = JSON.parse(responseText).button_html
26
+ var html = document.createElement('div')
27
+ html.innerHTML = newButton
28
+ // test that the html returned contains the button component; if yes, swap the button for the updated version
29
+ var responseHasButton = html.querySelector('form.gem-c-single-page-notification-button .gem-c-single-page-notification-button__submit')
30
+ if (responseHasButton) {
31
+ this.$module.outerHTML = newButton
32
+ }
33
+ }
34
+ }
35
+ }.bind(this)
36
+ xhr.send()
37
+ }
38
+
39
+ SinglePageNotificationButton.prototype.responseIsJSON = function (string) {
40
+ try {
41
+ JSON.parse(string)
42
+ } catch (e) {
43
+ return false
44
+ }
45
+ return true
46
+ }
47
+ Modules.SinglePageNotificationButton = SinglePageNotificationButton
48
+ })(window.GOVUK.Modules)
@@ -1,3 +1,5 @@
1
+ @import "mixins/prefixed-transform";
2
+
1
3
  $gem-c-accordion-border-width: 3px;
2
4
  $gem-c-accordion-bottom-border-width: 1px;
3
5
 
@@ -69,6 +71,7 @@ $gem-c-accordion-bottom-border-width: 1px;
69
71
  }
70
72
 
71
73
  &:after {
74
+ @include prefixed-transform($rotate: -45deg);
72
75
  content: "";
73
76
  display: block;
74
77
  box-sizing: border-box;
@@ -78,7 +81,6 @@ $gem-c-accordion-bottom-border-width: 1px;
78
81
  height: govuk-em(6, 14);
79
82
  border-top: govuk-em(2, 14) solid;
80
83
  border-right: govuk-em(2, 14) solid;
81
- transform: rotate(-45deg);
82
84
  left: govuk-em(6, 14);
83
85
  bottom: govuk-em(5, 14);
84
86
 
@@ -111,7 +113,7 @@ $gem-c-accordion-bottom-border-width: 1px;
111
113
 
112
114
  // Rotate icon to create "Down" version
113
115
  .gem-c-accordion-nav__chevron--down {
114
- transform: rotate(180deg);
116
+ @include prefixed-transform($rotate: 180deg);
115
117
  }
116
118
 
117
119
  .gem-c-accordion__section-heading {
@@ -296,12 +298,12 @@ $gem-c-accordion-bottom-border-width: 1px;
296
298
 
297
299
  // Reduce Chevron size
298
300
  .gem-c-accordion-nav__chevron {
301
+ @include prefixed-transform($scale: .875);
299
302
  width: govuk-em(20, 14);
300
303
  height: govuk-em(20, 14);
301
304
  margin-left: govuk-em(5, 14);
302
305
  border: govuk-em(1, 14) solid;
303
306
  border-radius: govuk-em(100, 14);
304
- transform: scale(.875);
305
307
 
306
308
  &:after {
307
309
  width: govuk-em(6, 14);
@@ -314,7 +316,7 @@ $gem-c-accordion-bottom-border-width: 1px;
314
316
  }
315
317
 
316
318
  .gem-c-accordion-nav__chevron--down {
317
- transform: scale(.875) rotate(180deg);
319
+ @include prefixed-transform($rotate: 180deg, $scale: .875);
318
320
  }
319
321
 
320
322
  .gem-c-accordion__section-summary {
@@ -16,7 +16,6 @@
16
16
  @import "govspeak/place";
17
17
  @import "govspeak/stat-headline";
18
18
  @import "govspeak/steps";
19
- @import "govspeak/summary";
20
19
  @import "govspeak/tables";
21
20
  @import "govspeak/typography";
22
21
  @import "govspeak/warning-callout";
@@ -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
@@ -98,19 +100,21 @@
98
100
 
99
101
  $icon-size: 20px;
100
102
  $chevron-indent-spacing: 7px;
103
+ $black-bar-height: 50px;
104
+ $search-width-or-height: $black-bar-height;
101
105
 
102
106
  @mixin chevron($colour, $update: false) {
103
107
  @if ($update == true) {
104
108
  border-bottom-color: $colour;
105
109
  border-right-color: $colour;
106
110
  } @else {
107
- border-bottom: 3px solid $colour;
108
- 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;
109
114
  content: " ";
110
115
  display: inline-block;
111
116
  height: 8px;
112
117
  margin: 0 8px 0 2px;
113
- transform: translateY(-35%) rotate(45deg);
114
118
  vertical-align: middle;
115
119
  width: 8px;
116
120
  }
@@ -130,10 +134,10 @@ $chevron-indent-spacing: 7px;
130
134
  background: none;
131
135
  bottom: 0;
132
136
  content: " ";
133
- height: govuk-spacing(1);
134
- left: govuk-spacing(4);
137
+ height: 3px;
138
+ left: govuk-spacing(3);
135
139
  position: absolute;
136
- right: govuk-spacing(4);
140
+ right: govuk-spacing(3);
137
141
  top: auto;
138
142
  }
139
143
 
@@ -165,7 +169,7 @@ $chevron-indent-spacing: 7px;
165
169
  position: relative;
166
170
 
167
171
  .lte-ie8 & {
168
- height: govuk-spacing(9);
172
+ height: $black-bar-height;
169
173
  }
170
174
 
171
175
  [hidden] {
@@ -183,8 +187,8 @@ $chevron-indent-spacing: 7px;
183
187
 
184
188
  .gem-c-layout-super-navigation-header__header-logo {
185
189
  height: govuk-spacing(6);
186
- padding-bottom: govuk-spacing(3);
187
- padding-top: govuk-spacing(3);
190
+ padding-bottom: govuk-spacing(2);
191
+ padding-top: govuk-spacing(2);
188
192
 
189
193
  @include govuk-media-query($from: "desktop") {
190
194
  display: block;
@@ -228,24 +232,18 @@ $chevron-indent-spacing: 7px;
228
232
  @include govuk-media-query($from: "desktop") {
229
233
  display: inline-block;
230
234
  }
231
-
232
- .js-module-initialised & {
233
- padding: 0 0 govuk-spacing(9) 0;
234
-
235
- @include govuk-media-query($from: "desktop") {
236
- padding: 0;
237
- }
238
- }
239
235
  }
240
236
 
241
237
  .gem-c-layout-super-navigation-header__navigation-item,
242
238
  .gem-c-layout-super-navigation-header__search-item {
243
239
  display: block;
244
- margin: 0 govuk-spacing(3);
240
+ margin: 0;
241
+ padding: govuk-spacing(2) govuk-spacing(3);
245
242
  position: relative;
246
243
 
247
244
  @include govuk-media-query($from: "tablet") {
248
245
  margin: 0 govuk-spacing(6);
246
+ padding: govuk-spacing(2) 0;
249
247
  }
250
248
 
251
249
  @include govuk-media-query($from: "desktop") {
@@ -261,8 +259,15 @@ $chevron-indent-spacing: 7px;
261
259
  .gem-c-layout-super-navigation-header__navigation-item {
262
260
  border-bottom: 1px solid $govuk-border-colour;
263
261
 
262
+ .js-module-initialised & {
263
+ &:last-child {
264
+ border-bottom: none;
265
+ }
266
+ }
267
+
264
268
  @include govuk-media-query($from: "desktop") {
265
269
  border-bottom: 0;
270
+ padding: 0;
266
271
  }
267
272
  }
268
273
 
@@ -326,7 +331,7 @@ $chevron-indent-spacing: 7px;
326
331
  // stylelint-enable max-nesting-depth
327
332
 
328
333
  height: govuk-spacing(4);
329
- padding: govuk-spacing(4);
334
+ padding: govuk-spacing(3);
330
335
  position: relative;
331
336
 
332
337
  &:before {
@@ -343,28 +348,40 @@ $chevron-indent-spacing: 7px;
343
348
 
344
349
  // stylelint-disable max-nesting-depth
345
350
  @include focus-and-focus-visible {
346
- box-shadow: none;
347
- color: $govuk-focus-text-colour;
351
+ &,
352
+ &:hover {
353
+ box-shadow: none;
354
+ color: $govuk-focus-text-colour;
348
355
 
349
- &:after {
350
- background: $govuk-focus-text-colour;
356
+ &:after {
357
+ background: $govuk-focus-text-colour;
358
+ }
351
359
  }
352
360
  }
353
361
 
354
362
  @include focus-not-focus-visible {
355
363
  &,
356
364
  &:hover {
357
- color: govuk-colour("white");
358
365
  text-decoration: none;
359
366
  }
360
- }
361
- // stylelint-enable max-nesting-depth
362
367
 
363
- &: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
+
364
380
  &:after {
365
381
  background: none;
366
382
  }
367
383
  }
384
+ // stylelint-enable max-nesting-depth
368
385
 
369
386
  &:after {
370
387
  @include pseudo-underline;
@@ -423,8 +440,8 @@ $chevron-indent-spacing: 7px;
423
440
  @if $govuk-typography-use-rem {
424
441
  font-size: govuk-px-to-rem(16px);
425
442
  }
426
- height: govuk-spacing(9);
427
- padding: govuk-spacing(4);
443
+ height: $black-bar-height;
444
+ padding: govuk-spacing(3);
428
445
  position: relative;
429
446
  text-decoration: none;
430
447
 
@@ -463,7 +480,7 @@ $chevron-indent-spacing: 7px;
463
480
  &.gem-c-layout-super-navigation-header__open-button {
464
481
  @include focus-not-focus-visible {
465
482
  &:before {
466
- transform: translateY(0) rotate(225deg);
483
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
467
484
  }
468
485
  }
469
486
 
@@ -509,7 +526,7 @@ $chevron-indent-spacing: 7px;
509
526
  background: $govuk-brand-colour;
510
527
 
511
528
  &:hover {
512
- background: none;
529
+ background: govuk-colour("black");
513
530
 
514
531
  &:before {
515
532
  left: 0;
@@ -524,6 +541,30 @@ $chevron-indent-spacing: 7px;
524
541
  content: none;
525
542
  }
526
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
+ }
527
568
  }
528
569
  }
529
570
  }
@@ -574,10 +615,11 @@ $chevron-indent-spacing: 7px;
574
615
  box-sizing: border-box;
575
616
  color: govuk-colour("white");
576
617
  cursor: pointer;
577
- height: govuk-spacing(9);
618
+ height: $black-bar-height;
578
619
  padding: 0;
620
+ margin: 0;
579
621
  position: absolute;
580
- right: ((govuk-spacing(9) - govuk-spacing(3)) - 1px); // width of the search button (60px) - 15px - 1px to create an overlap between buttons and stop the border appearing to hang off the buttons when they're focused/open
622
+ 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
581
623
  top: 0;
582
624
  z-index: 10;
583
625
 
@@ -615,6 +657,10 @@ $chevron-indent-spacing: 7px;
615
657
  }
616
658
  }
617
659
 
660
+ &:after {
661
+ @include pseudo-underline;
662
+ }
663
+
618
664
  // Open button modifier
619
665
  &.gem-c-layout-super-navigation-header__open-button {
620
666
  // stylelint-disable max-nesting-depth
@@ -622,6 +668,10 @@ $chevron-indent-spacing: 7px;
622
668
  @include govuk-focused-text;
623
669
  box-shadow: none;
624
670
 
671
+ &:after {
672
+ background-color: $govuk-focus-colour;
673
+ }
674
+
625
675
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
626
676
  color: govuk-colour("black");
627
677
  border-color: $govuk-focus-colour;
@@ -629,7 +679,7 @@ $chevron-indent-spacing: 7px;
629
679
  @include govuk-media-query($from: 360px) {
630
680
  &:before {
631
681
  @include chevron(govuk-colour("black"), true);
632
- transform: translateY(0) rotate(225deg);
682
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
633
683
  }
634
684
  }
635
685
  }
@@ -638,14 +688,18 @@ $chevron-indent-spacing: 7px;
638
688
  @include focus-not-focus-visible {
639
689
  background: govuk-colour("light-grey");
640
690
 
691
+ &:after {
692
+ background-color: $govuk-link-colour;
693
+ }
694
+
641
695
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
642
- color: govuk-colour("black");
696
+ color: $govuk-link-colour;
643
697
  border-color: govuk-colour("light-grey");
644
698
 
645
699
  @include govuk-media-query($from: 360px) {
646
700
  &:before {
647
- @include chevron(govuk-colour("black"));
648
- transform: translateY(0) rotate(225deg);
701
+ @include chevron($govuk-link-colour);
702
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
649
703
  }
650
704
  }
651
705
  }
@@ -658,7 +712,7 @@ $chevron-indent-spacing: 7px;
658
712
  display: inline-block;
659
713
  border-left: 1px solid govuk-colour("white");
660
714
  border-right: 1px solid govuk-colour("white");
661
- margin: govuk-spacing(2) 0;
715
+ margin: 0;
662
716
  padding: govuk-spacing(2) govuk-spacing(4);
663
717
 
664
718
  @include govuk-media-query($from: 360px) {
@@ -675,12 +729,12 @@ $chevron-indent-spacing: 7px;
675
729
  border: 0;
676
730
  color: govuk-colour("white");
677
731
  cursor: pointer;
678
- height: govuk-spacing(9);
679
- padding: govuk-spacing(4);
732
+ height: $search-width-or-height;
733
+ padding: govuk-spacing(3);
680
734
  position: absolute;
681
735
  right: (0 - govuk-spacing(3));
682
736
  top: 0;
683
- width: govuk-spacing(9);
737
+ width: $search-width-or-height;
684
738
 
685
739
  @include focus-and-focus-visible {
686
740
  @include govuk-focused-text;
@@ -749,7 +803,7 @@ $chevron-indent-spacing: 7px;
749
803
  font-weight: normal;
750
804
  left: 0;
751
805
  line-height: 22px;
752
- padding: govuk-spacing(4) 0;
806
+ padding: govuk-spacing(3) 0;
753
807
  pointer-events: none;
754
808
  position: absolute;
755
809
  right: 0;
@@ -769,7 +823,6 @@ $chevron-indent-spacing: 7px;
769
823
  left: 0;
770
824
  position: absolute;
771
825
  right: 0;
772
- top: govuk-spacing(9);
773
826
  }
774
827
  }
775
828
 
@@ -785,96 +838,57 @@ $chevron-indent-spacing: 7px;
785
838
 
786
839
  // Dropdown menu items.
787
840
  .gem-c-layout-super-navigation-header__dropdown-list-item {
788
- margin: 0 0 0 $chevron-indent-spacing;
789
- padding: govuk-spacing(2) 0;
841
+ box-sizing: border-box;
842
+ padding: 0 0 govuk-spacing(4) 0;
790
843
  position: relative;
791
-
792
- @include govuk-media-query($from: "desktop") {
793
- margin: 0;
794
- padding: govuk-spacing(2) 0;
795
- }
796
844
  }
797
845
 
798
846
  // Navigation menu items.
799
847
  .gem-c-layout-super-navigation-header__navigation-second-items {
800
- margin: 0 auto;
801
- padding: govuk-spacing(2) 0 govuk-spacing(6) 0;
848
+ list-style: none;
849
+ margin: 0;
850
+ padding: govuk-spacing(6) govuk-spacing(4);
851
+
852
+ & > li {
853
+ margin: 0;
854
+ }
802
855
 
803
856
  @include govuk-media-query($from: "desktop") {
804
- margin-left: (0 - govuk-spacing(3));
805
- margin-right: (0 - govuk-spacing(3));
806
- padding: govuk-spacing(6) 0 govuk-spacing(8) 0;
857
+ margin: 0 (0 - govuk-spacing(3));
858
+ padding: govuk-spacing(7) 0 govuk-spacing(8) 0;
807
859
 
808
860
  & > li {
809
- box-sizing: border-box;
810
- margin: 0 govuk-spacing(3) govuk-spacing(2) govuk-spacing(3);
861
+ margin: 0 govuk-spacing(3);
811
862
  }
812
863
  }
813
864
  }
814
865
 
815
866
  .gem-c-layout-super-navigation-header__navigation-second-items--topics {
816
867
  @include govuk-media-query($from: "desktop") {
817
- @include columns(18, 2, "li");
818
- @include columns-children(18, 2, "li");
868
+ @include columns(17, 2, "li");
869
+ @include columns-children(17, 2, "li");
819
870
  }
820
871
  }
821
872
 
822
873
  .gem-c-layout-super-navigation-header__navigation-second-items--government-activity {
823
- & > li:first-child {
824
- margin-bottom: govuk-spacing(7);
825
- }
826
-
827
874
  @include govuk-media-query($from: "desktop") {
828
- @include columns(7, 2, "li");
875
+ @include columns(6, 2, "li");
876
+ @include columns-children(6, 2, "li");
829
877
  padding-bottom: 0;
830
878
 
831
- & > li,
832
- & > li:first-child {
833
- margin-bottom: govuk-spacing(4);
834
- }
835
-
836
- @supports (display: grid) {
837
- & > li:first-child {
838
- grid-column: span 2;
839
- }
840
- }
841
-
842
- & > li:first-child {
843
- border-bottom: 1px solid $govuk-border-colour;
844
- padding-bottom: 0;
845
- -ms-grid-column-span: 2;
846
- -ms-grid-column: 1;
847
- -ms-grid-row: 1;
848
- }
849
-
850
- & > li:nth-child(2) {
851
- -ms-grid-column: 1;
852
- -ms-grid-row: 2;
853
- }
854
-
855
- & > li:nth-child(3) {
856
- -ms-grid-column: 1;
857
- -ms-grid-row: 3;
858
- }
859
-
860
- & > li:nth-child(4) {
861
- -ms-grid-column: 1;
862
- -ms-grid-row: 4;
863
- }
864
-
865
- & > li:nth-child(5) {
866
- -ms-grid-column: 2;
867
- -ms-grid-row: 2;
868
- }
869
-
870
- & > li:nth-child(6) {
871
- -ms-grid-column: 2;
872
- -ms-grid-row: 3;
879
+ & > li {
880
+ box-sizing: border-box;
881
+ padding-bottom: govuk-spacing(4);
873
882
  }
874
883
  }
875
884
  }
876
885
 
877
886
  .gem-c-layout-super-navigation-header__navigation-second-item-link {
887
+ font-size: 16px;
888
+ @if $govuk-typography-use-rem {
889
+ font-size: govuk-px-to-rem(16px);
890
+ }
891
+
878
892
  &:after {
879
893
  @include make-selectable-area-bigger;
880
894
  }
@@ -890,9 +904,11 @@ $chevron-indent-spacing: 7px;
890
904
  }
891
905
 
892
906
  .gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
893
- @include govuk-font($size: 19, $weight: bold);
894
- margin-bottom: 0;
895
- margin-top: govuk-spacing(2);
907
+ font-size: 16px;
908
+ @if $govuk-typography-use-rem {
909
+ font-size: govuk-px-to-rem(16px);
910
+ }
911
+ font-weight: bold;
896
912
  }
897
913
 
898
914
  // Dropdown menu footer links.
@@ -904,28 +920,31 @@ $chevron-indent-spacing: 7px;
904
920
 
905
921
  .gem-c-layout-super-navigation-header__navigation-second-footer-list {
906
922
  list-style: none;
907
- padding: 0 0 govuk-spacing(8) 0;
923
+ padding: 0 0 govuk-spacing(8) govuk-spacing(4);
908
924
 
909
925
  @include govuk-media-query($from: "desktop") {
910
- margin: 0 (0 - govuk-spacing(3)) 0 (0 - govuk-spacing(3));
911
- padding: govuk-spacing(8) 0 govuk-spacing(9) 0;
912
926
  @include columns(2, 2, "li");
913
927
  @include columns-children(2, 2, "li");
928
+ margin: 0 (0 - govuk-spacing(3));
929
+ padding: govuk-spacing(6) 0 govuk-spacing(7) 0;
914
930
  }
915
931
  }
916
932
 
917
933
  .gem-c-layout-super-navigation-header__navigation-second-footer-item {
918
- padding: govuk-spacing(2) 0 govuk-spacing(2) $chevron-indent-spacing;
934
+ padding: govuk-spacing(2) 0;
919
935
  position: relative;
920
936
 
921
937
  @include govuk-media-query($from: "desktop") {
922
- padding: 0 govuk-spacing(3) 0 govuk-spacing(3);
938
+ padding: 0 govuk-spacing(3);
923
939
  }
924
940
  }
925
941
 
926
942
  .gem-c-layout-super-navigation-header__navigation-second-footer-link {
927
- @include govuk-font($size: 19, $weight: normal);
928
943
  display: inline-block;
944
+ font-size: 16px;
945
+ @if $govuk-typography-use-rem {
946
+ font-size: govuk-px-to-rem(16px);
947
+ }
929
948
  margin: govuk-spacing(1) 0;
930
949
 
931
950
  &:after {
@@ -934,11 +953,23 @@ $chevron-indent-spacing: 7px;
934
953
 
935
954
  @include govuk-media-query($from: "desktop") {
936
955
  display: inline;
937
- font-weight: bold;
938
956
  padding: 0;
957
+
958
+ &:after {
959
+ content: none;
960
+ }
939
961
  }
940
962
  }
941
963
 
964
+ .gem-c-layout-super-navigation-header__navigation-second-item-description {
965
+ font-size: 16px;
966
+ @if $govuk-typography-use-rem {
967
+ font-size: govuk-px-to-rem(16px);
968
+ }
969
+ font-weight: normal;
970
+ margin: govuk-spacing(1) 0 0 0;
971
+ }
972
+
942
973
  // Search dropdown.
943
974
  .gem-c-layout-super-navigation-header__search-items {
944
975
  background: govuk-colour("light-grey");
@@ -964,12 +995,34 @@ $chevron-indent-spacing: 7px;
964
995
  }
965
996
 
966
997
  // Popular links.
998
+ .gem-c-layout-super-navigation-header__popular-item {
999
+ position: relative;
1000
+ padding: govuk-spacing(1) 0;
1001
+ }
1002
+
967
1003
  .gem-c-layout-super-navigation-header__popular-link {
968
- padding: govuk-spacing(2) 0;
969
1004
  display: inline-block;
1005
+ font-size: 16px;
1006
+ @if $govuk-typography-use-rem {
1007
+ font-size: govuk-px-to-rem(16px);
1008
+ }
1009
+ padding: 0;
1010
+
1011
+ &:after {
1012
+ @include make-selectable-area-bigger;
1013
+ }
970
1014
 
971
1015
  @include govuk-media-query($from: "desktop") {
972
- margin: govuk-spacing(1) 0;
973
- padding: 0;
1016
+ &:after {
1017
+ content: none;
1018
+ }
1019
+ }
1020
+ }
1021
+
1022
+ // To be used with .govuk-width-container - we only need the margins from
1023
+ // desktop onwards.
1024
+ .gem-c-layout-super-navigation-header__width-container {
1025
+ @include govuk-media-query($until: "desktop") {
1026
+ margin: 0;
974
1027
  }
975
1028
  }