govuk_tech_docs 2.2.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.nvmrc +1 -1
  4. data/.travis.yml +2 -0
  5. data/CHANGELOG.md +26 -1
  6. data/govuk_tech_docs.gemspec +3 -8
  7. data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
  8. data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
  9. data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
  10. data/lib/assets/stylesheets/modules/_search.scss +8 -25
  11. data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
  12. data/lib/assets/stylesheets/modules/_toc.scss +11 -11
  13. data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +0 -1
  14. data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +70 -186
  15. data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +3 -2
  16. data/lib/govuk_tech_docs/api_reference/templates/operation.html.erb +1 -1
  17. data/lib/govuk_tech_docs/api_reference/templates/parameters.html.erb +1 -1
  18. data/lib/govuk_tech_docs/api_reference/templates/responses.html.erb +1 -1
  19. data/lib/govuk_tech_docs/api_reference/templates/schema.html.erb +12 -12
  20. data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
  21. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
  22. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +6 -3
  23. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
  24. data/lib/govuk_tech_docs/version.rb +1 -1
  25. data/lib/source/layouts/_header.erb +6 -2
  26. data/lib/source/layouts/_search.erb +1 -1
  27. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  28. data/node_modules/govuk-frontend/govuk/all.js +306 -94
  29. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  30. data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
  31. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  32. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
  33. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  34. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  35. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  36. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  37. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  38. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  39. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
  40. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  41. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
  42. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
  43. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  44. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
  45. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
  46. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  47. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  48. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  49. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  50. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  51. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
  52. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  53. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  54. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  55. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  56. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  57. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  58. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  59. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
  60. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  61. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
  62. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  63. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
  64. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  65. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  66. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
  67. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
  68. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  69. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  70. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  71. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  72. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  73. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  74. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  75. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  76. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
  77. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  78. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  79. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  80. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  81. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  82. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  83. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
  84. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  85. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
  86. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  87. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
  88. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  89. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
  90. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  91. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  92. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  93. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
  94. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  95. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  96. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  97. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  98. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  99. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  100. data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
  101. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  102. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  103. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
  104. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  105. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  106. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  107. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  108. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  110. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  111. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
  112. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
  113. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  114. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
  115. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
  116. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  117. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  118. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
  119. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
  120. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
  121. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
  122. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
  123. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
  124. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  125. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  126. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
  127. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  128. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
  129. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  130. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
  131. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  132. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  133. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  134. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
  135. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  136. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
  137. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  138. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  139. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
  140. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  141. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
  142. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  143. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  144. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  145. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  146. data/package-lock.json +358 -288
  147. data/package.json +2 -2
  148. metadata +48 -67
@@ -1,318 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../../helpers/typography";
6
-
7
- @include govuk-exports("govuk/component/header") {
8
-
9
- $govuk-header-background: govuk-colour("black");
10
- $govuk-header-border-color: $govuk-brand-colour;
11
- $govuk-header-border-width: govuk-spacing(2);
12
- $govuk-header-text: govuk-colour("white");
13
- $govuk-header-link: govuk-colour("white");
14
- $govuk-header-link-hover: govuk-colour("white");
15
- $govuk-header-link-active: #1d8feb;
16
- $govuk-header-nav-item-border-color: #2e3133;
17
-
18
- .govuk-header {
19
- @include govuk-font($size: 16);
20
-
21
- border-bottom: govuk-spacing(2) solid govuk-colour("white");
22
- color: $govuk-header-text;
23
- background: $govuk-header-background;
24
-
25
- }
26
-
27
- .govuk-header__container--full-width {
28
- padding: 0 govuk-spacing(3);
29
- border-color: $govuk-header-border-color;
30
-
31
- .govuk-header__menu-button {
32
- right: govuk-spacing(3);
33
- }
34
- }
35
-
36
- .govuk-header__container {
37
- @include govuk-clearfix;
38
- position: relative;
39
- margin-bottom: -$govuk-header-border-width;
40
- padding-top: govuk-spacing(2);
41
- border-bottom: $govuk-header-border-width solid $govuk-header-border-color;
42
- }
43
-
44
- .govuk-header__logotype {
45
- display: inline-block;
46
- margin-right: govuk-spacing(1);
47
- }
48
-
49
- .govuk-header__logotype-crown {
50
- position: relative;
51
- top: -1px;
52
- margin-right: 1px;
53
- fill: currentColor;
54
- vertical-align: top;
55
- }
56
-
57
- .govuk-header__logotype-crown-fallback-image {
58
- width: 36px;
59
- height: 32px;
60
- border: 0;
61
- vertical-align: middle;
62
- }
63
-
64
- .govuk-header__product-name {
65
- @include govuk-font($size: 24, $line-height: 1);
66
- display: inline-table;
67
- padding-right: govuk-spacing(2);
68
- }
69
-
70
- .govuk-header__link {
71
- text-decoration: none;
72
-
73
- &:link,
74
- &:visited {
75
- color: $govuk-header-link;
76
- }
77
-
78
- &:hover {
79
- text-decoration: underline;
80
- }
81
-
82
- &:focus {
83
- @include govuk-focused-text;
84
- }
85
-
86
- // alphagov/govuk_template includes a specific a:link:focus selector
87
- // designed to make unvisited links a slightly darker blue when focussed, so
88
- // we need to override the text colour for that combination of selectors.
89
- @include govuk-compatibility(govuk_template) {
90
- &:link:focus {
91
- @include govuk-text-colour;
92
- }
93
- }
94
- }
95
-
96
- .govuk-header__link--homepage {
97
- // Font size needs to be set on the link so that the box sizing is correct
98
- // in Firefox
99
- @include govuk-font($size: false, $weight: bold);
100
-
101
- display: inline-block;
102
- font-size: 30px; // We don't have a mixin that produces 30px font size
103
- line-height: 1;
104
-
105
- &:link,
106
- &:visited {
107
- text-decoration: none;
108
- }
109
-
110
- &:hover,
111
- &:active {
112
- // Negate the added border
113
- margin-bottom: -1px;
114
- // Omitting colour will use default value of currentColor – if we
115
- // specified currentColor explicitly IE8 would ignore this rule.
116
- border-bottom: 1px solid;
117
- }
118
-
119
- // Remove any borders that show when focused and hovered.
120
- &:focus {
121
- margin-bottom: 0;
122
- border-bottom: 0;
123
- }
124
- }
125
-
126
- .govuk-header__link--service-name {
127
- display: inline-block;
128
- margin-bottom: govuk-spacing(2);
129
- @include govuk-font($size: 24, $weight: bold);
130
- }
131
-
132
- .govuk-header__logo,
133
- .govuk-header__content {
134
- box-sizing: border-box;
135
- }
136
-
137
- .govuk-header__logo {
138
- @include govuk-responsive-margin(2, "bottom");
139
- padding-right: govuk-spacing(8);
140
-
141
- @include govuk-media-query ($from: desktop) {
142
- width: 33.33%;
143
- padding-right: $govuk-gutter-half;
144
- float: left;
145
- vertical-align: top;
146
- }
147
- }
148
-
149
- .govuk-header__content {
150
- @include govuk-media-query ($from: desktop) {
151
- width: 66.66%;
152
- padding-left: $govuk-gutter-half;
153
- float: left;
154
- }
155
- }
156
-
157
- .govuk-header__menu-button {
158
- @include govuk-font($size: 16);
159
- display: none;
160
- position: absolute;
161
- top: govuk-spacing(4);
162
- right: 0;
163
- margin: 0;
164
- padding: 0;
165
- border: 0;
166
- color: $govuk-header-link;
167
- background: none;
168
-
169
- &:hover {
170
- text-decoration: underline;
171
- }
172
-
173
- &:focus {
174
- @include govuk-focused-text;
175
- }
176
-
177
- &::after {
178
- @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
179
- content: "";
180
- margin-left: govuk-spacing(1);
181
- }
182
-
183
- @include govuk-media-query ($from: tablet) {
184
- top: govuk-spacing(3);
185
- }
186
- }
187
-
188
- .govuk-header__menu-button--open {
189
- &::after {
190
- @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
191
- }
192
- }
193
-
194
- .govuk-header__navigation {
195
- @include govuk-responsive-margin(2, "bottom");
196
- display: block;
197
- margin: 0;
198
- padding: 0;
199
- list-style: none;
200
- }
201
-
202
- .js-enabled {
203
- .govuk-header__menu-button {
204
- display: block;
205
- @include govuk-media-query ($from: desktop) {
206
- display: none;
207
- }
208
- }
209
-
210
- .govuk-header__navigation {
211
- display: none;
212
- @include govuk-media-query ($from: desktop) {
213
- display: block;
214
- }
215
- }
216
-
217
- .govuk-header__navigation--open {
218
- display: block;
219
- }
220
- }
221
-
222
-
223
- .govuk-header__navigation--end {
224
- @include govuk-media-query ($from: desktop) {
225
- margin: 0;
226
- padding: govuk-spacing(1) 0;
227
- text-align: right;
228
- }
229
- }
230
-
231
- .govuk-header__navigation--no-service-name {
232
- padding-top: govuk-spacing(7);
233
- }
234
-
235
- .govuk-header__navigation-item {
236
- padding: govuk-spacing(2) 0;
237
- border-bottom: 1px solid $govuk-header-nav-item-border-color;
238
-
239
- @include govuk-media-query ($from: desktop) {
240
- display: inline-block;
241
- margin-right: govuk-spacing(3);
242
- padding: govuk-spacing(1) 0;
243
- border: 0;
244
- }
245
-
246
- a {
247
- @include govuk-font($size: 16, $weight: bold);
248
- white-space: nowrap;
249
- }
250
- }
251
-
252
- .govuk-header__navigation-item--active {
253
- a {
254
- &:link,
255
- &:hover,
256
- &:visited {
257
- color: $govuk-header-link-active;
258
- }
259
-
260
- // When focussed, the text colour needs to be darker to ensure that colour
261
- // contrast is still acceptable
262
- &:focus {
263
- color: $govuk-focus-text-colour;
264
- }
265
- }
266
- }
267
-
268
- .govuk-header__navigation-item:last-child {
269
- margin-right: 0;
270
- }
271
-
272
- @include govuk-media-query($media-type: print) {
273
- .govuk-header {
274
- border-bottom-width: 0;
275
- color: govuk-colour("black");
276
- background: transparent;
277
- }
278
-
279
- // Hide the inverted crown when printing in browsers that don't support SVG.
280
- .govuk-header__logotype-crown-fallback-image {
281
- display: none;
282
- }
283
-
284
- .govuk-header__link {
285
- &:link,
286
- &:visited {
287
- color: govuk-colour("black");
288
- }
289
-
290
- // Do not append link href to GOV.UK link when printing (e.g. '(/)')
291
- &:after {
292
- display: none;
293
- }
294
- }
295
- }
296
-
297
- @if $govuk-use-legacy-font {
298
- // Begin adjustments for font baseline offset
299
- // These should be removed when the font is updated with the correct baseline
300
- .govuk-header__logotype-crown,
301
- .govuk-header__logotype-crown-fallback-image {
302
- position: relative;
303
- top: -4px;
304
- vertical-align: middle;
305
- }
306
-
307
- .govuk-header {
308
- $offset: 3px;
309
- padding-top: $offset;
310
- }
311
-
312
- .govuk-header__link--homepage {
313
- line-height: 30px;
314
- }
315
- // End adjustments
316
- }
317
-
318
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,331 @@
1
+ @include govuk-exports("govuk/component/header") {
2
+
3
+ $govuk-header-background: govuk-colour("black");
4
+ $govuk-header-border-color: $govuk-brand-colour;
5
+ $govuk-header-border-width: govuk-spacing(2);
6
+ $govuk-header-text: govuk-colour("white");
7
+ $govuk-header-link-active: #1d8feb;
8
+ $govuk-header-nav-item-border-color: #2e3133;
9
+ $govuk-header-link-underline-thickness: 3px;
10
+
11
+ .govuk-header {
12
+ @include govuk-font($size: 16);
13
+
14
+ border-bottom: govuk-spacing(2) solid govuk-colour("white");
15
+ color: $govuk-header-text;
16
+ background: $govuk-header-background;
17
+ }
18
+
19
+ .govuk-header__container--full-width {
20
+ padding: 0 govuk-spacing(3);
21
+ border-color: $govuk-header-border-color;
22
+
23
+ .govuk-header__menu-button {
24
+ right: govuk-spacing(3);
25
+ }
26
+ }
27
+
28
+ .govuk-header__container {
29
+ @include govuk-clearfix;
30
+ position: relative;
31
+ margin-bottom: -$govuk-header-border-width;
32
+ padding-top: govuk-spacing(2);
33
+ border-bottom: $govuk-header-border-width solid $govuk-header-border-color;
34
+ }
35
+
36
+ .govuk-header__logotype {
37
+ display: inline-block;
38
+
39
+ // Add a gap after the logo in case it's followed by a product name. This
40
+ // gets removed later if the logotype is a :last-child.
41
+ margin-right: govuk-spacing(1);
42
+
43
+ // Prevent readability backplate from obscuring underline in Windows High
44
+ // Contrast Mode
45
+ @media (forced-colors: active) {
46
+ forced-color-adjust: none;
47
+ color: linktext;
48
+ }
49
+
50
+ // Remove the gap after the logo if there's no product name to keep hover
51
+ // and focus states neat
52
+ &:last-child {
53
+ margin-right: 0;
54
+ }
55
+ }
56
+
57
+ .govuk-header__logotype-crown {
58
+ position: relative;
59
+ top: -1px;
60
+ margin-right: 1px;
61
+ fill: currentColor;
62
+ vertical-align: top;
63
+ }
64
+
65
+ .govuk-header__logotype-crown-fallback-image {
66
+ width: 36px;
67
+ height: 32px;
68
+ border: 0;
69
+ vertical-align: bottom;
70
+ }
71
+
72
+ .govuk-header__product-name {
73
+ @include govuk-font($size: 24, $line-height: 1);
74
+ display: inline-table;
75
+ }
76
+
77
+ .govuk-header__link {
78
+ // Avoid using the `govuk-link-common` mixin because the links in the header
79
+ // get a special treatment, because:
80
+ //
81
+ // - underlines are only visible on hover
82
+ // - all links get a 3px underline regardless of text size, as there are
83
+ // multiple grouped elements close to one another and having slightly
84
+ // different underline widths looks unbalanced
85
+ @include govuk-typography-common;
86
+ @include govuk-link-style-inverse;
87
+
88
+ text-decoration: none;
89
+
90
+ &:hover {
91
+ text-decoration: underline;
92
+ text-decoration-thickness: $govuk-header-link-underline-thickness;
93
+
94
+ @if ($govuk-link-underline-offset) {
95
+ text-underline-offset: $govuk-link-underline-offset;
96
+ }
97
+ }
98
+
99
+ &:focus {
100
+ @include govuk-focused-text;
101
+ }
102
+ }
103
+
104
+ .govuk-header__link--homepage {
105
+ // Font size needs to be set on the link so that the box sizing is correct
106
+ // in Firefox
107
+ @include govuk-font($size: false, $weight: bold);
108
+
109
+ display: inline-block;
110
+ margin-right: govuk-spacing(2);
111
+ font-size: 30px; // We don't have a mixin that produces 30px font size
112
+ line-height: 1;
113
+
114
+ &:link,
115
+ &:visited {
116
+ text-decoration: none;
117
+ }
118
+
119
+ &:hover,
120
+ &:active {
121
+ // Negate the added border
122
+ margin-bottom: $govuk-header-link-underline-thickness * -1;
123
+ // Omitting colour will use default value of currentColor – if we
124
+ // specified currentColor explicitly IE8 would ignore this rule.
125
+ border-bottom: $govuk-header-link-underline-thickness solid;
126
+ }
127
+
128
+ // Remove any borders that show when focused and hovered.
129
+ &:focus {
130
+ margin-bottom: 0;
131
+ border-bottom: 0;
132
+ }
133
+ }
134
+
135
+ .govuk-header__link--service-name {
136
+ display: inline-block;
137
+ margin-bottom: govuk-spacing(2);
138
+ @include govuk-font($size: 24, $weight: bold);
139
+ }
140
+
141
+ .govuk-header__logo,
142
+ .govuk-header__content {
143
+ box-sizing: border-box;
144
+ }
145
+
146
+ .govuk-header__logo {
147
+ @include govuk-responsive-margin(2, "bottom");
148
+ padding-right: govuk-spacing(8);
149
+
150
+ @include govuk-media-query ($from: desktop) {
151
+ width: 33.33%;
152
+ padding-right: $govuk-gutter-half;
153
+ float: left;
154
+ vertical-align: top;
155
+ }
156
+ }
157
+
158
+ .govuk-header__content {
159
+ @include govuk-media-query ($from: desktop) {
160
+ width: 66.66%;
161
+ padding-left: $govuk-gutter-half;
162
+ float: left;
163
+ }
164
+ }
165
+
166
+ .govuk-header__menu-button {
167
+ @include govuk-font($size: 16);
168
+ display: none;
169
+ position: absolute;
170
+ top: govuk-spacing(4);
171
+ right: 0;
172
+ margin: 0;
173
+ padding: 0;
174
+ border: 0;
175
+ color: govuk-colour("white");
176
+ background: none;
177
+ cursor: pointer;
178
+
179
+ &:hover {
180
+ -webkit-text-decoration: solid underline $govuk-header-link-underline-thickness;
181
+ text-decoration: solid underline $govuk-header-link-underline-thickness;
182
+
183
+ @if ($govuk-link-underline-offset) {
184
+ text-underline-offset: $govuk-link-underline-offset;
185
+ }
186
+ }
187
+
188
+ &:focus {
189
+ @include govuk-focused-text;
190
+ }
191
+
192
+ &:after {
193
+ @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
194
+ content: "";
195
+ margin-left: govuk-spacing(1);
196
+ }
197
+
198
+ @include govuk-media-query ($from: tablet) {
199
+ top: govuk-spacing(3);
200
+ }
201
+ }
202
+
203
+ .govuk-header__menu-button--open {
204
+ &:after {
205
+ @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
206
+ }
207
+ }
208
+
209
+ .govuk-header__navigation {
210
+ @include govuk-responsive-margin(2, "bottom");
211
+ display: block;
212
+ margin: 0;
213
+ padding: 0;
214
+ list-style: none;
215
+ }
216
+
217
+ .js-enabled {
218
+ .govuk-header__menu-button {
219
+ display: block;
220
+ @include govuk-media-query ($from: desktop) {
221
+ display: none;
222
+ }
223
+ }
224
+
225
+ .govuk-header__navigation {
226
+ display: none;
227
+ @include govuk-media-query ($from: desktop) {
228
+ display: block;
229
+ }
230
+ }
231
+
232
+ .govuk-header__navigation--open {
233
+ display: block;
234
+ }
235
+ }
236
+
237
+ .govuk-header__navigation--end {
238
+ @include govuk-media-query ($from: desktop) {
239
+ margin: 0;
240
+ padding: govuk-spacing(1) 0;
241
+ text-align: right;
242
+ }
243
+ }
244
+
245
+ .govuk-header__navigation--no-service-name {
246
+ padding-top: govuk-spacing(7);
247
+ }
248
+
249
+ .govuk-header__navigation-item {
250
+ padding: govuk-spacing(2) 0;
251
+ border-bottom: 1px solid $govuk-header-nav-item-border-color;
252
+
253
+ @include govuk-media-query ($from: desktop) {
254
+ display: inline-block;
255
+ margin-right: govuk-spacing(3);
256
+ padding: govuk-spacing(1) 0;
257
+ border: 0;
258
+ }
259
+
260
+ a {
261
+ @include govuk-font($size: 16, $weight: bold);
262
+ white-space: nowrap;
263
+ }
264
+ }
265
+
266
+ .govuk-header__navigation-item--active {
267
+ a {
268
+ &:link,
269
+ &:hover,
270
+ &:visited {
271
+ color: $govuk-header-link-active;
272
+ }
273
+
274
+ // When focussed, the text colour needs to be darker to ensure that colour
275
+ // contrast is still acceptable
276
+ &:focus {
277
+ color: $govuk-focus-text-colour;
278
+ }
279
+ }
280
+ }
281
+
282
+ .govuk-header__navigation-item:last-child {
283
+ margin-right: 0;
284
+ }
285
+
286
+ @include govuk-media-query($media-type: print) {
287
+ .govuk-header {
288
+ border-bottom-width: 0;
289
+ color: govuk-colour("black");
290
+ background: transparent;
291
+ }
292
+
293
+ // Hide the inverted crown when printing in browsers that don't support SVG.
294
+ .govuk-header__logotype-crown-fallback-image {
295
+ display: none;
296
+ }
297
+
298
+ .govuk-header__link {
299
+ &:link,
300
+ &:visited {
301
+ color: govuk-colour("black");
302
+ }
303
+
304
+ // Do not append link href to GOV.UK link when printing (e.g. '(/)')
305
+ &:after {
306
+ display: none;
307
+ }
308
+ }
309
+ }
310
+
311
+ @if $govuk-use-legacy-font {
312
+ // Begin adjustments for font baseline offset
313
+ // These should be removed when the font is updated with the correct baseline
314
+ .govuk-header__logotype-crown,
315
+ .govuk-header__logotype-crown-fallback-image {
316
+ position: relative;
317
+ top: -4px;
318
+ vertical-align: middle;
319
+ }
320
+
321
+ .govuk-header {
322
+ $offset: 3px;
323
+ padding-top: $offset;
324
+ }
325
+
326
+ .govuk-header__link--homepage {
327
+ line-height: 30px;
328
+ }
329
+ // End adjustments
330
+ }
331
+ }