govuk_publishing_components 33.1.0 → 34.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/govuk_publishing_components_manifest.js +0 -1
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +16 -27
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +2 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +4 -4
  6. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +12 -69
  7. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +14 -13
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_accordion.scss +28 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +11 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +19 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_contents-list.scss +20 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +6 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_emergency-banner.scss +6 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak-html-publication.scss +8 -0
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_govspeak.scss +83 -0
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +253 -412
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +15 -0
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +6 -0
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +16 -0
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +10 -0
  21. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_contents-list-helper.scss +0 -1
  22. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -9
  23. data/app/views/govuk_publishing_components/component_guide/_application_stylesheet.html.erb +0 -3
  24. data/app/views/govuk_publishing_components/component_guide/index.html.erb +0 -7
  25. data/app/views/govuk_publishing_components/components/_label.html.erb +3 -2
  26. data/app/views/govuk_publishing_components/components/_layout_for_admin.html.erb +1 -2
  27. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +0 -1
  28. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +94 -143
  29. data/app/views/govuk_publishing_components/components/docs/label.yml +6 -0
  30. data/app/views/layouts/govuk_publishing_components/application.html.erb +1 -2
  31. data/config/locales/ar.yml +4 -8
  32. data/config/locales/az.yml +5 -8
  33. data/config/locales/be.yml +4 -8
  34. data/config/locales/bg.yml +4 -8
  35. data/config/locales/bn.yml +4 -8
  36. data/config/locales/cs.yml +4 -8
  37. data/config/locales/cy.yml +4 -8
  38. data/config/locales/da.yml +4 -8
  39. data/config/locales/de.yml +4 -8
  40. data/config/locales/dr.yml +4 -8
  41. data/config/locales/el.yml +4 -8
  42. data/config/locales/en.yml +6 -17
  43. data/config/locales/es-419.yml +4 -8
  44. data/config/locales/es.yml +4 -8
  45. data/config/locales/et.yml +4 -8
  46. data/config/locales/fa.yml +5 -8
  47. data/config/locales/fi.yml +4 -8
  48. data/config/locales/fr.yml +4 -8
  49. data/config/locales/gd.yml +4 -8
  50. data/config/locales/gu.yml +4 -8
  51. data/config/locales/he.yml +4 -8
  52. data/config/locales/hi.yml +4 -8
  53. data/config/locales/hr.yml +4 -8
  54. data/config/locales/hu.yml +4 -8
  55. data/config/locales/hy.yml +4 -8
  56. data/config/locales/id.yml +4 -8
  57. data/config/locales/is.yml +4 -8
  58. data/config/locales/it.yml +4 -8
  59. data/config/locales/ja.yml +4 -8
  60. data/config/locales/ka.yml +4 -8
  61. data/config/locales/kk.yml +4 -8
  62. data/config/locales/ko.yml +4 -8
  63. data/config/locales/lt.yml +4 -8
  64. data/config/locales/lv.yml +4 -8
  65. data/config/locales/ms.yml +4 -8
  66. data/config/locales/mt.yml +4 -8
  67. data/config/locales/nl.yml +4 -8
  68. data/config/locales/no.yml +4 -8
  69. data/config/locales/pa-pk.yml +4 -8
  70. data/config/locales/pa.yml +4 -8
  71. data/config/locales/pl.yml +4 -8
  72. data/config/locales/ps.yml +4 -8
  73. data/config/locales/pt.yml +4 -8
  74. data/config/locales/ro.yml +4 -8
  75. data/config/locales/ru.yml +4 -8
  76. data/config/locales/si.yml +4 -8
  77. data/config/locales/sk.yml +4 -8
  78. data/config/locales/sl.yml +4 -8
  79. data/config/locales/so.yml +4 -8
  80. data/config/locales/sq.yml +4 -8
  81. data/config/locales/sr.yml +4 -8
  82. data/config/locales/sv.yml +4 -8
  83. data/config/locales/sw.yml +4 -8
  84. data/config/locales/ta.yml +4 -8
  85. data/config/locales/th.yml +4 -8
  86. data/config/locales/tk.yml +4 -8
  87. data/config/locales/tr.yml +4 -8
  88. data/config/locales/uk.yml +4 -8
  89. data/config/locales/ur.yml +4 -8
  90. data/config/locales/uz.yml +4 -8
  91. data/config/locales/vi.yml +4 -8
  92. data/config/locales/zh-hk.yml +4 -8
  93. data/config/locales/zh-tw.yml +4 -8
  94. data/config/locales/zh.yml +4 -8
  95. data/lib/govuk_publishing_components/config.rb +0 -3
  96. data/lib/govuk_publishing_components/version.rb +1 -1
  97. data/node_modules/axe-core/axe.d.ts +75 -24
  98. data/node_modules/axe-core/axe.js +4765 -4555
  99. data/node_modules/axe-core/axe.min.js +2 -2
  100. data/node_modules/axe-core/package.json +2 -2
  101. data/node_modules/axe-core/sri-history.json +4 -0
  102. metadata +2 -17
  103. data/app/assets/stylesheets/component_guide/print.scss +0 -1
  104. data/app/assets/stylesheets/govuk_publishing_components/_all_components_print.scss +0 -18
  105. data/app/assets/stylesheets/govuk_publishing_components/components/print/_accordion.scss +0 -28
  106. data/app/assets/stylesheets/govuk_publishing_components/components/print/_button.scss +0 -8
  107. data/app/assets/stylesheets/govuk_publishing_components/components/print/_cards.scss +0 -4
  108. data/app/assets/stylesheets/govuk_publishing_components/components/print/_contents-list.scss +0 -19
  109. data/app/assets/stylesheets/govuk_publishing_components/components/print/_emergency-banner.scss +0 -3
  110. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss +0 -5
  111. data/app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss +0 -80
  112. data/app/assets/stylesheets/govuk_publishing_components/components/print/_layout-super-navigation-header.scss +0 -3
  113. data/app/assets/stylesheets/govuk_publishing_components/components/print/_organisation-logo.scss +0 -7
  114. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +0 -7
  115. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss +0 -116
  116. data/app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss +0 -13
  117. data/app/assets/stylesheets/govuk_publishing_components/components/print/_title.scss +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e788fa8e962e9665a5c978857dd72563e92394a2b437020e143242e48eac153
4
- data.tar.gz: 47ebd5cd998e31cf0899e6a4dfa83949466fa1f9e357edecfb5551ca6c4b7ee3
3
+ metadata.gz: 2070abba195716c8e72ea85dc7d7f207df27c52e497e808c8bc5d79c7b56b8af
4
+ data.tar.gz: f9978ff5d94c66b454978bc58346b8a76f7ff5408210695fd38372e4e5d29c20
5
5
  SHA512:
6
- metadata.gz: 55773e69567c5797c93ce788fb226f8d8ca9dcc256b12b5c6dd6caca421c5419d20f98dda3db8a8dc3baa5606915b5a0975ee738ceea752cb174feec9ce2bc5e
7
- data.tar.gz: '093545166981ef4a4c15dd7864bfe6a3017df0a7c5a61bad7c925e1834fcfaec3e2acc9be675ae184f63213882902e20b2190bc0393ab22327b5a6f16d344593'
6
+ metadata.gz: c587c35eadec57a5515587e2064f5d55154cc9767a823015e4fb103bab8599bf367e2cfdbd5f58e65fd2612d690ba85b7760dd6535899ff5b90ad479b19a4ef9
7
+ data.tar.gz: c888b0e1e6ef2f1fde331e163009bd6f84077bb8011fcc799612af5d00d72f52cec00935f7cd71e347dd2d357f6c9e98ccc91a0c277b0bc4763ca9cdf4123591
@@ -12,4 +12,3 @@
12
12
  //= link govuk_publishing_components/vendor/lux/lux-reporter.js
13
13
  //= link govuk_publishing_components/vendor/lux/lux-measurer.js
14
14
  //= link component_guide/application.css
15
- //= link component_guide/print.css
@@ -11,34 +11,23 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
11
11
  var newScript = document.createElement('script')
12
12
  newScript.async = true
13
13
 
14
- if (window.GOVUK.analyticsGa4.vars.gtag_id) {
15
- // initialise gtag
16
- window.dataLayer = window.dataLayer || []
17
- var gtag = function () { window.dataLayer.push(arguments) }
18
- gtag('js', new Date())
19
- gtag('config', window.GOVUK.analyticsGa4.vars.gtag_id)
20
-
21
- newScript.src = '//www.googletagmanager.com/gtag/js?id=' + window.GOVUK.analyticsGa4.vars.gtag_id
22
- firstScript.parentNode.insertBefore(newScript, firstScript)
23
- } else {
24
- // initialise GTM
25
- window.dataLayer = window.dataLayer || []
26
- window.dataLayer.push({ 'gtm.blocklist': ['customPixels', 'customScripts', 'html', 'nonGoogleScripts'] })
27
- window.dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
28
-
29
- var auth = window.GOVUK.analyticsGa4.vars.auth || ''
30
- var preview = window.GOVUK.analyticsGa4.vars.preview || ''
31
- if (auth) {
32
- auth = '&gtm_auth=' + auth
33
- }
34
- if (preview) {
35
- preview = '&gtm_preview=' + preview + '&gtm_cookies_win=x'
36
- }
37
-
38
- this.googleSrc = 'https://www.googletagmanager.com/gtm.js?id=' + window.GOVUK.analyticsGa4.vars.id + auth + preview
39
- newScript.src = this.googleSrc
40
- firstScript.parentNode.insertBefore(newScript, firstScript)
14
+ // initialise GTM
15
+ window.dataLayer = window.dataLayer || []
16
+ window.dataLayer.push({ 'gtm.blocklist': ['customPixels', 'customScripts', 'html', 'nonGoogleScripts'] })
17
+ window.dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
18
+
19
+ var auth = window.GOVUK.analyticsGa4.vars.auth || ''
20
+ var preview = window.GOVUK.analyticsGa4.vars.preview || ''
21
+ if (auth) {
22
+ auth = '&gtm_auth=' + auth
41
23
  }
24
+ if (preview) {
25
+ preview = '&gtm_preview=' + preview + '&gtm_cookies_win=x'
26
+ }
27
+
28
+ this.googleSrc = 'https://www.googletagmanager.com/gtm.js?id=' + window.GOVUK.analyticsGa4.vars.id + auth + preview
29
+ newScript.src = this.googleSrc
30
+ firstScript.parentNode.insertBefore(newScript, firstScript)
42
31
  },
43
32
 
44
33
  sendData: function (data) {
@@ -42,6 +42,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
42
42
  return
43
43
  }
44
44
 
45
+ var text = data.text || event.target.textContent
46
+ data.text = window.GOVUK.analyticsGa4.core.trackFunctions.removeLinesAndExtraSpaces(text)
45
47
  schema.event = 'event_data'
46
48
  // get attributes from the data attribute to send to GA
47
49
  // only allow it if it already exists in the schema
@@ -28,11 +28,11 @@ window.GOVUK.analyticsGa4.analyticsModules = window.GOVUK.analyticsGa4.analytics
28
28
  content_id: this.getMetaContent('content-id'),
29
29
 
30
30
  browse_topic: this.getMetaContent('section'),
31
- taxon_slug: this.getMetaContent('taxon-slug'),
32
- taxon_id: this.getMetaContent('taxon-id'),
33
31
  taxonomy_level1: this.getMetaContent('themes'),
34
- taxon_slugs: this.getMetaContent('taxon-slugs'),
35
- taxon_ids: this.getMetaContent('taxon-ids'),
32
+ taxonomy_main: this.getMetaContent('taxon-slug'),
33
+ taxonomy_main_id: this.getMetaContent('taxon-id'),
34
+ taxonomy_all: this.getMetaContent('taxon-slugs'),
35
+ taxonomy_all_ids: this.getMetaContent('taxon-ids'),
36
36
 
37
37
  language: this.getLanguage(),
38
38
  history: this.getHistory(),
@@ -92,32 +92,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
92
92
  return closestPrevious(previousElement, elementType)
93
93
  }
94
94
 
95
- // When moving from one screen size to another (eg mobile to desktop) we need
96
- // to find out whether a submenu is open so the parent menu can be kept open.
97
- var hasSubMenusOpen = function ($menu) {
98
- return $menu.querySelectorAll('button[aria-expanded="true"]').length > 0
99
- }
100
-
101
- // Detect the current viewport width. Return the string `desktop` or `mobile` so it can be interpolated to access the
102
- // `data-toggle-{desktop|mobile}-group` attribute.
103
- //
104
- // Use `matchedia` which mitigates issues in modern browsers when scrollbars are forced in MacOS (using `document.documentElement.clientWidth`
105
- // for viewport width detection has issues in Chrome and Firefox, and `window.innerWidth` has issues in Safari).
106
- //
107
- // Fall back to `document.documentElement.clientWidth` for legacy browsers.
108
- var windowSize = function () {
109
- var viewport = false
110
- if (typeof window.matchMedia === 'function') {
111
- viewport = window.matchMedia('(min-width:' + SETTINGS.breakpoint.desktop + 'px)').matches
112
- } else {
113
- viewport = document.documentElement.clientWidth >= SETTINGS.breakpoint.desktop
114
- }
115
- return viewport ? 'desktop' : 'mobile'
116
- }
117
95
  function SuperNavigationMegaMenu ($module) {
118
96
  this.$module = $module
119
- this.$navigationToggle = this.$module.querySelector('#super-navigation-menu-toggle')
120
- this.$navigationMenu = this.$module.querySelector('#super-navigation-menu')
121
97
  this.$searchToggle = this.$module.querySelector('#super-search-menu-toggle')
122
98
  this.$searchMenu = this.$module.querySelector('#super-search-menu')
123
99
 
@@ -132,55 +108,25 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
132
108
  )
133
109
 
134
110
  this.hiddenButtons = this.$module.querySelectorAll('button[hidden]')
135
-
136
- this.lastWindowSize = null
137
111
  }
138
112
 
139
- SuperNavigationMegaMenu.prototype.windowSize = windowSize
140
-
141
113
  SuperNavigationMegaMenu.prototype.updateStates = function () {
142
- if (this.windowSize() === 'mobile' && this.lastWindowSize !== 'mobile') {
143
- this.$navigationToggle.removeAttribute('hidden')
144
-
145
- // Hides navigation menu unless a submenu is open - this could be common
146
- // as the desktop view has the navigation submenu as top level in the
147
- // menu.
148
- if (!hasSubMenusOpen(this.$navigationMenu)) {
149
- hide(this.$navigationToggle, this.$navigationMenu)
150
- }
151
-
152
- this.$module.style.marginBottom = '0'
153
- }
154
-
155
- // Hide the navigation toggle button and show the navigation submenu:
156
- if (this.windowSize() === 'desktop' && this.lastWindowSize !== 'desktop') {
157
- this.$navigationToggle.setAttribute('hidden', 'hidden')
158
- this.$navigationMenu.removeAttribute('hidden')
159
- }
160
-
161
- // The dropdown menu height is only needed when in desktop mode as this is
162
- // when the dropdown menu is using `absolute` positioning. This requires
163
- // JavaScript to work out the height and make space for the dropdown menu.
164
- if (windowSize() === 'desktop') {
165
- // Check whether any of the dropdown menus are open.
166
- var $openButton = this.$module.querySelector('[aria-expanded="true"][data-toggle-desktop-group="top"]')
167
- // Gets the open dropdown menu
168
- var $openMenu = $openButton ? this.$module.querySelector('#' + $openButton.getAttribute('aria-controls')) : null
169
- // If there is an open dropdown menu, get the height of the dropdown menu.
170
- var margin = $openMenu ? $openMenu.offsetHeight : 0
171
-
172
- // Make space for the dropdown menu.
173
- this.$module.style.marginBottom = margin + 'px'
174
- }
175
-
176
- this.lastWindowSize = this.windowSize()
114
+ // Check whether any of the dropdown menus are open.
115
+ var $openButton = this.$module.querySelector('[aria-expanded="true"][data-toggle-desktop-group="top"]')
116
+ // Gets the open dropdown menu
117
+ var $openMenu = $openButton ? this.$module.querySelector('#' + $openButton.getAttribute('aria-controls')) : null
118
+ // If there is an open dropdown menu, get the height of the dropdown menu.
119
+ var margin = $openMenu ? $openMenu.offsetHeight : 0
120
+
121
+ // Make space for the dropdown menu.
122
+ this.$module.style.marginBottom = margin + 'px'
177
123
  }
178
124
 
179
125
  SuperNavigationMegaMenu.prototype.buttonHandler = function (event) {
180
126
  var $target = closestParentIncluding(event.target, 'button')
181
127
  var $targetMenu = this.$module.querySelector('#' + $target.getAttribute('aria-controls'))
182
128
 
183
- var toggleGroupAttribute = 'data-toggle-' + this.windowSize() + '-group'
129
+ var toggleGroupAttribute = 'data-toggle-desktop-group'
184
130
  var toggleGroupName = $target.getAttribute(toggleGroupAttribute)
185
131
  var toggleGroupList = this.$module.querySelectorAll('[' + toggleGroupAttribute + '="' + toggleGroupName + '"]')
186
132
 
@@ -194,9 +140,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
194
140
 
195
141
  toggle($target, $targetMenu)
196
142
 
197
- if (this.windowSize() === 'desktop') {
198
- this.$module.style.marginBottom = $targetMenu.offsetHeight + 'px'
199
- }
143
+ this.$module.style.marginBottom = $targetMenu.offsetHeight + 'px'
200
144
  }
201
145
 
202
146
  SuperNavigationMegaMenu.prototype.init = function () {
@@ -217,6 +161,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
217
161
  $element.removeAttribute('hidden')
218
162
 
219
163
  var closestSiblingLink = closestPrevious($element, 'a')
164
+
220
165
  if (closestSiblingLink) {
221
166
  closestSiblingLink.setAttribute('hidden', 'hidden')
222
167
  }
@@ -237,8 +182,6 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
237
182
  hide(this.$searchToggle, this.$searchMenu)
238
183
  this.updateStates()
239
184
 
240
- this.lastWindowSize = this.windowSize()
241
-
242
185
  // The menu needs to be updated when the window is resized to make sure that
243
186
  // the space needed for the dropdown menu is correct.
244
187
  window.addEventListener('resize', this.updateStates.bind(this), { passive: true })
@@ -178,30 +178,31 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
178
178
  var title = thisel.querySelectorAll('.js-step-title')[0]
179
179
  var contentId = thisel.querySelectorAll('.js-panel')[0].getAttribute('id')
180
180
  var titleText = title.textContent || title.innerText // IE8 fallback
181
- var ga4Data = ''
182
-
183
- if (this.$module.isGa4Enabled) {
184
- var ga4JSON = {
185
- event_name: 'select_content',
186
- type: 'step by step',
187
- text: titleText.trim(),
188
- index: i + 1,
189
- index_total: this.$module.totalSteps
190
- }
191
- ga4Data = "data-ga4-event='" + JSON.stringify(ga4JSON) + "'" // Construct GA4 data-attributes for ga4-event-tracker.
192
- }
193
181
 
194
182
  title.outerHTML =
195
183
  '<span class="js-step-title">' +
196
184
  '<button ' +
197
185
  'class="gem-c-step-nav__button gem-c-step-nav__button--title js-step-title-button" ' +
198
- 'aria-expanded="false" aria-controls="' + contentId + '" ' + ga4Data + '>' +
186
+ 'aria-expanded="false" aria-controls="' + contentId + '"' + '>' +
199
187
  '<span class="gem-c-step-nav____title-text-focus">' +
200
188
  '<span class="gem-c-step-nav__title-text js-step-title-text">' + titleText + '</span>' +
201
189
  '<span class="govuk-visually-hidden gem-c-step-nav__section-heading-divider">, </span>' +
202
190
  '</span>' +
203
191
  '</button>' +
204
192
  '</span>'
193
+
194
+ if (this.$module.isGa4Enabled) {
195
+ var ga4JSON = {
196
+ event_name: 'select_content',
197
+ type: 'step by step',
198
+ text: titleText.trim(),
199
+ index: i + 1,
200
+ index_total: this.$module.totalSteps
201
+ }
202
+
203
+ var button = thisel.querySelector('.js-step-title-button')
204
+ button.setAttribute('data-ga4-event', JSON.stringify(ga4JSON))
205
+ }
205
206
  }
206
207
  }
207
208
 
@@ -5,3 +5,31 @@
5
5
  .gem-c-accordion__show-all > * {
6
6
  pointer-events: none;
7
7
  }
8
+
9
+ // This is in place until a proper fix comes through from GOV.UK Frontend.
10
+ //
11
+ // TODO: Replace with the print styles that will come from GOV.UK Frontend.
12
+
13
+ @include govuk-media-query($media-type: print) {
14
+ // Open all of the accordion sections.
15
+ .govuk-accordion__section-content {
16
+ display: block !important; // stylelint-disable-line declaration-no-important
17
+ }
18
+
19
+ // Change the colour from the blue link colour to black.
20
+ .govuk-accordion__section-button {
21
+ color: govuk-colour("black") !important; // stylelint-disable-line declaration-no-important
22
+ }
23
+
24
+ // Change the summary subheading size.
25
+ .govuk-accordion__section-summary {
26
+ @include govuk-typography-common;
27
+ @include govuk-typography-responsive($size: 16, $important: true);
28
+ }
29
+
30
+ // Hide the unusable "Show all" and "Show" sections.
31
+ .govuk-accordion__show-all,
32
+ .govuk-accordion__section-toggle {
33
+ display: none !important; // stylelint-disable-line declaration-no-important
34
+ }
35
+ }
@@ -100,3 +100,14 @@
100
100
  content: none;
101
101
  }
102
102
  }
103
+
104
+ @include govuk-media-query($media-type: print) {
105
+ .gem-c-button {
106
+ @include govuk-font(14);
107
+ display: inline-block;
108
+ padding: govuk-spacing(1);
109
+ border: solid 1px govuk-colour("black");
110
+ color: $govuk-text-colour;
111
+ text-decoration: none;
112
+ }
113
+ }
@@ -107,3 +107,22 @@
107
107
  .gem-c-cards__description {
108
108
  margin: 0 govuk-spacing(-6) 0 0;
109
109
  }
110
+
111
+ @include govuk-media-query($media-type: print) {
112
+ .gem-c-cards__list {
113
+ display: block;
114
+ }
115
+
116
+ .gem-c-cards__list-item {
117
+ padding-bottom: 0;
118
+ }
119
+
120
+ .gem-c-cards__sub-heading {
121
+ margin-top: govuk-spacing(4);
122
+ margin-bottom: govuk-spacing(1);
123
+ }
124
+
125
+ .gem-c-cards__link:before {
126
+ display: none;
127
+ }
128
+ }
@@ -74,3 +74,23 @@
74
74
  vertical-align: top;
75
75
  }
76
76
  }
77
+
78
+ @include govuk-media-query($media-type: print) {
79
+ // Override default browser indentation
80
+ .gem-c-contents-list__list,
81
+ .gem-c-contents-list__nested-list {
82
+ padding-left: 0;
83
+ margin-left: 0;
84
+ }
85
+
86
+ // Put indentation back where we use list style types
87
+ .gem-c-contents-list__list-item--dashed {
88
+ margin-left: govuk-spacing(3);
89
+ list-style-type: disc;
90
+ }
91
+
92
+ .gem-c-contents-list__list-item--numbered,
93
+ .gem-c-contents-list__list-item--parent {
94
+ list-style-type: none;
95
+ }
96
+ }
@@ -77,3 +77,9 @@ $govuk-cookie-banner-background: govuk-colour("light-grey", "grey-4");
77
77
  margin-bottom: - govuk-spacing(2);
78
78
  }
79
79
  }
80
+
81
+ @include govuk-media-query($media-type: print) {
82
+ .gem-c-cookie-banner {
83
+ display: none !important; // stylelint-disable-line declaration-no-important
84
+ }
85
+ }
@@ -74,3 +74,9 @@
74
74
  // the contrast was too low with white text
75
75
  background-color: #00847d;
76
76
  }
77
+
78
+ @include govuk-media-query($media-type: print) {
79
+ .gem-c-emergency-banner {
80
+ display: none;
81
+ }
82
+ }
@@ -137,3 +137,11 @@
137
137
  // stylelint-enable selector-no-qualifying-type
138
138
  }
139
139
  }
140
+
141
+ @include govuk-media-query($media-type: print) {
142
+ .gem-c-govspeak-html-publication {
143
+ .govuk-sticky-element {
144
+ display: none;
145
+ }
146
+ }
147
+ }
@@ -27,3 +27,86 @@
27
27
  text-align: start;
28
28
  }
29
29
  }
30
+
31
+ @include govuk-media-query($media-type: print) {
32
+ // stylelint-disable max-nesting-depth
33
+
34
+ .gem-c-govspeak {
35
+ .media-player {
36
+ display: none;
37
+ }
38
+
39
+ .info-notice,
40
+ .help-notice,
41
+ .call-to-action {
42
+ margin: govuk-spacing(3) 0;
43
+ }
44
+
45
+ .call-to-action {
46
+ background: none;
47
+ border: 1pt solid $govuk-border-colour;
48
+ padding: govuk-spacing(3);
49
+ }
50
+
51
+ .help-notice p {
52
+ font-weight: 700;
53
+ }
54
+
55
+ .fraction {
56
+ img {
57
+ display: inline-block;
58
+ margin-bottom: -7px;
59
+ }
60
+ }
61
+
62
+ .attachment {
63
+ margin: govuk-spacing(6) 0;
64
+
65
+ &:first-child {
66
+ margin-top: 0;
67
+ }
68
+
69
+ .attachment-thumb {
70
+ display: none;
71
+ }
72
+
73
+ .attachment-details {
74
+ .download {
75
+ display: block;
76
+ }
77
+ }
78
+
79
+ .accessibility-warning {
80
+ h2 {
81
+ @include govuk-font(14);
82
+ }
83
+
84
+ .toggler {
85
+ display: none;
86
+ }
87
+ }
88
+ }
89
+
90
+ .footnotes {
91
+ border-top: 1px solid $govuk-text-colour;
92
+
93
+ a[role="doc-backlink"] {
94
+ display: none;
95
+ }
96
+ }
97
+
98
+ .legislative-list {
99
+ padding-left: 0;
100
+
101
+ &,
102
+ ol {
103
+ list-style: none;
104
+ }
105
+ }
106
+
107
+ .mc-toggle-button,
108
+ .mc-chart-container {
109
+ display: none;
110
+ }
111
+ }
112
+ }