@moreonion/foundist 2.0.6 → 2.1.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.
- package/README.md +1 -1
- package/package.json +5 -9
- 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/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/js/foundist.js +20 -5
- 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 +31 -30
- package/src/scss/form/_e2t.scss +2 -0
- package/src/scss/form/_fields.scss +16 -1
- package/src/scss/form/_paymethod-select-button.scss +21 -22
- package/src/scss/form/_settings.scss +21 -17
- package/src/scss/layout/_cover.scss +9 -3
- package/src/scss/layout/_settings.scss +1 -1
- package/src/scss/main.scss +2 -0
- package/src/scss/typography/_elements.scss +1 -1
- package/src/scss/typography/_settings.scss +11 -4
package/src/scss/_util.scss
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// - - - - - - - - - - - -
|
|
3
3
|
// Functions and mixins for general use
|
|
4
4
|
|
|
5
|
+
@use "sass:color";
|
|
6
|
+
|
|
5
7
|
/// Set text colors according to the background.
|
|
6
8
|
///
|
|
7
9
|
/// If the background value passed to the mixin happens to not be (just) a color,
|
|
@@ -59,13 +61,13 @@
|
|
|
59
61
|
&:focus {
|
|
60
62
|
color: color-pick-contrast(
|
|
61
63
|
$background,
|
|
62
|
-
($anchor-color-hover, scale
|
|
64
|
+
($anchor-color-hover, color.scale($this-anchor-color, $lightness: -14%))
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
&:active {
|
|
66
68
|
color: color-pick-contrast(
|
|
67
69
|
$background,
|
|
68
|
-
($anchor-color-active, scale
|
|
70
|
+
($anchor-color-active, color.scale($this-anchor-color, $lightness: 6%))
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
position: absolute;
|
|
30
30
|
left: rem-calc(get-side($accordion-item-padding, left));
|
|
31
31
|
// The triangle is vertically centered in the title
|
|
32
|
-
top: calc(50% - #{$accordion-triangle-size
|
|
32
|
+
top: calc(50% - #{$accordion-triangle-size * 0.5});
|
|
33
33
|
}
|
|
34
34
|
.is-active & {
|
|
35
35
|
&:before {
|
|
@@ -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;
|
|
@@ -75,38 +75,39 @@ $donation-amount-max-buttons-per-row: 3 !default;
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
// Default
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
&.disabled:hover,
|
|
83
|
-
&[disabled]:hover,
|
|
84
|
-
&.disabled:focus,
|
|
85
|
-
&[disabled]:focus {
|
|
86
|
-
background-color: $donation-amount-background-color;
|
|
87
|
-
border: $donation-amount-border-width solid $donation-amount-border-color;
|
|
88
|
-
color: $donation-amount-text-color;
|
|
89
|
-
}
|
|
90
|
-
// Hover state
|
|
91
|
-
&:hover,
|
|
92
|
-
&:focus {
|
|
93
|
-
background-color: $donation-amount-background-color;
|
|
94
|
-
border-color: $donation-amount-border-color-hover;
|
|
95
|
-
}
|
|
78
|
+
// Default state
|
|
79
|
+
border: $donation-amount-border-width solid $donation-amount-border-color;
|
|
80
|
+
background-color: $donation-amount-background-color;
|
|
81
|
+
color: $donation-amount-text-color;
|
|
96
82
|
}
|
|
97
83
|
|
|
98
|
-
// Checked
|
|
84
|
+
// Checked state
|
|
99
85
|
&:checked + label {
|
|
100
|
-
color: $donation-amount-text-color-checked;
|
|
101
86
|
border-color: $donation-amount-border-color-checked;
|
|
102
87
|
background-color: $donation-amount-background-color-checked;
|
|
88
|
+
color: $donation-amount-text-color-checked;
|
|
89
|
+
}
|
|
103
90
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
// Operational
|
|
92
|
+
&:not(:disabled) {
|
|
93
|
+
& + label:hover,
|
|
94
|
+
&:focus + label {
|
|
95
|
+
border-color: $donation-amount-border-color-hover;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:checked + label:hover,
|
|
99
|
+
&:focus:checked + label {
|
|
107
100
|
border-color: $donation-amount-border-color;
|
|
108
101
|
}
|
|
109
102
|
}
|
|
103
|
+
|
|
104
|
+
// Disabled
|
|
105
|
+
&:disabled {
|
|
106
|
+
+ label {
|
|
107
|
+
opacity: $button-opacity-disabled;
|
|
108
|
+
cursor: not-allowed;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
// Flex container
|
|
@@ -122,7 +123,7 @@ $donation-amount-max-buttons-per-row: 3 !default;
|
|
|
122
123
|
// Flex children (form items)
|
|
123
124
|
> .form-item {
|
|
124
125
|
// Up to x buttons in 1 row.
|
|
125
|
-
flex: 1 0 calc(#{100
|
|
126
|
+
flex: 1 0 calc(#{math.div(100%, $donation-amount-max-buttons-per-row)} - #{$form-spacing * 2});
|
|
126
127
|
// Gutter of 2 * $form-spacing (flex margins do not collapse).
|
|
127
128
|
margin: {
|
|
128
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;
|
|
@@ -36,24 +33,10 @@ $paymethod-select-border-width: $input-border-width !default;
|
|
|
36
33
|
padding-left: rem-calc(get-side($button-padding, left)) + $select-triangle-size;
|
|
37
34
|
margin-bottom: $form-spacing * 2;
|
|
38
35
|
|
|
39
|
-
// Default
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
&.disabled:hover,
|
|
44
|
-
&[disabled]:hover,
|
|
45
|
-
&.disabled:focus,
|
|
46
|
-
&[disabled]:focus {
|
|
47
|
-
background-color: $paymethod-select-background-color;
|
|
48
|
-
border: $paymethod-select-border-width solid $paymethod-select-border-color;
|
|
49
|
-
color: $paymethod-select-text-color;
|
|
50
|
-
}
|
|
51
|
-
// Hover state
|
|
52
|
-
&:hover,
|
|
53
|
-
&:focus {
|
|
54
|
-
background-color: $paymethod-select-background-color;
|
|
55
|
-
border-color: $paymethod-select-border-color-hover;
|
|
56
|
-
}
|
|
36
|
+
// Default state
|
|
37
|
+
border: $paymethod-select-border-width solid $paymethod-select-border-color;
|
|
38
|
+
background-color: $paymethod-select-background-color;
|
|
39
|
+
color: $paymethod-select-text-color;
|
|
57
40
|
|
|
58
41
|
// Triangle to signify a slide menu
|
|
59
42
|
// This also override any mo-radio pseudo input (if there is one)
|
|
@@ -76,7 +59,23 @@ $paymethod-select-border-width: $input-border-width !default;
|
|
|
76
59
|
|
|
77
60
|
// These buttons are a bit tighter together
|
|
78
61
|
.form-item & {
|
|
79
|
-
margin-top: $form-spacing
|
|
62
|
+
margin-top: $form-spacing * 0.5;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Operational
|
|
67
|
+
&:not(:disabled) {
|
|
68
|
+
& + label:hover,
|
|
69
|
+
&:focus + label {
|
|
70
|
+
border-color: $paymethod-select-border-color-hover;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Disabled
|
|
75
|
+
&:disabled {
|
|
76
|
+
+ label {
|
|
77
|
+
opacity: $button-opacity-disabled;
|
|
78
|
+
cursor: not-allowed;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
}
|