katalyst-govuk-formbuilder 1.3.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/builds/katalyst/govuk/formbuilder.css +58 -5
  4. data/app/assets/builds/katalyst/govuk/formbuilder.js +98 -64
  5. data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -1
  6. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +7 -6
  7. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  8. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  9. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +14 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +297 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +55 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +193 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +193 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +66 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +54 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +6 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +98 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +146 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +34 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +66 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +87 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  133. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  134. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  135. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  136. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  137. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  138. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  139. metadata +132 -4
  140. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,349 @@
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
+ @include govuk-media-query($from: tablet) {
115
+ display: inline;
116
+
117
+ &:focus {
118
+ // Replicate the focus box shadow but without the -2px y-offset of the first yellow shadow
119
+ // This is to stop the logo getting cut off by the box shadow when focused on above a product name
120
+ box-shadow: 0 0 $govuk-focus-colour;
121
+ }
122
+ }
123
+
124
+ &:link,
125
+ &:visited {
126
+ text-decoration: none;
127
+ }
128
+
129
+ &:hover,
130
+ &:active {
131
+ // Negate the added border
132
+ margin-bottom: $govuk-header-link-underline-thickness * -1;
133
+ // Omitting colour will use default value of currentColor – if we
134
+ // specified currentColor explicitly IE8 would ignore this rule.
135
+ border-bottom: $govuk-header-link-underline-thickness solid;
136
+ }
137
+
138
+ // Remove any borders that show when focused and hovered.
139
+ &:focus {
140
+ margin-bottom: 0;
141
+ border-bottom: 0;
142
+ }
143
+ }
144
+
145
+ // The govuk-header__link--service-name class is deprecated - use
146
+ // govuk-header__service-name instead.
147
+ .govuk-header__service-name,
148
+ .govuk-header__link--service-name {
149
+ display: inline-block;
150
+ margin-bottom: govuk-spacing(2);
151
+ @include govuk-font($size: 24, $weight: bold);
152
+ }
153
+
154
+ .govuk-header__logo,
155
+ .govuk-header__content {
156
+ box-sizing: border-box;
157
+ }
158
+
159
+ .govuk-header__logo {
160
+ @include govuk-responsive-margin(2, "bottom");
161
+ padding-right: govuk-spacing(8);
162
+
163
+ @include govuk-media-query ($from: desktop) {
164
+ width: 33.33%;
165
+ padding-right: $govuk-gutter-half;
166
+ float: left;
167
+ vertical-align: top;
168
+ }
169
+ }
170
+
171
+ .govuk-header__content {
172
+ @include govuk-media-query ($from: desktop) {
173
+ width: 66.66%;
174
+ padding-left: $govuk-gutter-half;
175
+ float: left;
176
+ }
177
+ }
178
+
179
+ .govuk-header__menu-button {
180
+ @include govuk-font($size: 16);
181
+ display: none;
182
+ position: absolute;
183
+ top: govuk-spacing(4);
184
+ right: 0;
185
+ margin: 0;
186
+ padding: 0;
187
+ border: 0;
188
+ color: govuk-colour("white");
189
+ background: none;
190
+ cursor: pointer;
191
+
192
+ &:hover {
193
+ -webkit-text-decoration: solid underline $govuk-header-link-underline-thickness;
194
+ text-decoration: solid underline $govuk-header-link-underline-thickness;
195
+
196
+ @if $govuk-link-underline-offset {
197
+ text-underline-offset: $govuk-link-underline-offset;
198
+ }
199
+ }
200
+
201
+ &:focus {
202
+ @include govuk-focused-text;
203
+ }
204
+
205
+ &:after {
206
+ @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
207
+ content: "";
208
+ margin-left: govuk-spacing(1);
209
+ }
210
+
211
+ &[aria-expanded="true"]:after {
212
+ @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
213
+ }
214
+
215
+ @include govuk-media-query ($from: tablet) {
216
+ top: govuk-spacing(3);
217
+ }
218
+
219
+ .js-enabled & {
220
+ display: block;
221
+ }
222
+
223
+ &[hidden],
224
+ .js-enabled &[hidden] {
225
+ display: none;
226
+ }
227
+ }
228
+
229
+ .govuk-header__navigation {
230
+ @include govuk-media-query ($from: desktop) {
231
+ margin-bottom: govuk-spacing(2);
232
+ }
233
+ }
234
+
235
+ .govuk-header__navigation-list {
236
+ // Reset user-agent default list styles
237
+ margin: 0;
238
+ padding: 0;
239
+ list-style: none;
240
+
241
+ &[hidden] {
242
+ display: none;
243
+ }
244
+ }
245
+
246
+ .govuk-header__navigation--end {
247
+ @include govuk-media-query ($from: desktop) {
248
+ margin: 0;
249
+ padding: govuk-spacing(1) 0;
250
+ text-align: right;
251
+ }
252
+ }
253
+
254
+ // The govuk-header__navigation--no-service-name class is deprecated and will
255
+ // be removed in the next major release.
256
+ .govuk-header__navigation--no-service-name {
257
+ padding-top: govuk-spacing(7);
258
+ }
259
+
260
+ .govuk-header__navigation-item {
261
+ padding: govuk-spacing(2) 0;
262
+ border-bottom: 1px solid $govuk-header-nav-item-border-color;
263
+
264
+ @include govuk-media-query ($from: desktop) {
265
+ display: inline-block;
266
+ margin-right: govuk-spacing(3);
267
+ padding: govuk-spacing(1) 0;
268
+ border: 0;
269
+ }
270
+
271
+ a {
272
+ @include govuk-font($size: 16, $weight: bold);
273
+ white-space: nowrap;
274
+ }
275
+ }
276
+
277
+ .govuk-header__navigation-item--active {
278
+ a {
279
+ &:link,
280
+ &:hover,
281
+ &:visited {
282
+ color: $govuk-header-link-active;
283
+ }
284
+
285
+ // When printing, use the normal blue as this contrasts better with the
286
+ // white printing header
287
+ @include govuk-media-query($media-type: print) {
288
+ color: $govuk-brand-colour;
289
+ }
290
+
291
+ // When focussed, the text colour needs to be darker to ensure that colour
292
+ // contrast is still acceptable
293
+ &:focus {
294
+ color: $govuk-focus-text-colour;
295
+ }
296
+ }
297
+ }
298
+
299
+ .govuk-header__navigation-item:last-child {
300
+ margin-right: 0;
301
+ border-bottom: 0;
302
+ }
303
+
304
+ @include govuk-media-query($media-type: print) {
305
+ .govuk-header {
306
+ border-bottom-width: 0;
307
+ color: govuk-colour("black");
308
+ background: transparent;
309
+ }
310
+
311
+ // Hide the inverted crown when printing in browsers that don't support SVG.
312
+ .govuk-header__logotype-crown-fallback-image {
313
+ display: none;
314
+ }
315
+
316
+ .govuk-header__link {
317
+ &:link,
318
+ &:visited {
319
+ color: govuk-colour("black");
320
+ }
321
+
322
+ // Do not append link href to GOV.UK link when printing (e.g. '(/)')
323
+ &:after {
324
+ display: none;
325
+ }
326
+ }
327
+ }
328
+
329
+ @if $govuk-use-legacy-font {
330
+ // Begin adjustments for font baseline offset
331
+ // These should be removed when the font is updated with the correct baseline
332
+ .govuk-header__logotype-crown,
333
+ .govuk-header__logotype-crown-fallback-image {
334
+ position: relative;
335
+ top: -4px;
336
+ vertical-align: middle;
337
+ }
338
+
339
+ .govuk-header {
340
+ $offset: 3px;
341
+ padding-top: $offset;
342
+ }
343
+
344
+ .govuk-header__link--homepage {
345
+ line-height: 30px;
346
+ }
347
+ // End adjustments
348
+ }
349
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,42 @@
1
+ @include govuk-exports("govuk/component/hint") {
2
+ .govuk-hint {
3
+ @include govuk-font($size: 19);
4
+
5
+ margin-bottom: govuk-spacing(3);
6
+
7
+ color: $govuk-secondary-text-colour;
8
+ }
9
+
10
+ // Reduces margin-bottom of hint when used after the default label (no class)
11
+ // or govuk-label--s for better vertical alignment.
12
+
13
+ // This adjustment will not work when the label is inside the <h1>, however it
14
+ // is unlikely that the default or govuk-label--s class would be used in this
15
+ // case.
16
+
17
+ // This adjustment will not work in browsers that do not support :not().
18
+ // Users with these browsers will see the default size margin (5px larger).
19
+
20
+ .govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
21
+ margin-bottom: govuk-spacing(2);
22
+ }
23
+
24
+ // Reduces margin-bottom of hint when used after the default legend (no class)
25
+ // or govuk-fieldset__legend--s for better vertical alignment.
26
+
27
+ // This adjustment will not work when the legend is outside the <h1>, however
28
+ // it is unlikely that the default or govuk-fieldset__legend--s class would be
29
+ // used in this case.
30
+
31
+ // This adjustment will not work in browsers that do not support :not().
32
+ // Users with these browsers will see the default size margin (5px larger).
33
+
34
+ .govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .govuk-hint {
35
+ margin-bottom: govuk-spacing(2);
36
+ }
37
+
38
+ // Reduces visual spacing of legend when there is a hint
39
+ .govuk-fieldset__legend + .govuk-hint {
40
+ margin-top: govuk-spacing(-1);
41
+ }
42
+ }
@@ -0,0 +1,193 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+
5
+ @include govuk-exports("govuk/component/input") {
6
+ .govuk-input {
7
+ @include govuk-font($size: 19);
8
+
9
+ box-sizing: border-box;
10
+ width: 100%;
11
+ height: 40px;
12
+ @if $govuk-typography-use-rem {
13
+ height: govuk-px-to-rem(40px);
14
+ }
15
+ margin-top: 0;
16
+
17
+ padding: govuk-spacing(1);
18
+ // setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
19
+ // as background-color and color need to always be set together, color should not be set either
20
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
21
+ border-radius: 0;
22
+
23
+ // Disable inner shadow and remove rounded corners
24
+ -webkit-appearance: none;
25
+ appearance: none;
26
+
27
+ &:focus {
28
+ outline: $govuk-focus-width solid $govuk-focus-colour;
29
+ // Ensure outline appears outside of the element
30
+ outline-offset: 0;
31
+ // Double the border by adding its width again. Use `box-shadow` for this // instead of changing `border-width` - this is for consistency with
32
+ // components such as textarea where we avoid changing `border-width` as
33
+ // it will change the element size. Also, `outline` cannot be utilised
34
+ // here as it is already used for the yellow focus state.
35
+ box-shadow: inset 0 0 0 $govuk-border-width-form-element;
36
+
37
+ @include _govuk-if-ie8 {
38
+ // IE8 doesn't support `box-shadow` so double the border with
39
+ // `border-width`.
40
+ border-width: $govuk-border-width-form-element * 2;
41
+ }
42
+ }
43
+
44
+ &:disabled {
45
+ opacity: .5;
46
+ color: inherit;
47
+ background-color: transparent;
48
+ cursor: not-allowed;
49
+ }
50
+ }
51
+
52
+ .govuk-input::-webkit-outer-spin-button,
53
+ .govuk-input::-webkit-inner-spin-button {
54
+ margin: 0;
55
+ -webkit-appearance: none;
56
+ }
57
+
58
+ .govuk-input[type="number"] {
59
+ -moz-appearance: textfield;
60
+ }
61
+
62
+ .govuk-input--error {
63
+ border-color: $govuk-error-colour;
64
+
65
+ &:focus {
66
+ border-color: $govuk-input-border-colour;
67
+ }
68
+ }
69
+
70
+ .govuk-input--extra-letter-spacing {
71
+ @include govuk-font(false, $tabular: true);
72
+ letter-spacing: .05em;
73
+ }
74
+
75
+ // em measurements are based on the point size of the typeface
76
+ // Extra space is added on the right hand side to allow for the Safari prefill icon
77
+
78
+ .govuk-input--width-30 {
79
+ max-width: 29.5em;
80
+ }
81
+
82
+ .govuk-input--width-20 {
83
+ max-width: 20.5em;
84
+ }
85
+
86
+ .govuk-input--width-10 {
87
+ max-width: 11.5em;
88
+ }
89
+
90
+ .govuk-input--width-5 {
91
+ max-width: 5.5em;
92
+ }
93
+
94
+ .govuk-input--width-4 {
95
+ max-width: 4.5em;
96
+ }
97
+
98
+ .govuk-input--width-3 {
99
+ max-width: 3.75em;
100
+ }
101
+
102
+ .govuk-input--width-2 {
103
+ max-width: 2.75em;
104
+ }
105
+
106
+ .govuk-input__wrapper {
107
+ display: -ms-flexbox;
108
+ display: flex;
109
+
110
+ .govuk-input {
111
+ -ms-flex: 0 1 auto;
112
+ flex: 0 1 auto;
113
+ }
114
+
115
+ .govuk-input:focus {
116
+ // Hack to stop focus style being overlapped by the suffix
117
+ z-index: 1;
118
+ }
119
+
120
+ // Split prefix/suffix onto separate lines on narrow screens
121
+ @include govuk-media-query($until: mobile) {
122
+ display: block;
123
+
124
+ .govuk-input {
125
+ // Set max-width to override potential width override class on the input
126
+ max-width: 100%;
127
+ }
128
+ }
129
+ }
130
+
131
+ .govuk-input__prefix,
132
+ .govuk-input__suffix {
133
+ @include govuk-font($size: 19);
134
+
135
+ box-sizing: border-box;
136
+ display: inline-block;
137
+ min-width: 40px;
138
+ @if $govuk-typography-use-rem {
139
+ min-width: govuk-px-to-rem(40px);
140
+ }
141
+ height: 40px;
142
+ @if $govuk-typography-use-rem {
143
+ height: govuk-px-to-rem(40px);
144
+ }
145
+
146
+ padding: govuk-spacing(1);
147
+ border: $govuk-border-width-form-element solid $govuk-input-border-colour;
148
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
149
+
150
+ text-align: center;
151
+ @include govuk-media-query($until: tablet) {
152
+ line-height: 1.6;
153
+ }
154
+ white-space: nowrap;
155
+
156
+ // Emphasise non-editable status of prefixes and suffixes
157
+ cursor: default;
158
+
159
+ -ms-flex: 0 0 auto;
160
+
161
+ flex: 0 0 auto;
162
+
163
+ // Split prefix/suffix onto separate lines on narrow screens
164
+ @include govuk-media-query($until: mobile) {
165
+ display: block;
166
+ height: 100%;
167
+ white-space: normal;
168
+ }
169
+ }
170
+
171
+ .govuk-input__prefix {
172
+ @include govuk-media-query($until: mobile) {
173
+ border-bottom: 0;
174
+ }
175
+ @include govuk-media-query($from: mobile) {
176
+ @include _govuk-not-ie8 {
177
+ border-right: 0;
178
+ }
179
+ }
180
+ }
181
+
182
+ // Split prefix/suffix onto separate lines on narrow screens
183
+ .govuk-input__suffix {
184
+ @include govuk-media-query($until: mobile) {
185
+ border-top: 0;
186
+ }
187
+ @include govuk-media-query($from: mobile) {
188
+ @include _govuk-not-ie8 {
189
+ border-left: 0;
190
+ }
191
+ }
192
+ }
193
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,24 @@
1
+ @include govuk-exports("govuk/component/inset-text") {
2
+ .govuk-inset-text {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-text-colour;
5
+ padding: govuk-spacing(3);
6
+ // Margin top intended to collapse
7
+ // This adds an additional 10px to the paragraph above
8
+ @include govuk-responsive-margin(6, "top");
9
+ @include govuk-responsive-margin(6, "bottom");
10
+
11
+ clear: both;
12
+
13
+ border-left: $govuk-border-width-wide solid $govuk-border-colour;
14
+
15
+ > :first-child {
16
+ margin-top: 0;
17
+ }
18
+
19
+ > :only-child,
20
+ > :last-child {
21
+ margin-bottom: 0;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,41 @@
1
+ @include govuk-exports("govuk/component/label") {
2
+ .govuk-label {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-text-colour;
5
+
6
+ display: block;
7
+
8
+ margin-bottom: govuk-spacing(1);
9
+ }
10
+
11
+ // Modifiers that make labels look more like their equivalent headings
12
+
13
+ .govuk-label--xl {
14
+ @include govuk-font($size: 48, $weight: bold);
15
+ margin-bottom: govuk-spacing(3);
16
+ }
17
+
18
+ .govuk-label--l {
19
+ @include govuk-font($size: 36, $weight: bold);
20
+ margin-bottom: govuk-spacing(3);
21
+ }
22
+
23
+ .govuk-label--m {
24
+ @include govuk-font($size: 24, $weight: bold);
25
+ margin-bottom: govuk-spacing(2);
26
+ }
27
+
28
+ .govuk-label--s {
29
+ @include govuk-font($size: 19, $weight: bold);
30
+ }
31
+
32
+ // When the label is nested inside a heading, override the heading so that it
33
+ // does not have a margin. Effectively we want to be able to treat the heading
34
+ // as if it is not there.
35
+ //
36
+ // This breaks BEM conventions because it exists as a parent of the 'block',
37
+ // so we can't really consider an element.
38
+ .govuk-label-wrapper {
39
+ margin: 0;
40
+ }
41
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";