@moreonion/foundist 2.0.8 → 2.1.3
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 +7 -8
- 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 +3 -0
- package/src/html/includes/form-items/giftaid.html +16 -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/js/foundist.js +27 -11
- 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 +18 -12
- 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 +35 -1
- package/src/scss/form/_paymethod-select-button.scss +1 -4
- package/src/scss/form/_settings.scss +27 -19
- package/src/scss/layout/_cover.scss +11 -4
- package/src/scss/layout/_settings.scss +1 -1
- package/src/scss/main.scss +4 -0
- package/src/scss/typography/_elements.scss +1 -1
- package/src/scss/typography/_settings.scss +13 -4
|
@@ -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,38 +65,38 @@ $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
|
-
$input-placeholder-color: $
|
|
92
|
+
$input-placeholder-color: $muted-font-color !default;
|
|
89
93
|
$input-prefix-color: $form-label-color !default;
|
|
90
94
|
$input-prefix-padding: 1em !default;
|
|
91
95
|
|
|
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;
|
|
@@ -106,7 +110,7 @@ $radio-label-font-weight: $global-weight-normal !default;
|
|
|
106
110
|
// Files
|
|
107
111
|
$file-upload-font-size: $small-font-size !default;
|
|
108
112
|
$file-upload-padding: $form-spacing * 2 !default;
|
|
109
|
-
$file-upload-help-color: $
|
|
113
|
+
$file-upload-help-color: $muted-font-color !default;
|
|
110
114
|
|
|
111
115
|
// Help texts
|
|
112
116
|
$helptext-color: $form-label-color !default;
|
|
@@ -163,12 +167,16 @@ $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
|
+
// Donation forms
|
|
181
|
+
$payment-icon-color: $form-label-color !default;
|
|
182
|
+
$giftaid-checkbox-size: rem-calc($base-line-height * 1.5) !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.
|
|
@@ -50,7 +52,8 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
50
52
|
right: 0;
|
|
51
53
|
bottom: 0;
|
|
52
54
|
left: 0;
|
|
53
|
-
height
|
|
55
|
+
// Required to keep a constant height in mobile browsers with (dis)appearing menus
|
|
56
|
+
height: 100vh;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
// Remove title padding
|
|
@@ -59,7 +62,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
// Make .narrow smaller a little earlier, halfway between large and xlarge.
|
|
62
|
-
@include breakpoint((map
|
|
65
|
+
@include breakpoint((map.get($breakpoints, large) + map.get($breakpoints, xlarge)) * 0.5) {
|
|
63
66
|
~ section .grid-container.narrow {
|
|
64
67
|
> * {
|
|
65
68
|
grid-column: 3 / -3;
|
|
@@ -85,7 +88,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
85
88
|
@include breakpoint(large) {
|
|
86
89
|
// Adjust vertical paddings and margins.
|
|
87
90
|
#top {
|
|
88
|
-
padding-bottom: $global-padding
|
|
91
|
+
padding-bottom: $global-padding * 0.5;
|
|
89
92
|
}
|
|
90
93
|
#content {
|
|
91
94
|
padding-top: $global-padding * 1.5;
|
|
@@ -200,7 +203,7 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
200
203
|
|
|
201
204
|
// Reduce padding for top section.
|
|
202
205
|
#top .inner-wrapper {
|
|
203
|
-
padding-bottom: $global-padding
|
|
206
|
+
padding-bottom: $global-padding * 0.5;
|
|
204
207
|
|
|
205
208
|
#page-title {
|
|
206
209
|
padding-top: 0;
|
|
@@ -230,7 +233,11 @@ $cover-2col-offset: $global-margin * 5;
|
|
|
230
233
|
#background ~ #main > .grid-container {
|
|
231
234
|
// Make the first grid row almost as large as the screen
|
|
232
235
|
// (we don’t know how large the #header is, whether there are messages,…).
|
|
236
|
+
// ATM stylelint does not recognise pure CSS functions:
|
|
237
|
+
// https://github.com/stylelint-scss/stylelint-scss/issues/486
|
|
238
|
+
// stylelint-disable scss/no-global-function-names
|
|
233
239
|
grid-template-rows: min(calc(100vh - #{$cover-2col-offset}), 125vw) 1fr;
|
|
240
|
+
// stylelint-enable scss/no-global-function-names
|
|
234
241
|
// Show the top section at the bottom of this row.
|
|
235
242
|
#top {
|
|
236
243
|
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,8 @@
|
|
|
86
88
|
@include mo-progress-thermometer;
|
|
87
89
|
@include mo-share-button;
|
|
88
90
|
@include mo-drupal-ajax-loading;
|
|
91
|
+
@include mo-payment-icons;
|
|
92
|
+
@include mo-giftaid;
|
|
89
93
|
@include mo-cookiebar;
|
|
90
94
|
|
|
91
95
|
@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,
|
|
@@ -12,14 +15,20 @@ $global-weight-bold: bold !default;
|
|
|
12
15
|
// Colors
|
|
13
16
|
$body-font-color: $black !default;
|
|
14
17
|
$body-font-color-alt: $white !default;
|
|
18
|
+
$muted-font-color: $medium-gray !default;
|
|
15
19
|
$title-color: get-color(primary) !default;
|
|
16
|
-
$header-color-even: if(
|
|
20
|
+
$header-color-even: if(
|
|
21
|
+
meta.variable-exists("header-color"),
|
|
22
|
+
$header-color,
|
|
23
|
+
$body-font-color
|
|
24
|
+
) !default;
|
|
17
25
|
$header-color-odd: if(
|
|
18
|
-
variable-exists("header-color"),
|
|
26
|
+
meta.variable-exists("header-color"),
|
|
19
27
|
$header-color,
|
|
20
28
|
get-color(secondary)
|
|
21
29
|
) !default;
|
|
22
30
|
$header-color-alt: $body-font-color-alt !default;
|
|
31
|
+
$header-small-font-color: $muted-font-color !default;
|
|
23
32
|
$anchor-color: get-color(primary) !default;
|
|
24
33
|
$blockquote-color: get-color(primary) !default;
|
|
25
34
|
|
|
@@ -70,8 +79,8 @@ $header-styles: (
|
|
|
70
79
|
) !default;
|
|
71
80
|
|
|
72
81
|
// Links
|
|
73
|
-
$anchor-color-hover: scale
|
|
74
|
-
$anchor-color-active: scale
|
|
82
|
+
$anchor-color-hover: color.scale($anchor-color, $lightness: -14%) !default;
|
|
83
|
+
$anchor-color-active: color.scale($anchor-color, $lightness: 6%) !default;
|
|
75
84
|
$anchor-text-decoration: underline !default;
|
|
76
85
|
$anchor-text-decoration-hover: underline !default;
|
|
77
86
|
|