digital_nsw_template 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3 -0
- data/assets/images/logo-white.svg +89 -0
- data/assets/images/nsw-logo.png +0 -0
- data/assets/stylesheets/digital_nsw_template/_bootstrap_variables.scss +5 -0
- data/assets/stylesheets/digital_nsw_template/_variables.scss +17 -0
- data/assets/stylesheets/digital_nsw_template/layout/alerts.scss +40 -0
- data/assets/stylesheets/digital_nsw_template/layout/article.scss +5 -0
- data/assets/stylesheets/digital_nsw_template/layout/base.scss +16 -0
- data/assets/stylesheets/digital_nsw_template/layout/errors.scss +32 -0
- data/assets/stylesheets/digital_nsw_template/layout/footer.scss +131 -0
- data/assets/stylesheets/digital_nsw_template/layout/forms.scss +385 -0
- data/assets/stylesheets/digital_nsw_template/layout/grid.scss +33 -0
- data/assets/stylesheets/digital_nsw_template/layout/header.scss +107 -0
- data/assets/stylesheets/digital_nsw_template/layout/hidden.scss +8 -0
- data/assets/stylesheets/digital_nsw_template/layout/skip-link.scss +32 -0
- data/assets/stylesheets/digital_nsw_template/layout/typography.scss +37 -0
- data/assets/stylesheets/digital_nsw_template/patterns/breadcrumbs.scss +26 -0
- data/assets/stylesheets/digital_nsw_template/patterns/buttons.scss +90 -0
- data/assets/stylesheets/digital_nsw_template/patterns/check-answers.scss +31 -0
- data/assets/stylesheets/digital_nsw_template/patterns/confirmation.scss +36 -0
- data/assets/stylesheets/digital_nsw_template/patterns/logo.scss +44 -0
- data/assets/stylesheets/digital_nsw_template.scss +22 -0
- data/digital_nsw_template.gemspec +17 -0
- data/lib/digital_nsw_template/engine.rb +13 -0
- data/lib/digital_nsw_template/version.rb +3 -0
- data/lib/digital_nsw_template.rb +64 -0
- metadata +110 -0
@@ -0,0 +1,385 @@
|
|
1
|
+
label {
|
2
|
+
font-weight: 700;
|
3
|
+
margin-bottom: 0;
|
4
|
+
}
|
5
|
+
|
6
|
+
label ~ .form-control {
|
7
|
+
margin-top: .5rem;
|
8
|
+
}
|
9
|
+
|
10
|
+
fieldset {
|
11
|
+
margin: 1.5em 0;
|
12
|
+
padding-bottom: 1em;
|
13
|
+
border-bottom: 1px solid $grey-2a;
|
14
|
+
|
15
|
+
&:last-of-type {
|
16
|
+
border-bottom: none;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
small.form-text {
|
21
|
+
font-size: 100%;
|
22
|
+
line-height: 1.3;
|
23
|
+
margin: 0 0 0.6rem;
|
24
|
+
}
|
25
|
+
.form-group.radio_buttons, .multiple-choice-group {
|
26
|
+
> small.form-text {
|
27
|
+
margin-bottom: 1.5rem;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
legend, .multiple-choice-group .form-group > label {
|
32
|
+
font-size: 1.1rem;
|
33
|
+
font-weight: 700;
|
34
|
+
margin-bottom: 1.3rem;
|
35
|
+
}
|
36
|
+
legend.with-label {
|
37
|
+
margin-bottom: 0rem;
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
.multiple-choice-group .additional-fields {
|
42
|
+
border-left: 10px solid $grey-2;
|
43
|
+
margin: 1.5rem 0;
|
44
|
+
padding: .5rem 1rem;
|
45
|
+
|
46
|
+
.form-group > label {
|
47
|
+
margin-bottom: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
fieldset:first-of-type {
|
51
|
+
margin-top: 0;
|
52
|
+
padding-top: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
fieldset:last-of-type {
|
56
|
+
margin-bottom: 0;
|
57
|
+
padding-bottom: 0;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
.form-check {
|
62
|
+
padding-bottom: 1rem;
|
63
|
+
|
64
|
+
small {
|
65
|
+
margin: 0;
|
66
|
+
padding-left: 1.6rem;
|
67
|
+
}
|
68
|
+
|
69
|
+
label small {
|
70
|
+
padding-left: 0;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
.expanding-list {
|
75
|
+
ol {
|
76
|
+
padding-left: 0;
|
77
|
+
margin-top: 0.75rem;
|
78
|
+
|
79
|
+
li {
|
80
|
+
list-style: none;
|
81
|
+
}
|
82
|
+
li.removed {
|
83
|
+
opacity: 0.8;
|
84
|
+
color: #666;
|
85
|
+
|
86
|
+
label {
|
87
|
+
text-decoration: line-through;
|
88
|
+
}
|
89
|
+
|
90
|
+
input {
|
91
|
+
text-decoration: line-through;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
.delete-action a {
|
97
|
+
margin-top: 1rem;
|
98
|
+
}
|
99
|
+
|
100
|
+
&.with-inline-labels {
|
101
|
+
input[type=text] {
|
102
|
+
padding-left: 2.2rem;
|
103
|
+
}
|
104
|
+
|
105
|
+
li {
|
106
|
+
@include make-row();
|
107
|
+
}
|
108
|
+
|
109
|
+
.form-group {
|
110
|
+
@include make-col-ready();
|
111
|
+
|
112
|
+
@include media-breakpoint-up(md) {
|
113
|
+
@include make-col(8);
|
114
|
+
}
|
115
|
+
|
116
|
+
margin-top: 0.4rem;
|
117
|
+
margin-bottom: 0.4rem;
|
118
|
+
}
|
119
|
+
|
120
|
+
.form-group label {
|
121
|
+
position: absolute;
|
122
|
+
padding: 0.46rem 0 0 0.8rem;
|
123
|
+
z-index: 1;
|
124
|
+
font-size: 16px;
|
125
|
+
|
126
|
+
& + .form-control {
|
127
|
+
margin-top: 0;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
li.removed .previous-value {
|
132
|
+
padding: 0.46rem 0 0 2.3rem;
|
133
|
+
}
|
134
|
+
|
135
|
+
.delete-action {
|
136
|
+
@include make-col-ready();
|
137
|
+
|
138
|
+
@include media-breakpoint-up(md) {
|
139
|
+
@include make-col(3);
|
140
|
+
}
|
141
|
+
|
142
|
+
a {
|
143
|
+
display: inline-block;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
&.with-nested-blocks {
|
149
|
+
li {
|
150
|
+
border-left: 10px solid $grey-2;
|
151
|
+
margin: 1.5rem 0;
|
152
|
+
padding: 0 1rem;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
/* Buttons */
|
158
|
+
|
159
|
+
form .actions {
|
160
|
+
padding-top: 1rem;
|
161
|
+
|
162
|
+
&:first-of-type {
|
163
|
+
border-top: 1px solid $grey-2a;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
|
167
|
+
/* Text boxes */
|
168
|
+
|
169
|
+
textarea, input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=url], select {
|
170
|
+
&.form-control {
|
171
|
+
border-radius: 0px;
|
172
|
+
border: 2px solid $black;
|
173
|
+
|
174
|
+
&:focus {
|
175
|
+
box-shadow: none !important;
|
176
|
+
border-color: $black;
|
177
|
+
outline: 3px solid $focus-colour;
|
178
|
+
outline-offset: 0;
|
179
|
+
}
|
180
|
+
|
181
|
+
&.is-invalid {
|
182
|
+
border-color: $red;
|
183
|
+
border-width: 3px;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
}
|
187
|
+
|
188
|
+
/* Checkboxes */
|
189
|
+
|
190
|
+
input[type=checkbox], input[type=radio] {
|
191
|
+
position: absolute;
|
192
|
+
cursor: pointer;
|
193
|
+
left: 0;
|
194
|
+
top: 0;
|
195
|
+
width: 38px;
|
196
|
+
height: 38px;
|
197
|
+
z-index: 1;
|
198
|
+
margin: 0;
|
199
|
+
zoom: 1;
|
200
|
+
filter: alpha(opacity=0);
|
201
|
+
opacity: 0;
|
202
|
+
|
203
|
+
&:focus {
|
204
|
+
outline: 3px solid $focus-colour;
|
205
|
+
outline-offset: 0;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
input[type=checkbox] + label, input[type=radio] + label {
|
209
|
+
padding: 6px 10px 0 25px;
|
210
|
+
font-weight: normal;
|
211
|
+
margin-bottom: 0;
|
212
|
+
}
|
213
|
+
input[type=checkbox]:checked + label, input[type=radio]:checked + label{
|
214
|
+
font-weight: 700;
|
215
|
+
|
216
|
+
strong {
|
217
|
+
font-weight: 700;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
input[type=checkbox]:focus + label::before, input[type=radio]:focus + label::before {
|
221
|
+
box-shadow: 0 0 0 4px $focus-colour;
|
222
|
+
}
|
223
|
+
|
224
|
+
input[type=checkbox] + label::before {
|
225
|
+
content: "";
|
226
|
+
border: 2px solid;
|
227
|
+
background: transparent;
|
228
|
+
width: 34px;
|
229
|
+
height: 34px;
|
230
|
+
position: absolute;
|
231
|
+
top: 0;
|
232
|
+
left: 0;
|
233
|
+
}
|
234
|
+
input[type=checkbox] + label::after {
|
235
|
+
content: "";
|
236
|
+
border: solid;
|
237
|
+
border-width: 0 0 4px 4px;
|
238
|
+
background: transparent;
|
239
|
+
border-top-color: transparent;
|
240
|
+
width: 19px;
|
241
|
+
height: 10px;
|
242
|
+
position: absolute;
|
243
|
+
top: 10px;
|
244
|
+
left: 8px;
|
245
|
+
-moz-transform: rotate(-45deg);
|
246
|
+
-o-transform: rotate(-45deg);
|
247
|
+
-webkit-transform: rotate(-45deg);
|
248
|
+
-ms-transform: rotate(-45deg);
|
249
|
+
transform: rotate(-45deg);
|
250
|
+
zoom: 1;
|
251
|
+
filter: alpha(opacity=0);
|
252
|
+
opacity: 0;
|
253
|
+
}
|
254
|
+
input[type=checkbox]:checked + label::after {
|
255
|
+
zoom: 1;
|
256
|
+
filter: alpha(opacity=100);
|
257
|
+
opacity: 1;
|
258
|
+
font-weight: 500;
|
259
|
+
}
|
260
|
+
|
261
|
+
.form-check-input.is-invalid ~ .form-check-label {
|
262
|
+
color: $black;
|
263
|
+
|
264
|
+
&::before {
|
265
|
+
border-color: $black;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
.form-check-input.is-invalid ~ .invalid-feedback {
|
269
|
+
padding-left: 1.6rem;
|
270
|
+
}
|
271
|
+
.form-check-input:disabled ~ .form-check-label {
|
272
|
+
&::before {
|
273
|
+
border-color: $grey-2;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
/* Radio buttons */
|
278
|
+
|
279
|
+
input[type=radio] + label::before {
|
280
|
+
content: "";
|
281
|
+
border: 2px solid;
|
282
|
+
background: transparent;
|
283
|
+
width: 34px;
|
284
|
+
height: 34px;
|
285
|
+
position: absolute;
|
286
|
+
top: 0;
|
287
|
+
left: 0;
|
288
|
+
-webkit-border-radius: 50%;
|
289
|
+
-moz-border-radius: 50%;
|
290
|
+
border-radius: 50%;
|
291
|
+
}
|
292
|
+
|
293
|
+
input[type=radio] + label::after {
|
294
|
+
content: "";
|
295
|
+
border: 10px solid;
|
296
|
+
width: 0;
|
297
|
+
height: 0;
|
298
|
+
position: absolute;
|
299
|
+
top: 7px;
|
300
|
+
left: 7px;
|
301
|
+
-webkit-border-radius: 50%;
|
302
|
+
-moz-border-radius: 50%;
|
303
|
+
border-radius: 50%;
|
304
|
+
zoom: 1;
|
305
|
+
filter: alpha(opacity=0);
|
306
|
+
opacity: 0;
|
307
|
+
}
|
308
|
+
input[type=radio]:checked + label::after {
|
309
|
+
zoom: 1;
|
310
|
+
filter: alpha(opacity=100);
|
311
|
+
opacity: 1;
|
312
|
+
}
|
313
|
+
|
314
|
+
// Inline date fields
|
315
|
+
|
316
|
+
.date-field {
|
317
|
+
padding-top: .5rem;
|
318
|
+
|
319
|
+
.form-group {
|
320
|
+
display: inline-block;
|
321
|
+
padding-right: 1em;
|
322
|
+
margin-bottom: .5rem;
|
323
|
+
}
|
324
|
+
legend {
|
325
|
+
margin-bottom: 0;
|
326
|
+
}
|
327
|
+
|
328
|
+
label {
|
329
|
+
display: block;
|
330
|
+
margin-bottom: .2rem;
|
331
|
+
font-weight: normal;
|
332
|
+
|
333
|
+
&.primary-label {
|
334
|
+
width: 100%;
|
335
|
+
font-weight: 700;
|
336
|
+
margin-bottom: .3rem;
|
337
|
+
}
|
338
|
+
}
|
339
|
+
.day, .month {
|
340
|
+
width: 3em;
|
341
|
+
}
|
342
|
+
.year {
|
343
|
+
width: 5em;
|
344
|
+
}
|
345
|
+
|
346
|
+
&.form-group-invalid {
|
347
|
+
input[type=text] {
|
348
|
+
border-color: $red;
|
349
|
+
border-width: 3px;
|
350
|
+
}
|
351
|
+
}
|
352
|
+
}
|
353
|
+
|
354
|
+
// Custom file input
|
355
|
+
|
356
|
+
input[type=file]:focus, input[type=file]:focus + .custom-file-label {
|
357
|
+
outline: 3px solid $focus-colour;
|
358
|
+
outline-offset: 0;
|
359
|
+
}
|
360
|
+
|
361
|
+
.custom-file-label {
|
362
|
+
color: #888;
|
363
|
+
}
|
364
|
+
|
365
|
+
.custom-file-input.with-attached-file + .custom-file-label {
|
366
|
+
color: #000;
|
367
|
+
}
|
368
|
+
|
369
|
+
// Word count
|
370
|
+
|
371
|
+
*[data-module=max-word-count] .form-group {
|
372
|
+
overflow: auto;
|
373
|
+
}
|
374
|
+
|
375
|
+
.word-count-label {
|
376
|
+
display: block;
|
377
|
+
padding: .6rem .3rem 0 3rem;
|
378
|
+
|
379
|
+
float: right;
|
380
|
+
text-align: right;
|
381
|
+
|
382
|
+
&.invalid {
|
383
|
+
color: $red;
|
384
|
+
}
|
385
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
@mixin one-third($inside-row: false) {
|
2
|
+
@if $inside-row == true {
|
3
|
+
@include make-col-ready;
|
4
|
+
}
|
5
|
+
|
6
|
+
@include media-breakpoint-up(lg) {
|
7
|
+
@include make-col(4);
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
@mixin two-thirds($inside-row: false) {
|
12
|
+
@if $inside-row == true {
|
13
|
+
@include make-col-ready;
|
14
|
+
}
|
15
|
+
|
16
|
+
@include media-breakpoint-up(lg) {
|
17
|
+
@include make-col(8);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
.one-third {
|
22
|
+
@include one-third;
|
23
|
+
}
|
24
|
+
.one-third-inside-row {
|
25
|
+
@include one-third($inside-row: true);
|
26
|
+
}
|
27
|
+
|
28
|
+
.two-thirds {
|
29
|
+
@include two-thirds;
|
30
|
+
}
|
31
|
+
.two-thirds-inside-row {
|
32
|
+
@include two-thirds($inside-row: true);
|
33
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
header.global {
|
2
|
+
background: $dark-blue;
|
3
|
+
color: #fff;
|
4
|
+
|
5
|
+
@include media-breakpoint-up(md) {
|
6
|
+
height: 100px;
|
7
|
+
}
|
8
|
+
|
9
|
+
h1 {
|
10
|
+
@include make-col-ready();
|
11
|
+
|
12
|
+
@include media-breakpoint-up(sm) {
|
13
|
+
@include make-col(5);
|
14
|
+
}
|
15
|
+
|
16
|
+
@include logo;
|
17
|
+
|
18
|
+
font-size: 1.4rem;
|
19
|
+
margin-bottom: 0;
|
20
|
+
|
21
|
+
/* TODO: Update this in the future to be consistent with email logo */
|
22
|
+
|
23
|
+
.logo-container {
|
24
|
+
height: 2.85em;
|
25
|
+
width: auto;
|
26
|
+
padding: .35em;
|
27
|
+
}
|
28
|
+
|
29
|
+
span.logo {
|
30
|
+
height: 2.14em;
|
31
|
+
width: 2em;
|
32
|
+
}
|
33
|
+
span.site-title {
|
34
|
+
margin-top: 1.25em;
|
35
|
+
margin-left: .8em;
|
36
|
+
}
|
37
|
+
|
38
|
+
@include media-breakpoint-up(md) {
|
39
|
+
font-size: 2.2rem;
|
40
|
+
|
41
|
+
span.site-title {
|
42
|
+
font-size: 1.8rem;
|
43
|
+
margin-top: 3.2rem;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
aside {
|
49
|
+
@include make-col-ready();
|
50
|
+
|
51
|
+
font-size: .9rem;
|
52
|
+
background: $light-purple;
|
53
|
+
border-bottom: 1px solid darken($light-purple, 5%);
|
54
|
+
color: $black;
|
55
|
+
padding: .5rem 1rem;
|
56
|
+
|
57
|
+
@include media-breakpoint-up(sm) {
|
58
|
+
@include make-col(7);
|
59
|
+
|
60
|
+
background: transparent;
|
61
|
+
border-bottom: none;
|
62
|
+
color: $white;
|
63
|
+
text-align: right;
|
64
|
+
font-size: .8rem;
|
65
|
+
margin-top: 1rem;
|
66
|
+
padding: 0 15px;
|
67
|
+
|
68
|
+
a {
|
69
|
+
color: $white;
|
70
|
+
text-decoration: none;
|
71
|
+
font-weight: bold;
|
72
|
+
|
73
|
+
&:focus {
|
74
|
+
color: $black;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
@include media-breakpoint-up(md) {
|
80
|
+
font-size: 1rem;
|
81
|
+
margin-top: 1.9rem;
|
82
|
+
}
|
83
|
+
|
84
|
+
p.signed-in-user {
|
85
|
+
display: block;
|
86
|
+
font-size: 1em;
|
87
|
+
margin-bottom: 0;
|
88
|
+
font-weight: 500;
|
89
|
+
}
|
90
|
+
ul {
|
91
|
+
padding-left: 0;
|
92
|
+
display: inline-block;
|
93
|
+
font-weight: 400;
|
94
|
+
margin-bottom: 0;
|
95
|
+
}
|
96
|
+
li {
|
97
|
+
display: inline-block;
|
98
|
+
list-style: none;
|
99
|
+
padding-right: 1em;
|
100
|
+
|
101
|
+
@include media-breakpoint-up(sm) {
|
102
|
+
padding-left: 1em;
|
103
|
+
padding-right: 0;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/*
|
2
|
+
The styling for the skip link is based on the GOV.UK Template:
|
3
|
+
https://github.com/alphagov/govuk_template/blob/master/source/assets/stylesheets/_accessibility.scss
|
4
|
+
*/
|
5
|
+
|
6
|
+
#skip-link-container {
|
7
|
+
text-align: center;
|
8
|
+
background: $dark-blue;
|
9
|
+
|
10
|
+
div {
|
11
|
+
text-align: left;
|
12
|
+
margin: 0 auto;
|
13
|
+
max-width: 1020px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.skip-link {
|
17
|
+
display: inline-block;
|
18
|
+
margin: 0.75em 0 0 30px;
|
19
|
+
position: absolute;
|
20
|
+
left: -9999em;
|
21
|
+
|
22
|
+
&:focus,
|
23
|
+
&:visited {
|
24
|
+
color: $black;
|
25
|
+
}
|
26
|
+
|
27
|
+
&:focus {
|
28
|
+
left: 0;
|
29
|
+
z-index: 1;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
body {
|
2
|
+
font-size: 17px;
|
3
|
+
}
|
4
|
+
|
5
|
+
h1, h2, h3, h4 {
|
6
|
+
font-weight: 700;
|
7
|
+
margin-bottom: 0.8em;
|
8
|
+
}
|
9
|
+
|
10
|
+
h1 {
|
11
|
+
font-size: 2rem;
|
12
|
+
}
|
13
|
+
|
14
|
+
h2 {
|
15
|
+
font-size: 1.6rem;
|
16
|
+
}
|
17
|
+
|
18
|
+
h3 {
|
19
|
+
font-size: 1.2rem;
|
20
|
+
}
|
21
|
+
|
22
|
+
a {
|
23
|
+
color: $dark-blue;
|
24
|
+
text-decoration: underline;
|
25
|
+
|
26
|
+
&:hover {
|
27
|
+
color: darken($dark-blue, 10%);
|
28
|
+
}
|
29
|
+
|
30
|
+
&:focus {
|
31
|
+
background-color: $focus-colour;
|
32
|
+
outline: 3px solid $focus-colour;
|
33
|
+
}
|
34
|
+
&:link:focus {
|
35
|
+
color: $black;
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
nav.breadcrumbs {
|
2
|
+
ol {
|
3
|
+
padding: 0;
|
4
|
+
margin-top: 1rem;
|
5
|
+
margin-bottom: 1rem;
|
6
|
+
font-size: 0.9rem;
|
7
|
+
|
8
|
+
li {
|
9
|
+
display: inline-block;
|
10
|
+
list-style: none;
|
11
|
+
|
12
|
+
&:not(:last-of-type)::after {
|
13
|
+
content: ">";
|
14
|
+
|
15
|
+
color: #888;
|
16
|
+
font-size: 1.3rem;
|
17
|
+
font-weight: 100;
|
18
|
+
|
19
|
+
vertical-align: middle;
|
20
|
+
display: inline-block;
|
21
|
+
margin-top: -.3rem;
|
22
|
+
padding: 0 0.1rem 0 .5rem;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
@mixin base-button {
|
2
|
+
border-radius: 0px;
|
3
|
+
border: none;
|
4
|
+
display: block;
|
5
|
+
color: $white;
|
6
|
+
font-size: 1.2rem;
|
7
|
+
font-weight: 600;
|
8
|
+
padding: 0.4em 1.2em;
|
9
|
+
text-align: center;
|
10
|
+
text-decoration: none;
|
11
|
+
transition: none;
|
12
|
+
user-select: none;
|
13
|
+
vertical-align: middle;
|
14
|
+
white-space: nowrap;
|
15
|
+
width: 100%;
|
16
|
+
|
17
|
+
@include media-breakpoint-up(md) {
|
18
|
+
display: inline-block;
|
19
|
+
width: auto;
|
20
|
+
}
|
21
|
+
|
22
|
+
&:focus {
|
23
|
+
outline: 3px solid $focus-colour;
|
24
|
+
color: $white;
|
25
|
+
}
|
26
|
+
|
27
|
+
&.disabled,
|
28
|
+
&:disabled {
|
29
|
+
opacity: $btn-disabled-opacity;
|
30
|
+
@include box-shadow(none);
|
31
|
+
}
|
32
|
+
|
33
|
+
&:not(:disabled):not(.disabled) {
|
34
|
+
cursor: pointer;
|
35
|
+
}
|
36
|
+
|
37
|
+
&:not(:disabled):not(.disabled):active,
|
38
|
+
&:not(:disabled):not(.disabled).active {
|
39
|
+
background-image: none;
|
40
|
+
@include box-shadow($btn-active-box-shadow);
|
41
|
+
|
42
|
+
&:focus {
|
43
|
+
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
@mixin button-block {
|
49
|
+
@include media-breakpoint-up(md) {
|
50
|
+
display: block;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
@mixin button-primary {
|
55
|
+
@include base-button;
|
56
|
+
|
57
|
+
background: $light-blue;
|
58
|
+
|
59
|
+
&:hover, &:focus {
|
60
|
+
background: darken($light-blue, 15%);
|
61
|
+
border-bottom-color: darken($light-blue, 20%);
|
62
|
+
}
|
63
|
+
|
64
|
+
border-bottom: 4px solid darken($light-blue, 8%);
|
65
|
+
}
|
66
|
+
|
67
|
+
@mixin button-danger {
|
68
|
+
@include base-button;
|
69
|
+
|
70
|
+
background: $red;
|
71
|
+
|
72
|
+
&:hover, &:focus {
|
73
|
+
background: darken($red, 15%);
|
74
|
+
border-bottom-color: darken($red, 20%);
|
75
|
+
}
|
76
|
+
|
77
|
+
border-bottom: 4px solid darken($red, 8%);
|
78
|
+
}
|
79
|
+
|
80
|
+
@mixin button {
|
81
|
+
@include button-primary;
|
82
|
+
}
|
83
|
+
|
84
|
+
.btn, a.btn:link, a.button, a.button:link, button, input[type=submit], .button, .btn-primary, .btn-secondary {
|
85
|
+
@include button-primary;
|
86
|
+
}
|
87
|
+
|
88
|
+
.btn-danger {
|
89
|
+
@include button-danger;
|
90
|
+
}
|