govuk_publishing_components 27.12.0 → 27.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics/auto-scroll-tracker.js +24 -3
  3. data/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js +24 -8
  4. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +1 -0
  5. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +1 -1
  6. data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +48 -0
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +0 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +96 -83
  9. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss +2 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +9 -0
  11. data/app/views/govuk_publishing_components/components/_big_number.html.erb +0 -1
  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 +25 -9
  15. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +13 -17
  16. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +0 -6
  17. data/app/views/govuk_publishing_components/components/docs/metadata.yml +7 -0
  18. data/app/views/govuk_publishing_components/components/docs/search.yml +25 -0
  19. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +21 -3
  20. data/config/locales/en.yml +2 -4
  21. data/lib/govuk_publishing_components/presenters/button_helper.rb +1 -0
  22. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +4 -4
  23. data/lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb +37 -0
  24. data/lib/govuk_publishing_components/version.rb +1 -1
  25. data/lib/govuk_publishing_components.rb +1 -0
  26. metadata +4 -3
  27. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd11f04405f2a42af38607551e706bf8587d8dab56687f9dd7f9f568a76ee9da
4
- data.tar.gz: c365b23d1ce8a71ff06cc0fb2510a9c1f7aadb984a21ccb481256a441aaa0ef6
3
+ metadata.gz: 07e0c548e46fc4a7dcb04e7f2838f17b7fc6234804695cfbeca50d1aec4f4431
4
+ data.tar.gz: 33b0e798aed35a5ab8808ad6b6e0ee99a929c6d2b8da837d6acb156cf66d4f2c
5
5
  SHA512:
6
- metadata.gz: d4a1581abd6a891e2473feffcdf0a15c18d11536438d89387a6bfff055fa1c874f0cc38ec6f9299fba4f4dcd30ed5d4239d6f5133fac4c0e47dfffb62eca8eea
7
- data.tar.gz: 92c5a4c880e24c071d1ecec8a72fbe6ca1b852e23406e6cf61466930de1a21e49b086a98d12d60451a62b2fcad664ac2b0ea8b8918d8993ab4fb84b153df6ad1
6
+ metadata.gz: b48854f3ab1990a2166fbef3f8e57f2487778b7c9df6a0327e05318821b978ba3ef21f0a0865c6cc3cb714d0bff8a3fd6e102cd855fa1b28b78c32d66d92f0a0
7
+ data.tar.gz: 7bb47453cfc2208ffe22cb79c6493d85720a137b405709a545b3a6a6f37ee59e05b953a59c8cd067d2661038d3dbe323950b6662378ee24ee1ae8c14e98dbcd0
@@ -31,9 +31,21 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
31
31
  return
32
32
  }
33
33
 
34
+ this.trackType = this.$module.getAttribute('data-track-type')
35
+ var trackHeadings = this.$module.getAttribute('data-track-headings')
36
+ if (trackHeadings) {
37
+ try {
38
+ this.config.trackHeadings = JSON.parse(trackHeadings)
39
+ } catch (e) {
40
+ // if there's a problem with the config, don't start the tracker
41
+ console.error('Scroll tracker configuration error: ' + e.message, window.location)
42
+ window.GOVUK.analyticsVars.scrollTrackerStarted = false
43
+ return
44
+ }
45
+ }
46
+
34
47
  window.GOVUK.analyticsVars.scrollTrackerStarted = true
35
48
 
36
- this.trackType = this.$module.getAttribute('data-track-type')
37
49
  if (this.trackType === 'headings') {
38
50
  this.track = new AutoScrollTracker.Heading(this.config)
39
51
  } else {
@@ -145,15 +157,24 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
145
157
 
146
158
  // check heading is inside allowed elements, generally ignores everything outside of page content
147
159
  AutoScrollTracker.Heading.prototype.findAllowedHeadings = function () {
148
- var headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
149
160
  var headingsFound = []
161
+ var headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
162
+ var trackHeadings = this.config.trackHeadings
150
163
 
164
+ // this is a loop that only happens once as we currently only have one
165
+ // allowed element for headings to be in - 'main'
151
166
  for (var h = 0; h < this.config.allowHeadingsInside.length; h++) {
152
167
  var insideElements = document.querySelectorAll(this.config.allowHeadingsInside[h])
153
168
  for (var e = 0; e < insideElements.length; e++) {
154
169
  var found = insideElements[e].querySelectorAll(headings)
155
170
  for (var f = 0; f < found.length; f++) {
156
- headingsFound.push(found[f])
171
+ if (trackHeadings) {
172
+ if (trackHeadings.includes(found[f].textContent.trim())) {
173
+ headingsFound.push(found[f])
174
+ }
175
+ } else {
176
+ headingsFound.push(found[f])
177
+ }
157
178
  }
158
179
  }
159
180
  }
@@ -10,12 +10,18 @@
10
10
 
11
11
  var cookieBannerEngaged = GOVUK.cookie('cookies_preferences_set')
12
12
 
13
- // If not engaged, append only ?cookie-consent=not-engaged
14
- // If engaged and rejected, append only ?cookie-consent=reject
15
- // If engaged and accepted usage, append ?_ga=clientid if available and cookie-consent=accept
13
+ // If not engaged, append only ?cookie_consent=not-engaged
14
+ // If engaged and rejected, append only ?cookie_consent=reject
15
+ // If engaged and accepted usage, append ?_ga=clientid if available and cookie_consent=accept
16
16
 
17
17
  if (cookieBannerEngaged !== 'true') {
18
18
  this.decorate(element, 'cookie_consent=not-engaged')
19
+ this.start = this.start.bind(this, $module)
20
+
21
+ // if the user has not engaged with the cookie banner yet, listen for the cookie consent accept/reject events
22
+ // re-start the module if cookies are accepted or rejected on the current page – setting cookie preferences does not reload the page
23
+ window.addEventListener('cookie-consent', this.start)
24
+ window.addEventListener('cookie-reject', this.start)
19
25
  return
20
26
  }
21
27
  var cookieConsent = GOVUK.getConsentCookie()
@@ -50,6 +56,8 @@
50
56
  this.decorate = function (element, param) {
51
57
  var attribute = 'href'
52
58
  var attributeValue = element.getAttribute(attribute)
59
+ var cookieConsentParameterPattern = /cookie_consent=[^&]*/
60
+ var paramIsCookieConsent = param.match(cookieConsentParameterPattern)
53
61
 
54
62
  if (!attributeValue) {
55
63
  attribute = 'action'
@@ -58,13 +66,21 @@
58
66
 
59
67
  if (!attributeValue) { return }
60
68
 
61
- if (attributeValue.includes('?')) {
62
- attributeValue += '&' + param
63
- element.setAttribute(attribute, attributeValue)
69
+ var attributeHasCookieConsent = attributeValue.match(cookieConsentParameterPattern)
70
+
71
+ if (attributeHasCookieConsent && paramIsCookieConsent) {
72
+ // if the decorate function has received a cookie_consent parameter, but the target element already has a cookie_consent parameter, replace the existing parameter with the new value
73
+ attributeValue = attributeValue.replace(cookieConsentParameterPattern, param)
64
74
  } else {
65
- attributeValue += '?' + param
66
- element.setAttribute(attribute, attributeValue)
75
+ // otherwise, simply append the parameter to the target element href query string
76
+ if (attributeValue.includes('?')) {
77
+ attributeValue += '&' + param
78
+ } else {
79
+ attributeValue += '?' + param
80
+ }
67
81
  }
82
+
83
+ element.setAttribute(attribute, attributeValue)
68
84
  }
69
85
  }
70
86
 
@@ -97,6 +97,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
97
97
  this.$module.cookieBannerConfirmationMessage.focus()
98
98
  window.GOVUK.cookie('cookies_preferences_set', 'true', { days: 365 })
99
99
  window.GOVUK.setDefaultConsentCookie()
100
+ window.GOVUK.triggerEvent(window, 'cookie-reject')
100
101
  }
101
102
 
102
103
  CookieBanner.prototype.showConfirmationMessage = function () {
@@ -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 responseButtonContainer = html.querySelector('form.gem-c-single-page-notification-button')
30
+ if (responseButtonContainer) {
31
+ this.$module.parentNode.replaceChild(responseButtonContainer, this.$module)
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)
@@ -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";
@@ -134,7 +134,7 @@ $search-width-or-height: $black-bar-height;
134
134
  background: none;
135
135
  bottom: 0;
136
136
  content: " ";
137
- height: govuk-spacing(1);
137
+ height: 3px;
138
138
  left: govuk-spacing(3);
139
139
  position: absolute;
140
140
  right: govuk-spacing(3);
@@ -284,7 +284,7 @@ $search-width-or-height: $black-bar-height;
284
284
  font-size: govuk-px-to-rem(19px);
285
285
  }
286
286
  font-weight: bold;
287
- margin: govuk-spacing(3) 0 govuk-spacing(3) 0;
287
+ margin: govuk-spacing(3) 0;
288
288
 
289
289
  @include govuk-media-query($from: "desktop") {
290
290
  display: block;
@@ -480,7 +480,7 @@ $search-width-or-height: $black-bar-height;
480
480
  &.gem-c-layout-super-navigation-header__open-button {
481
481
  @include focus-not-focus-visible {
482
482
  &:before {
483
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
483
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
484
484
  }
485
485
  }
486
486
 
@@ -617,6 +617,7 @@ $search-width-or-height: $black-bar-height;
617
617
  cursor: pointer;
618
618
  height: $black-bar-height;
619
619
  padding: 0;
620
+ margin: 0;
620
621
  position: absolute;
621
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
622
623
  top: 0;
@@ -656,6 +657,10 @@ $search-width-or-height: $black-bar-height;
656
657
  }
657
658
  }
658
659
 
660
+ &:after {
661
+ @include pseudo-underline;
662
+ }
663
+
659
664
  // Open button modifier
660
665
  &.gem-c-layout-super-navigation-header__open-button {
661
666
  // stylelint-disable max-nesting-depth
@@ -663,6 +668,10 @@ $search-width-or-height: $black-bar-height;
663
668
  @include govuk-focused-text;
664
669
  box-shadow: none;
665
670
 
671
+ &:after {
672
+ background-color: $govuk-focus-colour;
673
+ }
674
+
666
675
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
667
676
  color: govuk-colour("black");
668
677
  border-color: $govuk-focus-colour;
@@ -670,7 +679,7 @@ $search-width-or-height: $black-bar-height;
670
679
  @include govuk-media-query($from: 360px) {
671
680
  &:before {
672
681
  @include chevron(govuk-colour("black"), true);
673
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
682
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
674
683
  }
675
684
  }
676
685
  }
@@ -679,14 +688,18 @@ $search-width-or-height: $black-bar-height;
679
688
  @include focus-not-focus-visible {
680
689
  background: govuk-colour("light-grey");
681
690
 
691
+ &:after {
692
+ background-color: $govuk-link-colour;
693
+ }
694
+
682
695
  .gem-c-layout-super-navigation-header__navigation-top-toggle-button-inner {
683
- color: govuk-colour("black");
696
+ color: $govuk-link-colour;
684
697
  border-color: govuk-colour("light-grey");
685
698
 
686
699
  @include govuk-media-query($from: 360px) {
687
700
  &:before {
688
- @include chevron(govuk-colour("black"));
689
- @include prefixed-transform($rotate: 225deg, $translateY: 0);
701
+ @include chevron($govuk-link-colour);
702
+ @include prefixed-transform($rotate: 225deg, $translateY: 1px);
690
703
  }
691
704
  }
692
705
  }
@@ -825,96 +838,57 @@ $search-width-or-height: $black-bar-height;
825
838
 
826
839
  // Dropdown menu items.
827
840
  .gem-c-layout-super-navigation-header__dropdown-list-item {
828
- margin: 0 0 0 $chevron-indent-spacing;
829
- padding: govuk-spacing(2) 0;
841
+ box-sizing: border-box;
842
+ padding: 0 0 govuk-spacing(4) 0;
830
843
  position: relative;
831
-
832
- @include govuk-media-query($from: "desktop") {
833
- margin: 0;
834
- padding: govuk-spacing(2) 0;
835
- }
836
844
  }
837
845
 
838
846
  // Navigation menu items.
839
847
  .gem-c-layout-super-navigation-header__navigation-second-items {
840
- margin: 0 auto;
841
- 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
+ }
842
855
 
843
856
  @include govuk-media-query($from: "desktop") {
844
- margin-left: (0 - govuk-spacing(3));
845
- margin-right: (0 - govuk-spacing(3));
846
- 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;
847
859
 
848
860
  & > li {
849
- box-sizing: border-box;
850
- margin: 0 govuk-spacing(3) govuk-spacing(2) govuk-spacing(3);
861
+ margin: 0 govuk-spacing(3);
851
862
  }
852
863
  }
853
864
  }
854
865
 
855
866
  .gem-c-layout-super-navigation-header__navigation-second-items--topics {
856
867
  @include govuk-media-query($from: "desktop") {
857
- @include columns(18, 2, "li");
858
- @include columns-children(18, 2, "li");
868
+ @include columns(17, 2, "li");
869
+ @include columns-children(17, 2, "li");
859
870
  }
860
871
  }
861
872
 
862
873
  .gem-c-layout-super-navigation-header__navigation-second-items--government-activity {
863
- & > li:first-child {
864
- margin-bottom: govuk-spacing(7);
865
- }
866
-
867
874
  @include govuk-media-query($from: "desktop") {
868
- @include columns(7, 2, "li");
875
+ @include columns(6, 2, "li");
876
+ @include columns-children(6, 2, "li");
869
877
  padding-bottom: 0;
870
878
 
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;
879
+ & > li {
880
+ box-sizing: border-box;
881
+ padding-bottom: govuk-spacing(4);
913
882
  }
914
883
  }
915
884
  }
916
885
 
917
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
+
918
892
  &:after {
919
893
  @include make-selectable-area-bigger;
920
894
  }
@@ -930,9 +904,11 @@ $search-width-or-height: $black-bar-height;
930
904
  }
931
905
 
932
906
  .gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
933
- @include govuk-font($size: 19, $weight: bold);
934
- margin-bottom: 0;
935
- 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;
936
912
  }
937
913
 
938
914
  // Dropdown menu footer links.
@@ -944,28 +920,31 @@ $search-width-or-height: $black-bar-height;
944
920
 
945
921
  .gem-c-layout-super-navigation-header__navigation-second-footer-list {
946
922
  list-style: none;
947
- padding: 0 0 govuk-spacing(8) 0;
923
+ padding: 0 0 govuk-spacing(8) govuk-spacing(4);
948
924
 
949
925
  @include govuk-media-query($from: "desktop") {
950
- margin: 0 (0 - govuk-spacing(3)) 0 (0 - govuk-spacing(3));
951
- padding: govuk-spacing(8) 0 govuk-spacing(9) 0;
952
926
  @include columns(2, 2, "li");
953
927
  @include columns-children(2, 2, "li");
928
+ margin: 0 (0 - govuk-spacing(3));
929
+ padding: govuk-spacing(6) 0 govuk-spacing(7) 0;
954
930
  }
955
931
  }
956
932
 
957
933
  .gem-c-layout-super-navigation-header__navigation-second-footer-item {
958
- padding: govuk-spacing(2) 0 govuk-spacing(2) $chevron-indent-spacing;
934
+ padding: govuk-spacing(2) 0;
959
935
  position: relative;
960
936
 
961
937
  @include govuk-media-query($from: "desktop") {
962
- padding: 0 govuk-spacing(3) 0 govuk-spacing(3);
938
+ padding: 0 govuk-spacing(3);
963
939
  }
964
940
  }
965
941
 
966
942
  .gem-c-layout-super-navigation-header__navigation-second-footer-link {
967
- @include govuk-font($size: 19, $weight: normal);
968
943
  display: inline-block;
944
+ font-size: 16px;
945
+ @if $govuk-typography-use-rem {
946
+ font-size: govuk-px-to-rem(16px);
947
+ }
969
948
  margin: govuk-spacing(1) 0;
970
949
 
971
950
  &:after {
@@ -974,11 +953,23 @@ $search-width-or-height: $black-bar-height;
974
953
 
975
954
  @include govuk-media-query($from: "desktop") {
976
955
  display: inline;
977
- font-weight: bold;
978
956
  padding: 0;
957
+
958
+ &:after {
959
+ content: none;
960
+ }
979
961
  }
980
962
  }
981
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
+
982
973
  // Search dropdown.
983
974
  .gem-c-layout-super-navigation-header__search-items {
984
975
  background: govuk-colour("light-grey");
@@ -1004,12 +995,34 @@ $search-width-or-height: $black-bar-height;
1004
995
  }
1005
996
 
1006
997
  // Popular links.
998
+ .gem-c-layout-super-navigation-header__popular-item {
999
+ position: relative;
1000
+ padding: govuk-spacing(1) 0;
1001
+ }
1002
+
1007
1003
  .gem-c-layout-super-navigation-header__popular-link {
1008
- padding: govuk-spacing(2) 0;
1009
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
+ }
1010
1014
 
1011
1015
  @include govuk-media-query($from: "desktop") {
1012
- margin: govuk-spacing(1) 0;
1013
- 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;
1014
1027
  }
1015
1028
  }
@@ -2,7 +2,7 @@
2
2
  margin-bottom: govuk-spacing(3);
3
3
 
4
4
  @include govuk-media-query($from: tablet) {
5
- margin-bottom: govuk-spacing(6) * 1.5;
5
+ margin-bottom: govuk-spacing(7);
6
6
  }
7
7
  }
8
8
 
@@ -10,7 +10,7 @@
10
10
  margin-top: govuk-spacing(3);
11
11
 
12
12
  @include govuk-media-query($from: tablet) {
13
- margin-top: govuk-spacing(6) * 1.5;
13
+ margin-top: govuk-spacing(7);
14
14
  }
15
15
  }
16
16
 
@@ -17,3 +17,12 @@ $gem-quiet-button-colour: govuk-colour("dark-grey", $legacy: "grey-1");
17
17
  $gem-quiet-button-hover-colour: darken($gem-quiet-button-colour, 5%);
18
18
 
19
19
  $gem-hover-dark-background: #dddcdb;
20
+
21
+ $govuk-colours-organisations: map-merge(
22
+ $govuk-colours-organisations,
23
+ (
24
+ "department-for-levelling-up-housing-and-communities": (
25
+ colour: #012169,
26
+ ),
27
+ )
28
+ );
@@ -1,5 +1,4 @@
1
1
  <%
2
- href ||= nil
3
2
  number ||= nil
4
3
  label ||= nil
5
4
  href ||= nil
@@ -133,7 +133,7 @@
133
133
  class="gem-c-layout-super-navigation-header__navigation-dropdown-menu"
134
134
  id="super-navigation-menu__section-<%= unique_id %>"
135
135
  >
136
- <div class="govuk-width-container">
136
+ <div class="govuk-width-container gem-c-layout-super-navigation-header__width-container">
137
137
  <div class="govuk-grid-row">
138
138
  <div class="govuk-grid-column-one-third-from-desktop">
139
139
  <% if link[:description].present? %>
@@ -144,7 +144,7 @@
144
144
  </div>
145
145
  <div class="govuk-grid-column-two-thirds-from-desktop">
146
146
  <% if link[:menu_contents].present? %>
147
- <ul class="govuk-list gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= link[:label].parameterize %>">
147
+ <ul class="gem-c-layout-super-navigation-header__navigation-second-items gem-c-layout-super-navigation-header__navigation-second-items--<%= link[:label].parameterize %>">
148
148
  <% link[:menu_contents].each do | item | %>
149
149
  <%
150
150
  has_description = item[:description].present?
@@ -163,7 +163,7 @@
163
163
  track_dimension_index: "29",
164
164
  }
165
165
  } %>
166
- <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0 govuk-!-margin-top-1" if has_description %>
166
+ <%= tag.p item[:description], class: "gem-c-layout-super-navigation-header__navigation-second-item-description" if has_description %>
167
167
  </li>
168
168
  <% end %>
169
169
  </ul>
@@ -11,9 +11,11 @@
11
11
  direction_class = ""
12
12
  direction_class = " direction-#{direction}" if local_assigns.include?(:direction)
13
13
 
14
+ shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
14
15
  classes = %w(gem-c-metadata)
15
16
  classes << "direction-#{direction}" if local_assigns.include?(:direction)
16
17
  classes << "gem-c-metadata--inverse" if inverse
18
+ classes << shared_helper.get_margin_bottom if local_assigns[:margin_bottom]
17
19
  %>
18
20
  <%= content_tag :div, class: classes, data: { module: "gem-toggle" } do %>
19
21
  <dl data-module="gem-track-click">
@@ -1,9 +1,12 @@
1
1
  <%
2
2
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
3
+ heading_helper = GovukPublishingComponents::Presenters::HeadingHelper.new(local_assigns)
3
4
 
4
5
  aria_controls ||= nil
5
6
  button_text ||= t("components.search_box.search_button")
6
7
  id ||= "search-main-" + SecureRandom.hex(4)
8
+ wrap_label_in_a_heading ||= false
9
+ label_margin_bottom ||= nil
7
10
  label_size ||= nil
8
11
  label_text ||= t("components.search_box.label")
9
12
  name ||= "q"
@@ -14,13 +17,6 @@
14
17
  data_attributes ||= {}
15
18
  data_attributes[:module] = 'gem-track-click'
16
19
 
17
- label_classes = []
18
- if (shared_helper.valid_heading_size?(label_size))
19
- label_classes << "govuk-label govuk-label--#{label_size}"
20
- else
21
- label_classes << "gem-c-search__label"
22
- end
23
-
24
20
  classes = %w[gem-c-search govuk-!-display-none-print]
25
21
  classes << (shared_helper.get_margin_top)
26
22
  classes << (shared_helper.get_margin_bottom) if local_assigns[:margin_bottom]
@@ -32,11 +28,31 @@
32
28
  classes << "gem-c-search--on-white"
33
29
  end
34
30
  classes << "gem-c-search--separate-label" if local_assigns.include?(:inline_label) or local_assigns.include?(:label_size)
31
+
32
+ label_classes = []
33
+ if (shared_helper.valid_heading_size?(label_size))
34
+ label_classes << "govuk-label govuk-label--#{label_size}"
35
+ else
36
+ label_classes << "gem-c-search__label"
37
+ end
38
+ label_classes << "govuk-!-margin-bottom-#{label_margin_bottom}" if [*1..9].include?(label_margin_bottom) and local_assigns.include?(:inline_label)
39
+
40
+ tag_label = capture do
41
+ tag.label({ for: id, class: label_classes }) do
42
+ label_text
43
+ end
44
+ end
35
45
  %>
36
46
 
37
47
  <div class="<%= classes.join(" ") %>" data-module="gem-toggle-input-class-on-focus">
38
- <%= tag.label({ for: id, class: label_classes }) do %>
39
- <%= label_text %>
48
+ <% if wrap_label_in_a_heading %>
49
+ <%= content_tag(shared_helper.get_heading_level, {
50
+ class: "govuk-!-margin-0",
51
+ }) do %>
52
+ <%= tag_label %>
53
+ <% end %>
54
+ <% else %>
55
+ <%= tag_label %>
40
56
  <% end %>
41
57
  <div class="gem-c-search__item-wrapper">
42
58
  <%= tag.input(
@@ -1,23 +1,19 @@
1
1
  <%
2
- page ||= ''
3
- data_attributes ||= {}
4
- base_path ||= nil
5
- local_assigns[:margin_bottom] ||= 3
6
- already_subscribed ||= false
7
- text ||= already_subscribed ? t('components.single_page_notification_button.unsubscribe_text') : t('components.single_page_notification_button.subscribe_text')
8
-
2
+ component_helper = GovukPublishingComponents::Presenters::SinglePageNotificationButtonHelper.new(local_assigns)
9
3
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
10
- wrapper_classes = %w(gem-c-single-page-notification-button govuk-!-display-none-print)
4
+
5
+ wrapper_classes = %w(govuk-!-display-none-print)
11
6
  wrapper_classes << shared_helper.get_margin_bottom
12
- classes = "govuk-body-s gem-c-single-page-notification-button__submit"
13
7
  %>
14
8
  <% button_text = capture do %>
15
- <svg class="gem-c-single-page-notification-button__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334"><path fill="currentColor" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z"/></svg><%= text %>
9
+ <svg class="gem-c-single-page-notification-button__icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 459.334 459.334"><path fill="currentColor" d="M177.216 404.514c-.001.12-.009.239-.009.359 0 30.078 24.383 54.461 54.461 54.461s54.461-24.383 54.461-54.461c0-.12-.008-.239-.009-.359H175.216zM403.549 336.438l-49.015-72.002v-89.83c0-60.581-43.144-111.079-100.381-122.459V24.485C254.152 10.963 243.19 0 229.667 0s-24.485 10.963-24.485 24.485v27.663c-57.237 11.381-100.381 61.879-100.381 122.459v89.83l-49.015 72.002a24.76 24.76 0 0 0 20.468 38.693H383.08a24.761 24.761 0 0 0 20.469-38.694z"/></svg><%= component_helper.button_text %>
16
10
  <% end %>
17
- <%= tag.form class: wrapper_classes, action: "/email/subscriptions/single-page/new", method: "POST", data: data_attributes do %>
18
- <input type="hidden" name="base_path" value="<%= base_path %>">
19
- <%= content_tag(:button, button_text, {
20
- class: classes,
21
- type: "submit",
22
- }) %>
23
- <% end if base_path.presence %>
11
+ <%= tag.div class: wrapper_classes, data: { module: "gem-track-click"} do %>
12
+ <%= tag.form class: "gem-c-single-page-notification-button", action: "/email/subscriptions/single-page/new", method: "POST", data: component_helper.data do %>
13
+ <input type="hidden" name="base_path" value="<%= component_helper.base_path %>">
14
+ <%= content_tag(:button, button_text, {
15
+ class: "govuk-body-s gem-c-single-page-notification-button__submit",
16
+ type: "submit",
17
+ }) %>
18
+ <% end %>
19
+ <% end if component_helper.base_path %>
@@ -811,12 +811,6 @@ examples:
811
811
  <div class="place">
812
812
  <p>This is a place</p>
813
813
  </div>
814
- summary:
815
- data:
816
- block: |
817
- <div class="summary">
818
- <p>This is a summary</p>
819
- </div>
820
814
  buttons:
821
815
  data:
822
816
  block: |
@@ -357,3 +357,10 @@ examples:
357
357
  Applies to: England, Scotland, and Wales (see detailed guidance for <a href="http://www.dardni.gov.uk/news-dard-pa022-a-13-new-procedure-for" rel="external">Northern Ireland</a>)
358
358
  context:
359
359
  dark_background: true
360
+ with_custom_margin_bottom:
361
+ description: |
362
+ The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to the `margin-bottom` values defined in the [responsive-bottom-margin mixin](https://github.com/alphagov/govuk_publishing_components/blob/master/app/assets/stylesheets/govuk_publishing_components/components/mixins/_margins.scss#L1)
363
+ data:
364
+ first_published: 14 June 2014
365
+ last_updated: 10 September 2015
366
+ margin_bottom: 2
@@ -69,3 +69,28 @@ examples:
69
69
  Allows the label text size to be set to `xl`, `l`, `m`, or `s`. If this is set, then `inline_label` is automatically set to `false`.
70
70
  data:
71
71
  label_size: "xl"
72
+ wrap_label_inside_a_heading:
73
+ description: |
74
+ Puts the label inside a heading; heading level defaults to 2 if not set.
75
+
76
+ (The size of the label can still be set with `label_size` to appear more like a heading.)
77
+ data:
78
+ wrap_label_in_a_heading: true
79
+ heading_level: 1
80
+ with_margin_bottom:
81
+ description: |
82
+ Allows the spacing at the bottom of the component to be adjusted.
83
+
84
+ This accepts a number from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
85
+ data:
86
+ margin_bottom: 9
87
+ with_margin_bottom_for_the_label:
88
+ description: |
89
+ Allows the spacing between the label and the input be adjusted.
90
+
91
+ Requires `inline_label` to be false.
92
+
93
+ This accepts a number from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
94
+ data:
95
+ label_margin_bottom: 9
96
+ inline_label: false
@@ -1,9 +1,10 @@
1
1
  name: Single page notification button
2
2
  description: A button that subscribes the user to email notifications to a page
3
3
  body: |
4
- By default, the component displays with the "Get emails about this page" state. The component does not render without the `base_path` parameter.
4
+ By default, the component displays with the "Get emails about this page" state.
5
+ If the `js-enhancement` flag is present, the component uses JavaScript to check if the user has already subscribed to email notifications on the current page. If yes, the state of the component updates accordingly.
5
6
 
6
- The `base_path` is necessary for [checking if an email subscription is active on page load](https://github.com/alphagov/account-api/blob/main/docs/api.md#get-apipersonalisationcheck-email-subscriptiontopic_slug) and the creation/deletion of an email notification subscription.
7
+ The component does not render without the `base_path` parameter. The `base_path` is necessary for [checking if an email subscription is active on page load](https://github.com/alphagov/account-api/blob/main/docs/api.md#get-apipersonalisationcheck-email-subscriptiontopic_slug) and the creation/deletion of an email notification subscription.
7
8
 
8
9
  When the button is clicked, the `base_path` is submitted to an endpoint which proceeds to check the user's authentication status and whether they are already subscribed to the page or not. Depending on these factors, they will be routed accordingly.
9
10
  accessibility_criteria: |
@@ -23,10 +24,27 @@ examples:
23
24
  data:
24
25
  base_path: '/current-page-path'
25
26
  data_attributes:
26
- category: fancyButtons
27
+ test_attribute: "testing"
27
28
  with_margin_bottom:
28
29
  description: |
29
30
  The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having a margin bottom of 15px.
30
31
  data:
31
32
  base_path: '/current-page-path'
32
33
  margin_bottom: 5
34
+ with_js_enhancement:
35
+ description: |
36
+ If the `js-enhancement` flag is present, the component uses JavaScript to check if the user has already subscribed to email notifications on the current page. If yes, the state of the component updates accordingly.
37
+ data:
38
+ base_path: '/current-page-path'
39
+ js_enhancement: true
40
+ with_button_location:
41
+ description: |
42
+ When there is more than one button on a page, we should specify their location so that Analytics can differentiate between them.
43
+
44
+ The location should have one of two values: "top" or "bottom".
45
+
46
+ When this parameter is passed, its value is reflected in the `data-action` attribute (i.e "Unsubscribe-button-top"). When the flag is not present, `data-action` defaults to "Subscribe-button" or "Unsubscribe-button", depending on the state of the button.
47
+ data:
48
+ base_path: '/current-page-path'
49
+ js_enhancement: true
50
+ button_location: 'top'
@@ -87,7 +87,7 @@ en:
87
87
  statistics: Statistics
88
88
  worldwide: Worldwide
89
89
  layout_footer:
90
- copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown copyright</a>
90
+ copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
91
91
  licence_html: All content is available under the <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
92
92
  support_links: Support links
93
93
  layout_for_public:
@@ -125,8 +125,6 @@ en:
125
125
  href: "/browse/benefits"
126
126
  - label: Births, death, marriages and care
127
127
  href: "/browse/births-deaths-marriages"
128
- - label: Brexit
129
- href: "/brexit"
130
128
  - label: Business and self-employed
131
129
  href: "/browse/business"
132
130
  - label: Childcare and parenting
@@ -179,7 +177,7 @@ en:
179
177
  description: Consultations and strategy
180
178
  - label: Transparency
181
179
  href: "/search/transparency-and-freedom-of-information-releases"
182
- description: Government data, Freedom of Information releases and corporate reports
180
+ description: Data, Freedom of Information releases and corporate reports
183
181
  footer_links:
184
182
  - label: How government works
185
183
  href: "/government/how-government-works"
@@ -66,6 +66,7 @@ module GovukPublishingComponents
66
66
  options[:name] = name if name.present? && value.present?
67
67
  options[:value] = value if name.present? && value.present?
68
68
  options[:aria] = { label: aria_label } if aria_label
69
+ options[:draggable] = false if link?
69
70
  options
70
71
  end
71
72
 
@@ -111,10 +111,10 @@ module GovukPublishingComponents
111
111
  def show_brexit_related_links?
112
112
  # If tagged directly to /brexit or /world/brexit
113
113
  # Or if tagged to a taxon which has /brexit as a parent
114
- # And is not the brexit checker start page
115
- brexit_start_page_content_id = "58d093a1-787d-4f36-a568-86da23a7b884"
116
- page_content_id = content_item["content_id"]
117
- tagged_to_brexit? && (page_content_id != brexit_start_page_content_id)
114
+ # And is not the brexit hub pages
115
+ return false if brexit_hub_pages.include?(content_item["content_id"])
116
+
117
+ tagged_to_brexit?
118
118
  end
119
119
 
120
120
  def brexit_cta_document_exceptions
@@ -0,0 +1,37 @@
1
+ module GovukPublishingComponents
2
+ module Presenters
3
+ class SinglePageNotificationButtonHelper
4
+ attr_reader :already_subscribed, :data_attributes, :base_path, :js_enhancement, :button_type, :button_location
5
+
6
+ def initialize(local_assigns)
7
+ @local_assigns = local_assigns
8
+ @data_attributes = @local_assigns[:data_attributes] || {}
9
+ @js_enhancement = @local_assigns[:js_enhancement] || false
10
+ @already_subscribed = @local_assigns[:already_subscribed] || false
11
+ @base_path = @local_assigns[:base_path] || nil
12
+ @button_location = button_location_is_valid? ? @local_assigns[:button_location] : nil
13
+ @button_type = @local_assigns[:already_subscribed] ? "Unsubscribe" : "Subscribe"
14
+ end
15
+
16
+ def data
17
+ @data_attributes[:track_label] = base_path
18
+ # data-action for tracking should have the format of e.g. "Unsubscribe-button-top", or "Subscribe-button-bottom"
19
+ # when button_location is not present data-action will fall back to "Unsubscribe-button"/"Subscribe-button"
20
+ @data_attributes[:track_action] = [button_type, "button", button_location].compact.join("-")
21
+ @data_attributes[:module] = "single-page-notification-button" if js_enhancement
22
+ @data_attributes[:track_category] = "Single-page-notification-button"
23
+ # This attribute is passed through to the personalisation API to ensure when a new button is returned from the API, it has the same button_location
24
+ @data_attributes[:button_location] = button_location
25
+ @data_attributes
26
+ end
27
+
28
+ def button_location_is_valid?
29
+ %w[bottom top].include? @local_assigns[:button_location]
30
+ end
31
+
32
+ def button_text
33
+ @already_subscribed ? I18n.t("components.single_page_notification_button.unsubscribe_text") : I18n.t("components.single_page_notification_button.subscribe_text")
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.12.0".freeze
2
+ VERSION = "27.14.2".freeze
3
3
  end
@@ -33,6 +33,7 @@ require "govuk_publishing_components/presenters/intervention_helper"
33
33
  require "govuk_publishing_components/presenters/organisation_logo_helper"
34
34
  require "govuk_publishing_components/presenters/highlight_boxes_helper"
35
35
  require "govuk_publishing_components/presenters/taxonomy_list_helper"
36
+ require "govuk_publishing_components/presenters/single_page_notification_button_helper"
36
37
 
37
38
  require "govuk_publishing_components/app_helpers/taxon_breadcrumbs"
38
39
  require "govuk_publishing_components/app_helpers/table_helper"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 27.12.0
4
+ version: 27.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2021-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -501,6 +501,7 @@ files:
501
501
  - app/assets/javascripts/govuk_publishing_components/components/radio.js
502
502
  - app/assets/javascripts/govuk_publishing_components/components/reorderable-list.js
503
503
  - app/assets/javascripts/govuk_publishing_components/components/show-password.js
504
+ - app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js
504
505
  - app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js
505
506
  - app/assets/javascripts/govuk_publishing_components/components/tabs.js
506
507
  - app/assets/javascripts/govuk_publishing_components/dependencies.js
@@ -624,7 +625,6 @@ files:
624
625
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_place.scss
625
626
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_stat-headline.scss
626
627
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_steps.scss
627
- - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_summary.scss
628
628
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss
629
629
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss
630
630
  - app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss
@@ -969,6 +969,7 @@ files:
969
969
  - lib/govuk_publishing_components/presenters/schema_org.rb
970
970
  - lib/govuk_publishing_components/presenters/select.rb
971
971
  - lib/govuk_publishing_components/presenters/shared_helper.rb
972
+ - lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb
972
973
  - lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb
973
974
  - lib/govuk_publishing_components/presenters/subscription_links_helper.rb
974
975
  - lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb
@@ -1,27 +0,0 @@
1
- .govspeak, // Legacy class name that's still used in some content items - needs to be kept until `.govspeak` is removed from the content items.
2
- .gem-c-govspeak {
3
- .summary {
4
- margin: 0 0 2em;
5
- padding: 0;
6
- color: $govuk-text-colour;
7
-
8
- p {
9
- @include govuk-font($size: 19);
10
- }
11
-
12
- @include govuk-media-query($until: tablet) {
13
- margin: 0 0 2em;
14
- padding: 0;
15
- }
16
-
17
- p,
18
- h2 {
19
- border: 0;
20
- margin: 0 .75em 0 0;
21
- }
22
-
23
- h2 {
24
- line-height: 1.35em;
25
- }
26
- }
27
- }