dxw_govuk_frontend_rails 2.9.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.circleci/config.yml +33 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +91 -0
- data/Rakefile +50 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dxw_govuk_frontend_rails.gemspec +27 -0
- data/lib/dxw_govuk_frontend_rails/version.rb +3 -0
- data/lib/dxw_govuk_frontend_rails.rb +12 -0
- data/package-lock.json +13 -0
- data/package.json +26 -0
- data/vendor/assets/fonts/bold-a2452cb66f-v1.woff2 +0 -0
- data/vendor/assets/fonts/bold-f38c792ac2-v1.woff +0 -0
- data/vendor/assets/fonts/bold-fb2676462a-v1.eot +0 -0
- data/vendor/assets/fonts/bold-tabular-357fdfbcc3-v1.eot +0 -0
- data/vendor/assets/fonts/bold-tabular-784c21afb8-v1.woff +0 -0
- data/vendor/assets/fonts/bold-tabular-b89238d840-v1.woff2 +0 -0
- data/vendor/assets/fonts/light-2c037cf7e1-v1.eot +0 -0
- data/vendor/assets/fonts/light-458f8ea81c-v1.woff +0 -0
- data/vendor/assets/fonts/light-f38ad40456-v1.woff2 +0 -0
- data/vendor/assets/fonts/light-tabular-498ea8ffe2-v1.eot +0 -0
- data/vendor/assets/fonts/light-tabular-62cc6f0a28-v1.woff +0 -0
- data/vendor/assets/fonts/light-tabular-851b10ccdd-v1.woff2 +0 -0
- data/vendor/assets/images/favicon.ico +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-152x152.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-167x167.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon-180x180.png +0 -0
- data/vendor/assets/images/govuk-apple-touch-icon.png +0 -0
- data/vendor/assets/images/govuk-crest-2x.png +0 -0
- data/vendor/assets/images/govuk-crest.png +0 -0
- data/vendor/assets/images/govuk-logotype-crown.png +0 -0
- data/vendor/assets/images/govuk-mask-icon.svg +7 -0
- data/vendor/assets/images/govuk-opengraph-image.png +0 -0
- data/vendor/assets/images/icon-arrow-left.png +0 -0
- data/vendor/assets/images/icon-important.png +0 -0
- data/vendor/assets/images/icon-pointer-2x.png +0 -0
- data/vendor/assets/images/icon-pointer.png +0 -0
- data/vendor/assets/javascripts/govuk_frontend_rails.js +2358 -0
- data/vendor/assets/stylesheets/all-ie8.scss +6 -0
- data/vendor/assets/stylesheets/all.scss +11 -0
- data/vendor/assets/stylesheets/components/_all.scss +29 -0
- data/vendor/assets/stylesheets/components/accordion/_accordion.scss +188 -0
- data/vendor/assets/stylesheets/components/back-link/_back-link.scss +54 -0
- data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +119 -0
- data/vendor/assets/stylesheets/components/button/_button.scss +180 -0
- data/vendor/assets/stylesheets/components/character-count/_character-count.scss +31 -0
- data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +161 -0
- data/vendor/assets/stylesheets/components/date-input/_date-input.scss +30 -0
- data/vendor/assets/stylesheets/components/details/_details.scss +89 -0
- data/vendor/assets/stylesheets/components/error-message/_error-message.scss +15 -0
- data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +72 -0
- data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +60 -0
- data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +19 -0
- data/vendor/assets/stylesheets/components/footer/_footer.scss +233 -0
- data/vendor/assets/stylesheets/components/header/_header.scss +304 -0
- data/vendor/assets/stylesheets/components/hint/_hint.scss +50 -0
- data/vendor/assets/stylesheets/components/input/_input.scss +77 -0
- data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +28 -0
- data/vendor/assets/stylesheets/components/label/_label.scss +45 -0
- data/vendor/assets/stylesheets/components/panel/_panel.scss +44 -0
- data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +31 -0
- data/vendor/assets/stylesheets/components/radios/_radios.scss +187 -0
- data/vendor/assets/stylesheets/components/select/_select.scss +32 -0
- data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +26 -0
- data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +123 -0
- data/vendor/assets/stylesheets/components/table/_table.scss +53 -0
- data/vendor/assets/stylesheets/components/tabs/_tabs.scss +130 -0
- data/vendor/assets/stylesheets/components/tag/_tag.scss +33 -0
- data/vendor/assets/stylesheets/components/textarea/_textarea.scss +32 -0
- data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +59 -0
- data/vendor/assets/stylesheets/core/_all.scss +6 -0
- data/vendor/assets/stylesheets/core/_global-styles.scss +23 -0
- data/vendor/assets/stylesheets/core/_links.scss +31 -0
- data/vendor/assets/stylesheets/core/_lists.scss +58 -0
- data/vendor/assets/stylesheets/core/_section-break.scss +60 -0
- data/vendor/assets/stylesheets/core/_template.scss +35 -0
- data/vendor/assets/stylesheets/core/_typography.scss +190 -0
- data/vendor/assets/stylesheets/govuk-frontend-rails.scss +16 -0
- data/vendor/assets/stylesheets/helpers/_all.scss +12 -0
- data/vendor/assets/stylesheets/helpers/_clearfix.scss +15 -0
- data/vendor/assets/stylesheets/helpers/_colour.scss +51 -0
- data/vendor/assets/stylesheets/helpers/_device-pixels.scss +38 -0
- data/vendor/assets/stylesheets/helpers/_focusable.scss +34 -0
- data/vendor/assets/stylesheets/helpers/_font-faces.scss +67 -0
- data/vendor/assets/stylesheets/helpers/_grid.scss +107 -0
- data/vendor/assets/stylesheets/helpers/_links.scss +200 -0
- data/vendor/assets/stylesheets/helpers/_media-queries.scss +95 -0
- data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +80 -0
- data/vendor/assets/stylesheets/helpers/_spacing.scss +152 -0
- data/vendor/assets/stylesheets/helpers/_typography.scss +188 -0
- data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +82 -0
- data/vendor/assets/stylesheets/objects/_all.scss +4 -0
- data/vendor/assets/stylesheets/objects/_form-group.scss +25 -0
- data/vendor/assets/stylesheets/objects/_grid.scss +27 -0
- data/vendor/assets/stylesheets/objects/_main-wrapper.scss +53 -0
- data/vendor/assets/stylesheets/objects/_width-container.scss +63 -0
- data/vendor/assets/stylesheets/overrides/_all.scss +4 -0
- data/vendor/assets/stylesheets/overrides/_display.scss +18 -0
- data/vendor/assets/stylesheets/overrides/_spacing.scss +62 -0
- data/vendor/assets/stylesheets/overrides/_typography.scss +25 -0
- data/vendor/assets/stylesheets/overrides/_width.scss +49 -0
- data/vendor/assets/stylesheets/settings/_all.scss +21 -0
- data/vendor/assets/stylesheets/settings/_assets.scss +82 -0
- data/vendor/assets/stylesheets/settings/_colours-applied.scss +140 -0
- data/vendor/assets/stylesheets/settings/_colours-organisations.scss +136 -0
- data/vendor/assets/stylesheets/settings/_colours-palette.scss +37 -0
- data/vendor/assets/stylesheets/settings/_compatibility.scss +51 -0
- data/vendor/assets/stylesheets/settings/_global-styles.scss +13 -0
- data/vendor/assets/stylesheets/settings/_ie8.scss +18 -0
- data/vendor/assets/stylesheets/settings/_measurements.scss +99 -0
- data/vendor/assets/stylesheets/settings/_media-queries.scss +23 -0
- data/vendor/assets/stylesheets/settings/_spacing.scss +80 -0
- data/vendor/assets/stylesheets/settings/_typography-font-families.scss +22 -0
- data/vendor/assets/stylesheets/settings/_typography-font.scss +60 -0
- data/vendor/assets/stylesheets/settings/_typography-responsive.scss +180 -0
- data/vendor/assets/stylesheets/tools/_all.scss +8 -0
- data/vendor/assets/stylesheets/tools/_compatibility.scss +36 -0
- data/vendor/assets/stylesheets/tools/_exports.scss +33 -0
- data/vendor/assets/stylesheets/tools/_font-url.scss +28 -0
- data/vendor/assets/stylesheets/tools/_ie8.scss +51 -0
- data/vendor/assets/stylesheets/tools/_iff.scss +15 -0
- data/vendor/assets/stylesheets/tools/_image-url.scss +28 -0
- data/vendor/assets/stylesheets/tools/_px-to-em.scss +20 -0
- data/vendor/assets/stylesheets/tools/_px-to-rem.scss +20 -0
- data/vendor/assets/stylesheets/utilities/_all.scss +2 -0
- data/vendor/assets/stylesheets/utilities/_clearfix.scss +5 -0
- data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +10 -0
- data/vendor/assets/stylesheets/vendor/_sass-mq.scss +351 -0
- metadata +204 -0
@@ -0,0 +1,304 @@
|
|
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
|
+
margin-right: govuk-spacing(1);
|
46
|
+
}
|
47
|
+
|
48
|
+
.govuk-header__logotype-crown {
|
49
|
+
margin-right: 1px;
|
50
|
+
fill: currentColor;
|
51
|
+
vertical-align: middle;
|
52
|
+
}
|
53
|
+
|
54
|
+
.govuk-header__logotype-crown-fallback-image {
|
55
|
+
width: 36px;
|
56
|
+
height: 32px;
|
57
|
+
border: 0;
|
58
|
+
vertical-align: middle;
|
59
|
+
}
|
60
|
+
|
61
|
+
.govuk-header__product-name {
|
62
|
+
@include govuk-font($size: 24);
|
63
|
+
display: inline-table;
|
64
|
+
padding-right: govuk-spacing(2);
|
65
|
+
}
|
66
|
+
|
67
|
+
.govuk-header__link {
|
68
|
+
@include govuk-focusable-fill;
|
69
|
+
|
70
|
+
text-decoration: none;
|
71
|
+
|
72
|
+
&:link,
|
73
|
+
&:visited {
|
74
|
+
color: $govuk-header-link;
|
75
|
+
}
|
76
|
+
|
77
|
+
&:hover {
|
78
|
+
text-decoration: underline;
|
79
|
+
}
|
80
|
+
|
81
|
+
// When focussed, the text colour needs to be darker to ensure that colour
|
82
|
+
// contrast is still acceptable
|
83
|
+
&:focus {
|
84
|
+
color: $govuk-focus-text-colour;
|
85
|
+
}
|
86
|
+
|
87
|
+
// alphagov/govuk_template includes a specific a:link:focus selector
|
88
|
+
// designed to make unvisited links a slightly darker blue when focussed, so
|
89
|
+
// we need to override the text colour for that combination of selectors.
|
90
|
+
@include govuk-compatibility(govuk_template) {
|
91
|
+
&:link:focus {
|
92
|
+
@include govuk-text-colour;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
.govuk-header__link--homepage {
|
98
|
+
// Font size needs to be set on the link so that the box sizing is correct
|
99
|
+
// in Firefox
|
100
|
+
@include govuk-font($size: false, $weight: bold);
|
101
|
+
|
102
|
+
display: inline-block;
|
103
|
+
font-size: 30px; // We don't have a mixin that produces 30px font size
|
104
|
+
line-height: 30px;
|
105
|
+
|
106
|
+
&:link,
|
107
|
+
&:visited {
|
108
|
+
text-decoration: none;
|
109
|
+
}
|
110
|
+
|
111
|
+
&:hover,
|
112
|
+
&:active {
|
113
|
+
// Negate the added border
|
114
|
+
margin-bottom: -1px;
|
115
|
+
// Omitting colour will use default value of currentColor – if we
|
116
|
+
// specified currentColor explicitly IE8 would ignore this rule.
|
117
|
+
border-bottom: 1px solid;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
.govuk-header__link--service-name {
|
122
|
+
display: inline-block;
|
123
|
+
margin-bottom: govuk-spacing(2);
|
124
|
+
@include govuk-font($size: 24, $weight: bold);
|
125
|
+
}
|
126
|
+
|
127
|
+
.govuk-header__logo,
|
128
|
+
.govuk-header__content {
|
129
|
+
box-sizing: border-box;
|
130
|
+
}
|
131
|
+
|
132
|
+
.govuk-header__logo {
|
133
|
+
@include govuk-responsive-margin(2, "bottom");
|
134
|
+
padding-right: govuk-spacing(8);
|
135
|
+
|
136
|
+
@include mq ($from: desktop) {
|
137
|
+
width: 33.33%;
|
138
|
+
padding-right: $govuk-gutter-half;
|
139
|
+
float: left;
|
140
|
+
vertical-align: top;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
.govuk-header__content {
|
145
|
+
@include mq ($from: desktop) {
|
146
|
+
width: 66.66%;
|
147
|
+
padding-left: $govuk-gutter-half;
|
148
|
+
float: left;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
.govuk-header__menu-button {
|
153
|
+
@include govuk-font($size: 16);
|
154
|
+
display: none;
|
155
|
+
position: absolute;
|
156
|
+
top: govuk-spacing(4);
|
157
|
+
right: 0;
|
158
|
+
margin: 0;
|
159
|
+
padding: 0;
|
160
|
+
border: 0;
|
161
|
+
color: $govuk-header-link;
|
162
|
+
background: none;
|
163
|
+
|
164
|
+
&:hover {
|
165
|
+
text-decoration: underline;
|
166
|
+
}
|
167
|
+
|
168
|
+
&::after {
|
169
|
+
@include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block);
|
170
|
+
content: "";
|
171
|
+
margin-left: govuk-spacing(1);
|
172
|
+
}
|
173
|
+
|
174
|
+
@include govuk-focusable;
|
175
|
+
|
176
|
+
@include mq ($from: tablet) {
|
177
|
+
top: govuk-spacing(3);
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
.govuk-header__menu-button--open {
|
182
|
+
&::after {
|
183
|
+
@include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block);
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
.govuk-header__navigation {
|
188
|
+
@include govuk-responsive-margin(2, "bottom");
|
189
|
+
display: block;
|
190
|
+
margin: 0;
|
191
|
+
padding: 0;
|
192
|
+
list-style: none;
|
193
|
+
}
|
194
|
+
|
195
|
+
.js-enabled {
|
196
|
+
.govuk-header__menu-button {
|
197
|
+
display: block;
|
198
|
+
@include mq ($from: desktop) {
|
199
|
+
display: none;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
.govuk-header__navigation {
|
204
|
+
display: none;
|
205
|
+
@include mq ($from: desktop) {
|
206
|
+
display: block;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
.govuk-header__navigation--open {
|
211
|
+
display: block;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
|
216
|
+
.govuk-header__navigation--end {
|
217
|
+
@include mq ($from: desktop) {
|
218
|
+
margin: 0;
|
219
|
+
padding: govuk-spacing(1) 0;
|
220
|
+
text-align: right;
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
224
|
+
.govuk-header__navigation--no-service-name {
|
225
|
+
padding-top: govuk-spacing(7);
|
226
|
+
}
|
227
|
+
|
228
|
+
.govuk-header__navigation-item {
|
229
|
+
padding: govuk-spacing(2) 0;
|
230
|
+
border-bottom: 1px solid $govuk-header-nav-item-border-color;
|
231
|
+
|
232
|
+
@include mq ($from: desktop) {
|
233
|
+
display: inline-block;
|
234
|
+
margin-right: govuk-spacing(3);
|
235
|
+
padding: govuk-spacing(1) 0;
|
236
|
+
border: 0;
|
237
|
+
}
|
238
|
+
|
239
|
+
a {
|
240
|
+
@include govuk-font($size: 16, $weight: bold);
|
241
|
+
white-space: nowrap;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
.govuk-header__navigation-item--active {
|
246
|
+
a {
|
247
|
+
&:link,
|
248
|
+
&:hover,
|
249
|
+
&:visited {
|
250
|
+
color: $govuk-header-link-active;
|
251
|
+
}
|
252
|
+
|
253
|
+
// When focussed, the text colour needs to be darker to ensure that colour
|
254
|
+
// contrast is still acceptable
|
255
|
+
&:focus {
|
256
|
+
color: $govuk-focus-text-colour;
|
257
|
+
}
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
.govuk-header__navigation-item:last-child {
|
262
|
+
margin-right: 0;
|
263
|
+
}
|
264
|
+
|
265
|
+
@include govuk-media-query($media-type: print) {
|
266
|
+
.govuk-header {
|
267
|
+
border-bottom-width: 0;
|
268
|
+
color: govuk-colour("black");
|
269
|
+
background: transparent;
|
270
|
+
}
|
271
|
+
|
272
|
+
// Hide the inverted crown when printing in browsers that don't support SVG.
|
273
|
+
.govuk-header__logotype-crown-fallback-image {
|
274
|
+
display: none;
|
275
|
+
}
|
276
|
+
|
277
|
+
.govuk-header__link {
|
278
|
+
&:link,
|
279
|
+
&:visited {
|
280
|
+
color: govuk-colour("black");
|
281
|
+
}
|
282
|
+
|
283
|
+
// Do not append link href to GOV.UK link when printing (e.g. '(/)')
|
284
|
+
&:after {
|
285
|
+
display: none;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
}
|
289
|
+
|
290
|
+
// Begin adjustments for font baseline offset
|
291
|
+
// These should be removed when the font is updated with the correct baseline
|
292
|
+
.govuk-header__logotype-crown,
|
293
|
+
.govuk-header__logotype-crown-fallback-image {
|
294
|
+
position: relative;
|
295
|
+
top: -4px;
|
296
|
+
}
|
297
|
+
|
298
|
+
.govuk-header {
|
299
|
+
$offset: 3px;
|
300
|
+
padding-top: $offset;
|
301
|
+
}
|
302
|
+
// End adjustments
|
303
|
+
|
304
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@include govuk-exports("govuk/component/hint") {
|
6
|
+
.govuk-hint {
|
7
|
+
@include govuk-font($size: 19);
|
8
|
+
|
9
|
+
display: block;
|
10
|
+
|
11
|
+
margin-bottom: govuk-spacing(3);
|
12
|
+
|
13
|
+
color: $govuk-secondary-text-colour;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Reduces margin-bottom of hint when used after the default label (no class)
|
17
|
+
// or govuk-label--s for better vertical alignment.
|
18
|
+
|
19
|
+
// This adjustment will not work when the label is inside the <h1>, however it
|
20
|
+
// is unlikely that the default or govuk-label--s class would be used in this
|
21
|
+
// case.
|
22
|
+
|
23
|
+
// This adjustment will not work in browsers that do not support :not().
|
24
|
+
// Users with these browsers will see the default size margin (5px larger).
|
25
|
+
|
26
|
+
.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
|
27
|
+
margin-bottom: govuk-spacing(2);
|
28
|
+
}
|
29
|
+
|
30
|
+
// Reduces margin-bottom of hint when used after the default legend (no class)
|
31
|
+
// or govuk-fieldset__legend--s for better vertical alignment.
|
32
|
+
|
33
|
+
// This adjustment will not work when the legend is outside the <h1>, however
|
34
|
+
// it is unlikely that the default or govuk-fieldset__legend--s class would be
|
35
|
+
// used in this case.
|
36
|
+
|
37
|
+
// This adjustment will not work in browsers that do not support :not().
|
38
|
+
// Users with these browsers will see the default size margin (5px larger).
|
39
|
+
|
40
|
+
.govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .govuk-hint {
|
41
|
+
margin-bottom: govuk-spacing(2);
|
42
|
+
}
|
43
|
+
|
44
|
+
// Reduces visual spacing of legend when there is a hint
|
45
|
+
|
46
|
+
.govuk-fieldset__legend + .govuk-hint,
|
47
|
+
.govuk-fieldset__legend + .govuk-hint {
|
48
|
+
margin-top: -(govuk-spacing(1));
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@import "../error-message/error-message";
|
6
|
+
@import "../hint/hint";
|
7
|
+
@import "../label/label";
|
8
|
+
|
9
|
+
@include govuk-exports("govuk/component/input") {
|
10
|
+
.govuk-input {
|
11
|
+
@include govuk-font($size: 19);
|
12
|
+
@include govuk-focusable;
|
13
|
+
|
14
|
+
box-sizing: border-box;
|
15
|
+
width: 100%;
|
16
|
+
height: 40px;
|
17
|
+
margin-top: 0;
|
18
|
+
|
19
|
+
padding: govuk-spacing(1);
|
20
|
+
// setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
|
21
|
+
// as background-color and color need to always be set together, color should not be set either
|
22
|
+
border: $govuk-border-width-form-element solid $govuk-input-border-colour;
|
23
|
+
border-radius: 0;
|
24
|
+
|
25
|
+
// Disable inner shadow and remove rounded corners
|
26
|
+
-webkit-appearance: none;
|
27
|
+
-moz-appearance: none;
|
28
|
+
appearance: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
.govuk-input::-webkit-outer-spin-button,
|
32
|
+
.govuk-input::-webkit-inner-spin-button {
|
33
|
+
margin: 0;
|
34
|
+
-webkit-appearance: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
.govuk-input[type="number"] {
|
38
|
+
-moz-appearance: textfield;
|
39
|
+
}
|
40
|
+
|
41
|
+
.govuk-input--error {
|
42
|
+
border: $govuk-border-width-form-element-error solid $govuk-error-colour;
|
43
|
+
}
|
44
|
+
|
45
|
+
// The ex measurements are based on the number of W's that can fit inside the input
|
46
|
+
// Extra space is left on the right hand side to allow for the Safari prefill icon
|
47
|
+
// Linear regression estimation based on visual tests: y = 1.76 + 1.81x
|
48
|
+
|
49
|
+
.govuk-input--width-30 {
|
50
|
+
max-width: 56ex + 3ex;
|
51
|
+
}
|
52
|
+
|
53
|
+
.govuk-input--width-20 {
|
54
|
+
max-width: 38ex + 3ex;
|
55
|
+
}
|
56
|
+
|
57
|
+
.govuk-input--width-10 {
|
58
|
+
max-width: 20ex + 3ex;
|
59
|
+
}
|
60
|
+
|
61
|
+
.govuk-input--width-5 {
|
62
|
+
max-width: 10.8ex;
|
63
|
+
}
|
64
|
+
|
65
|
+
.govuk-input--width-4 {
|
66
|
+
max-width: 9ex;
|
67
|
+
}
|
68
|
+
|
69
|
+
.govuk-input--width-3 {
|
70
|
+
max-width: 7.2ex;
|
71
|
+
}
|
72
|
+
|
73
|
+
.govuk-input--width-2 {
|
74
|
+
max-width: 5.4ex;
|
75
|
+
}
|
76
|
+
|
77
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@include govuk-exports("govuk/component/inset-text") {
|
6
|
+
.govuk-inset-text {
|
7
|
+
@include govuk-font($size: 19);
|
8
|
+
@include govuk-text-colour;
|
9
|
+
padding: govuk-spacing(3);
|
10
|
+
// Margin top intended to collapse
|
11
|
+
// This adds an additional 10px to the paragraph above
|
12
|
+
@include govuk-responsive-margin(6, "top");
|
13
|
+
@include govuk-responsive-margin(6, "bottom");
|
14
|
+
|
15
|
+
clear: both;
|
16
|
+
|
17
|
+
border-left: $govuk-border-width-wide solid $govuk-border-colour;
|
18
|
+
|
19
|
+
> :first-child {
|
20
|
+
margin-top: 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
> :only-child,
|
24
|
+
> :last-child {
|
25
|
+
margin-bottom: 0;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@include govuk-exports("govuk/component/label") {
|
6
|
+
.govuk-label {
|
7
|
+
@include govuk-font($size: 19);
|
8
|
+
@include govuk-text-colour;
|
9
|
+
|
10
|
+
display: block;
|
11
|
+
|
12
|
+
margin-bottom: govuk-spacing(1);
|
13
|
+
}
|
14
|
+
|
15
|
+
// Modifiers that make labels look more like their equivalent headings
|
16
|
+
|
17
|
+
.govuk-label--xl {
|
18
|
+
@include govuk-font($size: 48, $weight: bold);
|
19
|
+
margin-bottom: govuk-spacing(3);
|
20
|
+
}
|
21
|
+
|
22
|
+
.govuk-label--l {
|
23
|
+
@include govuk-font($size: 36, $weight: bold);
|
24
|
+
margin-bottom: govuk-spacing(3);
|
25
|
+
}
|
26
|
+
|
27
|
+
.govuk-label--m {
|
28
|
+
@include govuk-font($size: 24, $weight: bold);
|
29
|
+
margin-bottom: govuk-spacing(2);
|
30
|
+
}
|
31
|
+
|
32
|
+
.govuk-label--s {
|
33
|
+
@include govuk-font($size: 19, $weight: bold);
|
34
|
+
}
|
35
|
+
|
36
|
+
// When the label is nested inside a heading, override the heading so that it
|
37
|
+
// does not have a margin. Effectively we want to be able to treat the heading
|
38
|
+
// as if it is not there.
|
39
|
+
//
|
40
|
+
// This breaks BEM conventions because it exists as a parent of the 'block',
|
41
|
+
// so we can't really consider an element.
|
42
|
+
.govuk-label-wrapper {
|
43
|
+
margin: 0;
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@include govuk-exports("govuk/component/panel") {
|
6
|
+
|
7
|
+
.govuk-panel {
|
8
|
+
@include govuk-font($size: 19);
|
9
|
+
|
10
|
+
box-sizing: border-box;
|
11
|
+
|
12
|
+
margin-bottom: govuk-spacing(3);
|
13
|
+
padding: govuk-spacing(7) - $govuk-border-width;
|
14
|
+
|
15
|
+
border: $govuk-border-width solid transparent;
|
16
|
+
|
17
|
+
text-align: center;
|
18
|
+
|
19
|
+
@include govuk-media-query($until: tablet) {
|
20
|
+
padding: govuk-spacing(6) - $govuk-border-width;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.govuk-panel--confirmation {
|
25
|
+
color: govuk-colour("white");
|
26
|
+
background: govuk-colour("turquoise");
|
27
|
+
}
|
28
|
+
|
29
|
+
.govuk-panel__title {
|
30
|
+
margin-top: 0;
|
31
|
+
margin-bottom: govuk-spacing(6);
|
32
|
+
|
33
|
+
@include govuk-font($size: 48, $weight: bold);
|
34
|
+
}
|
35
|
+
|
36
|
+
.govuk-panel__title:last-child {
|
37
|
+
margin-bottom: 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
.govuk-panel__body {
|
41
|
+
@include govuk-font($size: 36);
|
42
|
+
}
|
43
|
+
|
44
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
@import "../../settings/all";
|
2
|
+
@import "../../tools/all";
|
3
|
+
@import "../../helpers/all";
|
4
|
+
|
5
|
+
@import "../tag/tag";
|
6
|
+
|
7
|
+
@include govuk-exports("govuk/component/phase-banner") {
|
8
|
+
.govuk-phase-banner {
|
9
|
+
padding-top: govuk-spacing(2);
|
10
|
+
padding-bottom: govuk-spacing(2);
|
11
|
+
|
12
|
+
border-bottom: 1px solid $govuk-border-colour;
|
13
|
+
}
|
14
|
+
|
15
|
+
.govuk-phase-banner__content {
|
16
|
+
@include govuk-font($size: 16);
|
17
|
+
@include govuk-text-colour;
|
18
|
+
|
19
|
+
display: table;
|
20
|
+
margin: 0;
|
21
|
+
}
|
22
|
+
|
23
|
+
.govuk-phase-banner__content__tag {
|
24
|
+
margin-right: govuk-spacing(2);
|
25
|
+
}
|
26
|
+
|
27
|
+
.govuk-phase-banner__text {
|
28
|
+
display: table-cell;
|
29
|
+
vertical-align: baseline;
|
30
|
+
}
|
31
|
+
}
|