-
Notifications
You must be signed in to change notification settings - Fork 3
/
application.scss
292 lines (238 loc) · 5.57 KB
/
application.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
// GOV.UK-specific variables
$govuk-global-styles: true;
$govuk-page-width: 1100px;
$govuk-new-link-styles: true;
$govuk-font-family: Helvetica, Arial, sans-serif;
$govuk-blue: #1d70b8;
// App-specific variables
$app-light-grey: #f8f8f8;
$app-code-color: #d13118;
// DWP colour palette
$dwp-brand-colour: #513184;
$app-purple: $dwp-brand-colour;
$app-light-purple: #7c57cc;
$app-mid-purple: #38206b;
$app-dark-purple: #1c1037;
// Overrides
$govuk-link-colour: $app-purple;
$govuk-link-hover-colour: $app-dark-purple;
$govuk-link-visited-colour: $app-light-purple;
@import "node_modules/govuk-frontend/govuk/all";
@import "node_modules/@dwp/dwp-frontend/components/timeline/timeline";
@import "node_modules/@dwp/dwp-frontend/components/internal-services-header/internal-services-header";
@import "node_modules/@dwp/dwp-frontend/components/key-details-bar/key-details-bar";
@import "layout";
@import "contact-panel";
@import "back-to-top";
@import "app-pane";
@import "app-phase-banner";
@import "header";
@import "navigation";
@import "masthead";
@import "highlight";
@import "tabs";
@import "mobile-navigation";
@import "sub-navigation";
@import "example";
@import "cookie-banner";
@import "timeout-warning";
@import "toggle-to-welsh";
.govuk-skip-link {
text-decoration: underline !important;
}
// Override utilities
.dwp-\!-background-grey {
background-color: $app-light-grey !important;
}
.dwp-\!-background-dark-grey {
background-color: govuk-colour("dark-grey") !important;
}
.dwp-\!-color-white {
color: white !important;
}
.dwp-\!-list-inline {
display: inline-block !important;
}
.dwp-\!-no-bullet {
list-style: none !important;
}
// Custom widths
.govuk-grid-column-one-third-from-mobile {
@include govuk-grid-column(one-third, $at: mobile);
}
.govuk-grid-column-two-thirds-from-mobile {
@include govuk-grid-column(two-thirds, $at: mobile);
}
// App utility classes
.js-enabled .app-js-hidden {
display: none;
}
// We don't change the global width container width so that examples are the current width.
.app-width-container {
@include govuk-width-container(1100px);
}
.app-content {
padding: govuk-spacing(3) govuk-spacing(0) govuk-spacing(4);
@include govuk-media-query($from: tablet) {
padding: govuk-spacing(6);
padding-right: 0;
padding-bottom: govuk-spacing(8);
}
h1 {
max-width: 15em;
}
h2 {
max-width: 20em;
}
h3 {
max-width: 30em;
}
h4,
h5,
h6,
p,
ul:not(.app-tabs__list),
ol,
img,
video,
.app-table--constrained {
max-width: 38em;
}
.app-video__player,
img {
box-sizing: border-box;
width: 100%;
max-width: 722px;
height: auto;
@include govuk-responsive-margin(2, "top");
border: 1px solid $govuk-border-colour;
}
img {
padding: govuk-spacing(2);
@include govuk-responsive-margin(6, "bottom");
}
.app-video__player {
@include govuk-responsive-margin(2, "bottom");
}
.app-video__player:focus {
border-color: $govuk-focus-text-colour;
outline: $govuk-focus-width solid $govuk-focus-text-colour;
box-shadow: 0 0 0 ($govuk-focus-width * 2) $govuk-focus-colour;
}
.app-video__description {
@include govuk-responsive-margin(6, "bottom");
}
// IE8 does not support the video element, so we hide the element entirely.
@if $govuk-is-ie8 == true {
.app-video {
display: none;
}
}
// Fix monospace font size when used with relative typography
//
// Browsers automatically reduce monospace font size
//
// [1] restores the normal text size in Mozilla Firefox, Google Chrome,
// and Safari; this unusual style rule should also be used anywhere where
// you would otherwise set the font-family property to ‘monospace’.
// [2] restores the normal text size in Internet Explorer and Opera.
//
// source:
// http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/
code {
font-family: monospace, monospace; // [1]
font-size: 1em; // [2]
}
}
.app-example-page {
padding: govuk-spacing(5);
}
.app-example__component {
padding: 30px;
background: govuk-colour("white");
p {
max-width: initial;
}
}
.no-js {
// Adjustments in app-pane layout as it has toc below
.app-pane__content .app-content {
@include govuk-media-query($until: tablet) {
padding-bottom: 10px;
}
}
}
// Add styling for inline code
li code,
td code,
p code {
padding: 0 govuk-spacing(1);
color: $app-code-color;
background-color: govuk-colour("light-grey");
}
// NOTE: have removed .app-prose-scope wrapper
// rewove these conflicts and replace elements affected with class selectors
h1,
.govuk-heading-xl {
@extend %govuk-heading-xl;
}
h2,
.govuk-heading-l {
@extend %govuk-heading-l;
}
h3,
.govuk-heading-m {
@extend %govuk-heading-m;
}
h4,
.govuk-heading-s {
@extend %govuk-heading-s;
}
p {
@extend %govuk-body-m;
}
strong,
b {
@include govuk-typography-weight-bold;
}
footer ul {
@extend %govuk-list;
font-size: 16px;
}
ul,
ol {
@extend %govuk-list;
}
ol {
@extend %govuk-list--number;
}
ul {
@extend %govuk-list--bullet;
}
a {
@extend %govuk-link;
}
hr {
@extend %govuk-section-break;
@extend %govuk-section-break--visible;
@extend %govuk-section-break--xl;
}
pre + h2 {
padding-top: govuk-spacing(4);
}
pre + h3,
pre + h4 {
padding-top: govuk-spacing(2);
}
// Ensure that content at the bottom of the page does not have margins
// so that they line up with the back to top link.
> :last-child {
margin-bottom: 0;
}
pre {
margin: 0;
padding: 40px 20px 20px 20px;
overflow: auto;
font-size: 16px;
@include govuk-responsive-margin(4, "bottom");
}