@moreonion/foundist 2.0.7 → 2.1.2
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.
- package/README.md +1 -1
- package/package.json +6 -10
- package/src/html/basic-action-page-cover-1col.html +2 -2
- package/src/html/basic-action-page-cover-2col-reversed.html +2 -2
- package/src/html/basic-action-page-cover-2col.html +2 -2
- package/src/html/basic-action-page-cover-banner.html +2 -2
- package/src/html/basic-action-page-reversed.html +1 -1
- package/src/html/basic-action-page-with-banner-reversed.html +2 -2
- package/src/html/basic-action-page-with-banner.html +2 -2
- package/src/html/basic-action-page-with-callouts.html +1 -1
- package/src/html/basic-action-page.html +1 -1
- package/src/html/donation-action-page.html +1 -1
- package/src/html/e2t-action-page.html +1 -1
- package/src/html/includes/donate-form.html +2 -0
- package/src/html/includes/form-items/inline-radios.html +17 -0
- package/src/html/includes/form-items/payment-icons.html +19 -0
- package/src/html/includes/teaser.html +1 -1
- package/src/html/templates/action-page-cover-1col.html +2 -2
- package/src/html/templates/action-page-cover-2col-reversed.html +2 -2
- package/src/html/templates/action-page-cover-2col.html +2 -2
- package/src/html/templates/action-page-cover-banner.html +2 -2
- package/src/html/templates/action-page-reversed.html +2 -2
- package/src/html/templates/action-page-with-banner-reversed.html +2 -2
- package/src/html/templates/action-page-with-banner.html +2 -2
- package/src/html/templates/action-page.html +2 -2
- package/src/html/templates/static-page-cover-1col.html +2 -2
- package/src/html/templates/static-page-cover-2col.html +2 -2
- package/src/html/templates/static-page-cover-banner.html +2 -2
- package/src/html/templates/static-page-with-banner.html +2 -2
- package/src/html/templates/static-page.html +2 -2
- package/src/html/templates/teaser-page.html +2 -2
- package/src/html/thank-you-page-cover-1col.html +1 -1
- package/src/html/thank-you-page-cover-2col.html +1 -1
- package/src/html/thank-you-page-cover-banner.html +1 -1
- package/src/html/thank-you-page-with-banner.html +1 -1
- package/src/html/thank-you-page.html +1 -1
- package/src/html/typography-static-page.html +1 -1
- package/src/scss/_settings.scss +4 -1
- package/src/scss/_util.scss +4 -2
- package/src/scss/components/_accordion.scss +1 -1
- package/src/scss/components/_card.scss +3 -1
- package/src/scss/components/_cookiebar.scss +1 -1
- package/src/scss/components/_letter.scss +3 -1
- package/src/scss/components/_menu.scss +28 -28
- package/src/scss/components/_progressbar.scss +1 -1
- package/src/scss/components/_reveal.scss +5 -3
- package/src/scss/components/_settings.scss +12 -10
- package/src/scss/components/_share-button.scss +1 -1
- package/src/scss/components/_sticky-button.scss +4 -2
- package/src/scss/form/_braintree_apple_pay.scss +2 -0
- package/src/scss/form/_donation-amount-button.scss +7 -7
- package/src/scss/form/_e2t.scss +2 -0
- package/src/scss/form/_fields.scss +16 -1
- package/src/scss/form/_paymethod-select-button.scss +1 -4
- package/src/scss/form/_settings.scss +24 -17
- package/src/scss/layout/_cover.scss +9 -3
- package/src/scss/layout/_settings.scss +1 -1
- package/src/scss/main.scss +3 -0
- package/src/scss/typography/_elements.scss +1 -1
- package/src/scss/typography/_settings.scss +11 -4
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
// Custom overrides for the card component
|
|
4
4
|
|
|
5
|
+
@use "sass:math";
|
|
6
|
+
|
|
5
7
|
.card {
|
|
6
8
|
position: relative;
|
|
7
9
|
}
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
|
|
21
23
|
// Meld card-sections into each other.
|
|
22
24
|
.card-section + .card-section {
|
|
23
|
-
padding-top: max(0, $global-padding - get-side($card-padding, bottom));
|
|
25
|
+
padding-top: math.max(0, $global-padding - get-side($card-padding, bottom));
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
// Move footer to the bottom of the card.
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
// Adds a letter-like background to an element
|
|
4
4
|
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
|
|
5
7
|
$letter-background: $card-background !default;
|
|
6
8
|
$letter-padding: (2 * $global-padding) (1.25 * $global-padding) !default;
|
|
7
9
|
$letter-margin: 0 0 $global-margin 0 !default;
|
|
8
|
-
$letter-shadow-color: scale
|
|
10
|
+
$letter-shadow-color: color.scale(
|
|
9
11
|
get-background-color($letter-background),
|
|
10
12
|
$lightness: -60%,
|
|
11
13
|
$alpha: -60%
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
&:not(.simple) .button {
|
|
36
36
|
margin-left: get-side($menu-items-padding, left);
|
|
37
37
|
margin-right: get-side($menu-items-padding, right);
|
|
38
|
-
margin-top: $form-spacing
|
|
39
|
-
margin-bottom: $form-spacing
|
|
38
|
+
margin-top: $form-spacing * 0.5;
|
|
39
|
+
margin-bottom: $form-spacing * 0.5;
|
|
40
40
|
width: 100%;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -66,10 +66,10 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
66
66
|
@include breakpoint(small down) {
|
|
67
67
|
> li > a {
|
|
68
68
|
padding: {
|
|
69
|
-
top: get-side($dropdownmenu-padding, top)
|
|
70
|
-
right: get-side($dropdownmenu-padding, right)
|
|
71
|
-
bottom: get-side($dropdownmenu-padding, bottom)
|
|
72
|
-
left: get-side($dropdownmenu-padding, left)
|
|
69
|
+
top: get-side($dropdownmenu-padding, top) * 0.5;
|
|
70
|
+
right: get-side($dropdownmenu-padding, right) * 0.5;
|
|
71
|
+
bottom: get-side($dropdownmenu-padding, bottom) * 0.5;
|
|
72
|
+
left: get-side($dropdownmenu-padding, left) * 0.5;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -89,14 +89,14 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
89
89
|
a {
|
|
90
90
|
font-weight: $global-weight-normal;
|
|
91
91
|
text-decoration: none;
|
|
92
|
-
padding-top: rem-calc($base-line-height
|
|
93
|
-
padding-bottom: rem-calc($base-line-height
|
|
92
|
+
padding-top: rem-calc($base-line-height * 0.25);
|
|
93
|
+
padding-bottom: rem-calc($base-line-height * 0.25);
|
|
94
94
|
width: 100%;
|
|
95
95
|
|
|
96
96
|
@include breakpoint(small down) {
|
|
97
97
|
padding: {
|
|
98
|
-
right: get-side($dropdownmenu-padding, right)
|
|
99
|
-
left: get-side($dropdownmenu-padding, left)
|
|
98
|
+
right: get-side($dropdownmenu-padding, right) * 0.5;
|
|
99
|
+
left: get-side($dropdownmenu-padding, left) * 0.5;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -154,7 +154,7 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
154
154
|
|
|
155
155
|
&:after {
|
|
156
156
|
background-size: $dropdownmenu-arrow-size * 0.75;
|
|
157
|
-
#{$global-right}: get-side($dropdownmenu-padding, $global-right)
|
|
157
|
+
#{$global-right}: get-side($dropdownmenu-padding, $global-right) * 0.5;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -165,7 +165,7 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
165
165
|
#{$global-right}: get-side($dropdownmenu-padding, $global-right);
|
|
166
166
|
|
|
167
167
|
@include breakpoint(small down) {
|
|
168
|
-
#{$global-right}: get-side($dropdownmenu-padding, $global-right)
|
|
168
|
+
#{$global-right}: get-side($dropdownmenu-padding, $global-right) * 0.5;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
@@ -184,11 +184,11 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
@include breakpoint(small down) {
|
|
187
|
-
padding-#{$global-right}: get-side($dropdownmenu-padding, $global-right)
|
|
187
|
+
padding-#{$global-right}: get-side($dropdownmenu-padding, $global-right) * 0.5;
|
|
188
188
|
padding-left: $dropdownmenu-arrow-padding - get-side($dropdownmenu-padding, left);
|
|
189
189
|
|
|
190
190
|
&:after {
|
|
191
|
-
left: get-side($dropdownmenu-padding, left)
|
|
191
|
+
left: get-side($dropdownmenu-padding, left) * 0.5;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -207,11 +207,11 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
@include breakpoint(small down) {
|
|
210
|
-
padding-#{$global-right}: get-side($dropdownmenu-padding, $global-right)
|
|
210
|
+
padding-#{$global-right}: get-side($dropdownmenu-padding, $global-right) * 0.5;
|
|
211
211
|
padding-right: $dropdownmenu-arrow-padding - get-side($dropdownmenu-padding, right);
|
|
212
212
|
|
|
213
213
|
&:after {
|
|
214
|
-
right: get-side($dropdownmenu-padding, right)
|
|
214
|
+
right: get-side($dropdownmenu-padding, right) * 0.5;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -244,27 +244,27 @@ $dropdown-menu-parent-border-radius: $select-radius !default;
|
|
|
244
244
|
}
|
|
245
245
|
// Add a bit more space between items.
|
|
246
246
|
&:not(.vertical) {
|
|
247
|
-
margin-top: -$form-spacing
|
|
248
|
-
margin-bottom: -$form-spacing
|
|
247
|
+
margin-top: -$form-spacing * 0.5;
|
|
248
|
+
margin-bottom: -$form-spacing * 0.5;
|
|
249
249
|
> li {
|
|
250
|
-
margin-top: $form-spacing
|
|
251
|
-
margin-bottom: $form-spacing
|
|
250
|
+
margin-top: $form-spacing * 0.5;
|
|
251
|
+
margin-bottom: $form-spacing * 0.5;
|
|
252
252
|
}
|
|
253
253
|
> li.is-dropdown-submenu-parent {
|
|
254
|
-
margin-left: $form-spacing
|
|
255
|
-
margin-right: $form-spacing
|
|
254
|
+
margin-left: $form-spacing * 0.5;
|
|
255
|
+
margin-right: $form-spacing * 0.5;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
&.vertical {
|
|
259
|
-
margin-left: -$form-spacing
|
|
260
|
-
margin-right: -$form-spacing
|
|
259
|
+
margin-left: -$form-spacing * 0.5;
|
|
260
|
+
margin-right: -$form-spacing * 0.5;
|
|
261
261
|
> li {
|
|
262
|
-
margin-left: $form-spacing
|
|
263
|
-
margin-right: $form-spacing
|
|
262
|
+
margin-left: $form-spacing * 0.5;
|
|
263
|
+
margin-right: $form-spacing * 0.5;
|
|
264
264
|
}
|
|
265
265
|
> li.is-dropdown-submenu-parent {
|
|
266
|
-
margin-top: $form-spacing
|
|
267
|
-
margin-bottom: $form-spacing
|
|
266
|
+
margin-top: $form-spacing * 0.5;
|
|
267
|
+
margin-bottom: $form-spacing * 0.5;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
// Custom overrides for the reveal component.
|
|
4
4
|
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
|
|
5
7
|
.reveal {
|
|
6
8
|
@extend #form-outer;
|
|
7
9
|
overflow: visible;
|
|
@@ -41,9 +43,9 @@
|
|
|
41
43
|
// Make large close button smaller on small screens.
|
|
42
44
|
.close-button.large {
|
|
43
45
|
@include breakpoint(small down) {
|
|
44
|
-
font-size: map
|
|
45
|
-
top: $global-margin
|
|
46
|
-
#{$global-right}: $global-margin
|
|
46
|
+
font-size: map.get($closebutton-size, medium);
|
|
47
|
+
top: $global-margin * 0.125;
|
|
48
|
+
#{$global-right}: $global-margin * 0.125;
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Component settings
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
|
|
4
|
+
@use "sass:color";
|
|
5
|
+
|
|
4
6
|
// Card
|
|
5
7
|
$card-border: none;
|
|
6
8
|
$card-padding: rem-calc($base-line-height * 0.75) 6% !default;
|
|
@@ -11,9 +13,9 @@ $progress-height: rem-calc(1.25 * $base-line-height) !default;
|
|
|
11
13
|
$progress-background: $white !default;
|
|
12
14
|
$progress-border-width: rem-calc(4) !default;
|
|
13
15
|
$progress-border-color: $progress-background !default;
|
|
14
|
-
$progress-margin-bottom: rem-calc($base-line-height
|
|
16
|
+
$progress-margin-bottom: rem-calc($base-line-height * 0.5) !default;
|
|
15
17
|
$progress-meter-background: get-color(secondary) !default;
|
|
16
|
-
$progress-radius: rem-calc($base-line-height
|
|
18
|
+
$progress-radius: rem-calc($base-line-height * 0.25) !default;
|
|
17
19
|
$progress-thermometer-height: rem-calc(7.5 * $base-line-height) !default;
|
|
18
20
|
$progress-thermometer-bulb-size: rem-calc(1.75 * $base-line-height) !default;
|
|
19
21
|
|
|
@@ -23,7 +25,7 @@ $recent-supporter-color: color-pick-contrast(
|
|
|
23
25
|
($dark-gray, $light-gray)
|
|
24
26
|
) !default;
|
|
25
27
|
$recent-supporter-border-color: if(
|
|
26
|
-
lightness(get-background-color($body-background)) < 50,
|
|
28
|
+
color.lightness(get-background-color($body-background)) < 50,
|
|
27
29
|
$dark-gray,
|
|
28
30
|
$light-gray
|
|
29
31
|
) !default;
|
|
@@ -37,7 +39,7 @@ $callout-background: $card-background !default;
|
|
|
37
39
|
$callout-background-fade: 0% !default;
|
|
38
40
|
$callout-border: none !default;
|
|
39
41
|
$callout-sizes: (
|
|
40
|
-
small: rem-calc($base-line-height
|
|
42
|
+
small: rem-calc($base-line-height * 0.5),
|
|
41
43
|
default: rem-calc($base-line-height),
|
|
42
44
|
large: rem-calc($base-line-height * 1.5),
|
|
43
45
|
) !default;
|
|
@@ -52,7 +54,7 @@ $closebutton-size: (
|
|
|
52
54
|
large: rem-calc($base-line-height * 1.75),
|
|
53
55
|
) !default;
|
|
54
56
|
$closebutton-offset-horizontal: (
|
|
55
|
-
small: rem-calc(-$base-line-height
|
|
57
|
+
small: rem-calc(-$base-line-height * 0.5),
|
|
56
58
|
medium: rem-calc(-$base-line-height * 0.75),
|
|
57
59
|
large: rem-calc(-$base-line-height),
|
|
58
60
|
) !default;
|
|
@@ -61,7 +63,7 @@ $closebutton-color: color-pick-contrast(
|
|
|
61
63
|
$closebutton-background-color,
|
|
62
64
|
($light-gray, $dark-gray)
|
|
63
65
|
) !default;
|
|
64
|
-
$closebutton-background-color-hover: scale
|
|
66
|
+
$closebutton-background-color-hover: color.scale(
|
|
65
67
|
$closebutton-background-color,
|
|
66
68
|
$lightness: 6%
|
|
67
69
|
) !default;
|
|
@@ -103,7 +105,7 @@ $dropdown-menu-parent-border-color: $input-border-color !default;
|
|
|
103
105
|
$dropdown-menu-parent-border-color-active: if(
|
|
104
106
|
$dropdown-menu-parent-border-color == $input-border-color,
|
|
105
107
|
$input-border-color-focus,
|
|
106
|
-
scale
|
|
108
|
+
color.scale($dropdown-menu-parent-border-color, $lightness: -10%)
|
|
107
109
|
) !default;
|
|
108
110
|
$dropdown-menu-parent-border-width: $input-border-width !default;
|
|
109
111
|
$dropdownmenu-border: (
|
|
@@ -111,12 +113,12 @@ $dropdownmenu-border: (
|
|
|
111
113
|
) !default;
|
|
112
114
|
// stylelint-disable
|
|
113
115
|
$dropdownmenu-padding: (
|
|
114
|
-
($dropdown-menu-item-height - $menu-item-font-size * $menu-item-line-height)
|
|
116
|
+
($dropdown-menu-item-height - $menu-item-font-size * $menu-item-line-height) * 0.5 -
|
|
115
117
|
get-side($dropdown-menu-parent-border-width, top)
|
|
116
118
|
)
|
|
117
119
|
get-side($input-padding, right)
|
|
118
120
|
(
|
|
119
|
-
($dropdown-menu-item-height - $menu-item-font-size * $menu-item-line-height)
|
|
121
|
+
($dropdown-menu-item-height - $menu-item-font-size * $menu-item-line-height) * 0.5 -
|
|
120
122
|
get-side($dropdown-menu-parent-border-width, bottom)
|
|
121
123
|
)
|
|
122
124
|
get-side($input-padding, left) !default;
|
|
@@ -140,7 +142,7 @@ $accordion-item-background: transparent !default;
|
|
|
140
142
|
$accordion-item-color: $body-font-color !default;
|
|
141
143
|
$accordion-item-color-hover: $accordion-item-color !default;
|
|
142
144
|
$accordion-item-padding: rem-calc($base-line-height) - $accordion-content-border-width !default;
|
|
143
|
-
$accordion-margin: rem-calc($base-line-height
|
|
145
|
+
$accordion-margin: rem-calc($base-line-height * 0.5) !default;
|
|
144
146
|
$accordion-plusminus: false !default;
|
|
145
147
|
$accordion-radius: rem-calc(5) !default;
|
|
146
148
|
$accordion-separator: true !default;
|
|
@@ -9,7 +9,7 @@ $share-button-max-width: 28rem !default;
|
|
|
9
9
|
margin-bottom: 0.75 * $global-margin;
|
|
10
10
|
|
|
11
11
|
// More horizontal padding.
|
|
12
|
-
@include breakpoint(25rem * $global-font-size
|
|
12
|
+
@include breakpoint(25rem * $global-font-size * 0.01) {
|
|
13
13
|
padding-left: 2em;
|
|
14
14
|
padding-right: 2em;
|
|
15
15
|
}
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
// Button that sticks to the edge of the screen.
|
|
4
4
|
// Used in combination with the `StickyButton` plugin.
|
|
5
5
|
|
|
6
|
+
@use "sass:color";
|
|
7
|
+
|
|
6
8
|
$sticky-cta-background: $form-background !default;
|
|
7
|
-
$sticky-cta-boxshadow: 0 0 rem-calc(3) scale
|
|
9
|
+
$sticky-cta-boxshadow: 0 0 rem-calc(3) color.scale($black, $alpha: -75%) !default;
|
|
8
10
|
$sticky-button-max-width: 28rem !default;
|
|
9
11
|
|
|
10
12
|
.sticky-cta {
|
|
11
13
|
@include sticky-button;
|
|
12
14
|
background: $sticky-cta-background;
|
|
13
15
|
box-shadow: $sticky-cta-boxshadow;
|
|
14
|
-
padding: $global-padding
|
|
16
|
+
padding: $global-padding * 0.5;
|
|
15
17
|
padding-left: get-side($form-padding, left);
|
|
16
18
|
padding-right: get-side($form-padding, right);
|
|
17
19
|
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
// button, as well as `.form-radios` and `.form-type-textfield` to distinguish
|
|
13
13
|
// between radio buttons and the "other…" text field.
|
|
14
14
|
|
|
15
|
+
@use "sass:color";
|
|
16
|
+
@use "sass:math";
|
|
17
|
+
|
|
15
18
|
// Base colors
|
|
16
19
|
$donation-amount-background-color: transparent !default;
|
|
17
20
|
$donation-amount-background-color-checked: $primary-color !default;
|
|
@@ -20,7 +23,7 @@ $donation-amount-text-color-checked: color-pick-contrast(
|
|
|
20
23
|
) !default;
|
|
21
24
|
|
|
22
25
|
// Colors derived from base colors by default
|
|
23
|
-
$donation-amount-border-color: scale
|
|
26
|
+
$donation-amount-border-color: color.scale(
|
|
24
27
|
$donation-amount-background-color-checked,
|
|
25
28
|
$lightness: 50%,
|
|
26
29
|
$saturation: -50%
|
|
@@ -35,9 +38,9 @@ $donation-amount-border-radius: 0 !default;
|
|
|
35
38
|
$donation-amount-border-width: rem-calc(3) !default;
|
|
36
39
|
$donation-amount-text-offset: $button-text-offset !default;
|
|
37
40
|
// The padding is calculated like the $button-padding
|
|
38
|
-
$donation-amount-button-padding: rem-calc(1.25 * $base-line-height
|
|
41
|
+
$donation-amount-button-padding: rem-calc(1.25 * $base-line-height * 0.5) -
|
|
39
42
|
$donation-amount-border-width + $donation-amount-text-offset 0
|
|
40
|
-
rem-calc(1.25 * $base-line-height
|
|
43
|
+
rem-calc(1.25 * $base-line-height * 0.5) - $donation-amount-border-width -
|
|
41
44
|
$donation-amount-text-offset !default;
|
|
42
45
|
|
|
43
46
|
// Layout
|
|
@@ -57,10 +60,7 @@ $donation-amount-max-buttons-per-row: 3 !default;
|
|
|
57
60
|
input[type="radio"]:not([value="select_or_other"]) {
|
|
58
61
|
+ label {
|
|
59
62
|
@include button-base;
|
|
60
|
-
@include button-hollow;
|
|
61
63
|
@include button-expand;
|
|
62
|
-
// button-style() and button-hollow-style() not used because we would
|
|
63
|
-
// override them now anyways
|
|
64
64
|
|
|
65
65
|
border-radius: $donation-amount-border-radius;
|
|
66
66
|
text-align: center;
|
|
@@ -123,7 +123,7 @@ $donation-amount-max-buttons-per-row: 3 !default;
|
|
|
123
123
|
// Flex children (form items)
|
|
124
124
|
> .form-item {
|
|
125
125
|
// Up to x buttons in 1 row.
|
|
126
|
-
flex: 1 0 calc(#{100
|
|
126
|
+
flex: 1 0 calc(#{math.div(100%, $donation-amount-max-buttons-per-row)} - #{$form-spacing * 2});
|
|
127
127
|
// Gutter of 2 * $form-spacing (flex margins do not collapse).
|
|
128
128
|
margin: {
|
|
129
129
|
left: $form-spacing;
|
package/src/scss/form/_e2t.scss
CHANGED
|
@@ -26,6 +26,8 @@ form .email-to-target-target {
|
|
|
26
26
|
top: $form-spacing * 3;
|
|
27
27
|
bottom: $form-spacing * 3;
|
|
28
28
|
}
|
|
29
|
+
// Allow long lines to break while preserving new lines.
|
|
30
|
+
white-space: pre-wrap;
|
|
29
31
|
}
|
|
30
32
|
// Fixes margins when multiple targets can be selected.
|
|
31
33
|
.form-type-checkbox + .form-type-textfield {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
// Help texts margins
|
|
5
5
|
.help-text {
|
|
6
|
-
margin-top: -$form-spacing
|
|
6
|
+
margin-top: -$form-spacing * 0.5;
|
|
7
7
|
margin-bottom: $form-spacing * 1.5;
|
|
8
8
|
|
|
9
9
|
.form-error.is-visible + & {
|
|
@@ -49,3 +49,18 @@ input[type="radio"] + label {
|
|
|
49
49
|
input.button.primary {
|
|
50
50
|
margin-top: $form-spacing * 2;
|
|
51
51
|
}
|
|
52
|
+
|
|
53
|
+
// Display radios, checkboxes etc. next to each other.
|
|
54
|
+
.form-item.inline {
|
|
55
|
+
&,
|
|
56
|
+
.form-radios,
|
|
57
|
+
.form-checkboxes {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-wrap: wrap;
|
|
60
|
+
column-gap: $global-margin;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
> label {
|
|
64
|
+
flex-basis: 100%;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -22,10 +22,7 @@ $paymethod-select-border-width: $input-border-width !default;
|
|
|
22
22
|
+ label {
|
|
23
23
|
// Button styles
|
|
24
24
|
@include button-base;
|
|
25
|
-
@include button-hollow;
|
|
26
25
|
@include button-expand;
|
|
27
|
-
// button-style() and button-hollow-style() not used because we would
|
|
28
|
-
// override them now anyways
|
|
29
26
|
|
|
30
27
|
border-radius: $paymethod-select-border-radius;
|
|
31
28
|
text-align: left;
|
|
@@ -62,7 +59,7 @@ $paymethod-select-border-width: $input-border-width !default;
|
|
|
62
59
|
|
|
63
60
|
// These buttons are a bit tighter together
|
|
64
61
|
.form-item & {
|
|
65
|
-
margin-top: $form-spacing
|
|
62
|
+
margin-top: $form-spacing * 0.5;
|
|
66
63
|
}
|
|
67
64
|
}
|
|
68
65
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
// Form settings
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
|
|
4
|
+
@use "sass:color";
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "sass:math";
|
|
7
|
+
|
|
4
8
|
// General
|
|
5
|
-
$form-padding: rem-calc($base-line-height) 6% rem-calc($base-line-height
|
|
6
|
-
$form-spacing: rem-calc($base-line-height
|
|
9
|
+
$form-padding: rem-calc($base-line-height) 6% rem-calc($base-line-height * 0.5) !default;
|
|
10
|
+
$form-spacing: rem-calc($base-line-height * 0.25) !default;
|
|
7
11
|
$input-background: $white !default;
|
|
8
12
|
|
|
9
13
|
// Buttons
|
|
@@ -28,17 +32,17 @@ $button-text-offset: 0 !default;
|
|
|
28
32
|
$button-border-width: rem-calc(2) !default;
|
|
29
33
|
$button-hollow-border-width: $button-border-width !default;
|
|
30
34
|
$button-border: $button-border-width solid transparent !default;
|
|
31
|
-
$button-padding: rem-calc(
|
|
32
|
-
1em rem-calc(
|
|
35
|
+
$button-padding: rem-calc($base-line-height * 0.625) - $button-border-width + $button-text-offset
|
|
36
|
+
1em rem-calc($base-line-height * 0.625) - $button-border-width - $button-text-offset !default;
|
|
33
37
|
$button-radius: 0.25rem !default;
|
|
34
|
-
$button-background: map
|
|
38
|
+
$button-background: map.get($button-palette, primary) !default;
|
|
35
39
|
$button-background-hover-lightness: 10% !default;
|
|
36
|
-
$button-background-hover: scale
|
|
40
|
+
$button-background-hover: color.scale(
|
|
37
41
|
$button-background,
|
|
38
42
|
$lightness: $button-background-hover-lightness
|
|
39
43
|
) !default;
|
|
40
|
-
$button-primary-shadow-color: scale
|
|
41
|
-
map
|
|
44
|
+
$button-primary-shadow-color: color.scale(
|
|
45
|
+
map.get($button-palette, primary),
|
|
42
46
|
$lightness: -15%,
|
|
43
47
|
$saturation: 20%
|
|
44
48
|
) !default;
|
|
@@ -61,29 +65,29 @@ $form-label-line-height: if(
|
|
|
61
65
|
$input-border-width: rem-calc(2) !default;
|
|
62
66
|
$input-border-color: if(
|
|
63
67
|
$input-background == $form-background,
|
|
64
|
-
scale
|
|
65
|
-
scale
|
|
68
|
+
color.scale($form-background, $lightness: -10%),
|
|
69
|
+
color.scale(get-background-color($form-background), $lightness: -5%)
|
|
66
70
|
) !default;
|
|
67
|
-
$input-border-color-focus: scale
|
|
71
|
+
$input-border-color-focus: color.scale($input-border-color, $lightness: -10%) !default;
|
|
68
72
|
$input-border: $input-border-width solid $input-border-color !default;
|
|
69
73
|
$input-border-focus: $input-border-width solid $input-border-color-focus !default;
|
|
70
74
|
$input-prefix-border: none !default;
|
|
71
75
|
|
|
72
76
|
// Shadows
|
|
73
77
|
$input-shadow: none !default;
|
|
74
|
-
$input-shadow-focus: inset 0 ($input-border-width
|
|
78
|
+
$input-shadow-focus: inset 0 ($input-border-width * 0.5) $input-border-width $input-border-color !default;
|
|
75
79
|
|
|
76
80
|
// Inputs
|
|
77
81
|
$input-background-focus: $input-background !default;
|
|
78
82
|
$input-font-size: 1rem !default;
|
|
79
|
-
$input-line-height: max(
|
|
83
|
+
$input-line-height: math.max(
|
|
80
84
|
grid-lineheight($input-font-size),
|
|
81
85
|
unitless-calc($base-line-height)
|
|
82
86
|
) !default;
|
|
83
87
|
$input-height: rem-calc(2 * $base-line-height) !default;
|
|
84
88
|
// prettier-ignore
|
|
85
89
|
$input-padding: (
|
|
86
|
-
rem-calc(($input-height - $input-line-height * $input-font-size)
|
|
90
|
+
rem-calc(($input-height - $input-line-height * $input-font-size) * 0.5) - $input-border-width
|
|
87
91
|
) 1rem !default;
|
|
88
92
|
$input-placeholder-color: $medium-gray !default;
|
|
89
93
|
$input-prefix-color: $form-label-color !default;
|
|
@@ -92,7 +96,7 @@ $input-prefix-padding: 1em !default;
|
|
|
92
96
|
// Selects
|
|
93
97
|
$select-height: $input-height !default;
|
|
94
98
|
$select-triangle-color: $dark-gray !default;
|
|
95
|
-
$select-triangle-size: rem-calc($base-line-height
|
|
99
|
+
$select-triangle-size: rem-calc($base-line-height * 0.5) !default;
|
|
96
100
|
$select-font-family: $form-label-font-family !default;
|
|
97
101
|
$select-font-size: $form-label-font-size !default;
|
|
98
102
|
$select-font-weight: $form-label-font-weight !default;
|
|
@@ -163,12 +167,15 @@ $form-steps-font-color-alt: $body-font-color !default;
|
|
|
163
167
|
$form-steps-background-color: $medium-gray !default;
|
|
164
168
|
$form-steps-next-background-color: $light-gray !default;
|
|
165
169
|
// the previous step should be $dark-gray
|
|
166
|
-
// keeping it as a scale
|
|
170
|
+
// keeping it as a color.scale() relation, because of it should still be derived
|
|
167
171
|
// from the background color
|
|
168
|
-
$form-steps-previous-background-color: scale
|
|
172
|
+
$form-steps-previous-background-color: color.scale(
|
|
169
173
|
$form-steps-background-color,
|
|
170
174
|
$lightness: -46.5%
|
|
171
175
|
) !default;
|
|
172
176
|
|
|
173
177
|
// AJAX loading throbber
|
|
174
178
|
$loader-color: get-color(primary) !default;
|
|
179
|
+
|
|
180
|
+
// Payment icons
|
|
181
|
+
$payment-icon-color: $form-label-color !default;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// * cover-1col: The main content is displayed in a single column.
|
|
5
5
|
// * cover-2col: The main content is split into visual sections over 1-2 columns.
|
|
6
6
|
|
|
7
|
+
@use "sass:map";
|
|
8
|
+
|
|
7
9
|
$cover-background: $fallback-background !default;
|
|
8
10
|
$cover-content-box-shadow: none !default;
|
|
9
11
|
/// A value to subtract from the screen height to place the bottom edge of #top.
|
|
@@ -59,7 +61,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
// Make .narrow smaller a little earlier, halfway between large and xlarge.
|
|
62
|
-
@include breakpoint((map
|
|
64
|
+
@include breakpoint((map.get($breakpoints, large) + map.get($breakpoints, xlarge)) * 0.5) {
|
|
63
65
|
~ section .grid-container.narrow {
|
|
64
66
|
> * {
|
|
65
67
|
grid-column: 3 / -3;
|
|
@@ -85,7 +87,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
85
87
|
@include breakpoint(large) {
|
|
86
88
|
// Adjust vertical paddings and margins.
|
|
87
89
|
#top {
|
|
88
|
-
padding-bottom: $global-padding
|
|
90
|
+
padding-bottom: $global-padding * 0.5;
|
|
89
91
|
}
|
|
90
92
|
#content {
|
|
91
93
|
padding-top: $global-padding * 1.5;
|
|
@@ -200,7 +202,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
200
202
|
|
|
201
203
|
// Reduce padding for top section.
|
|
202
204
|
#top .inner-wrapper {
|
|
203
|
-
padding-bottom: $global-padding
|
|
205
|
+
padding-bottom: $global-padding * 0.5;
|
|
204
206
|
|
|
205
207
|
#page-title {
|
|
206
208
|
padding-top: 0;
|
|
@@ -230,7 +232,11 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
230
232
|
#background ~ #main > .grid-container {
|
|
231
233
|
// Make the first grid row almost as large as the screen
|
|
232
234
|
// (we don’t know how large the #header is, whether there are messages,…).
|
|
235
|
+
// ATM stylelint does not recognise pure CSS functions:
|
|
236
|
+
// https://github.com/stylelint-scss/stylelint-scss/issues/486
|
|
237
|
+
// stylelint-disable scss/no-global-function-names
|
|
233
238
|
grid-template-rows: min(calc(100vh - #{$cover-2col-offset}), 125vw) 1fr;
|
|
239
|
+
// stylelint-enable scss/no-global-function-names
|
|
234
240
|
// Show the top section at the bottom of this row.
|
|
235
241
|
#top {
|
|
236
242
|
margin-top: auto;
|
|
@@ -18,7 +18,7 @@ $fallback-background: $medium-gray !default;
|
|
|
18
18
|
// Borders
|
|
19
19
|
$form-border: if(
|
|
20
20
|
$form-background == $body-background,
|
|
21
|
-
rem-calc($base-line-height
|
|
21
|
+
rem-calc($base-line-height * 0.5) solid $light-gray,
|
|
22
22
|
none
|
|
23
23
|
) !default;
|
|
24
24
|
$header-border: if(
|
package/src/scss/main.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// stylelint-disable no-invalid-position-at-import-rule
|
|
2
|
+
|
|
1
3
|
@charset 'utf-8';
|
|
2
4
|
|
|
3
5
|
// --------------------------------------------------------------------------
|
|
@@ -86,6 +88,7 @@
|
|
|
86
88
|
@include mo-progress-thermometer;
|
|
87
89
|
@include mo-share-button;
|
|
88
90
|
@include mo-drupal-ajax-loading;
|
|
91
|
+
@include mo-payment-icons;
|
|
89
92
|
@include mo-cookiebar;
|
|
90
93
|
|
|
91
94
|
@import "form/forms";
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// - - - - - - - - - - - - - - -
|
|
3
3
|
// Expects $base-font-size and $global-font-size have already been set
|
|
4
4
|
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
@use "sass:meta";
|
|
7
|
+
|
|
5
8
|
// Fonts
|
|
6
9
|
// see https://fontsarena.com/blog/operating-systems-default-sans-serif-fonts/
|
|
7
10
|
$body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Oxygen,
|
|
@@ -13,9 +16,13 @@ $global-weight-bold: bold !default;
|
|
|
13
16
|
$body-font-color: $black !default;
|
|
14
17
|
$body-font-color-alt: $white !default;
|
|
15
18
|
$title-color: get-color(primary) !default;
|
|
16
|
-
$header-color-even: if(
|
|
19
|
+
$header-color-even: if(
|
|
20
|
+
meta.variable-exists("header-color"),
|
|
21
|
+
$header-color,
|
|
22
|
+
$body-font-color
|
|
23
|
+
) !default;
|
|
17
24
|
$header-color-odd: if(
|
|
18
|
-
variable-exists("header-color"),
|
|
25
|
+
meta.variable-exists("header-color"),
|
|
19
26
|
$header-color,
|
|
20
27
|
get-color(secondary)
|
|
21
28
|
) !default;
|
|
@@ -70,8 +77,8 @@ $header-styles: (
|
|
|
70
77
|
) !default;
|
|
71
78
|
|
|
72
79
|
// Links
|
|
73
|
-
$anchor-color-hover: scale
|
|
74
|
-
$anchor-color-active: scale
|
|
80
|
+
$anchor-color-hover: color.scale($anchor-color, $lightness: -14%) !default;
|
|
81
|
+
$anchor-color-active: color.scale($anchor-color, $lightness: 6%) !default;
|
|
75
82
|
$anchor-text-decoration: underline !default;
|
|
76
83
|
$anchor-text-decoration-hover: underline !default;
|
|
77
84
|
|