@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.
Files changed (62) hide show
  1. package/README.md +1 -1
  2. package/package.json +7 -8
  3. package/src/html/basic-action-page-cover-1col.html +2 -2
  4. package/src/html/basic-action-page-cover-2col-reversed.html +2 -2
  5. package/src/html/basic-action-page-cover-2col.html +2 -2
  6. package/src/html/basic-action-page-cover-banner.html +2 -2
  7. package/src/html/basic-action-page-reversed.html +1 -1
  8. package/src/html/basic-action-page-with-banner-reversed.html +2 -2
  9. package/src/html/basic-action-page-with-banner.html +2 -2
  10. package/src/html/basic-action-page-with-callouts.html +1 -1
  11. package/src/html/basic-action-page.html +1 -1
  12. package/src/html/donation-action-page.html +1 -1
  13. package/src/html/e2t-action-page.html +1 -1
  14. package/src/html/includes/donate-form.html +3 -0
  15. package/src/html/includes/form-items/giftaid.html +16 -0
  16. package/src/html/includes/form-items/inline-radios.html +17 -0
  17. package/src/html/includes/form-items/payment-icons.html +19 -0
  18. package/src/html/includes/teaser.html +1 -1
  19. package/src/html/templates/action-page-cover-1col.html +2 -2
  20. package/src/html/templates/action-page-cover-2col-reversed.html +2 -2
  21. package/src/html/templates/action-page-cover-2col.html +2 -2
  22. package/src/html/templates/action-page-cover-banner.html +2 -2
  23. package/src/html/templates/action-page-reversed.html +2 -2
  24. package/src/html/templates/action-page-with-banner-reversed.html +2 -2
  25. package/src/html/templates/action-page-with-banner.html +2 -2
  26. package/src/html/templates/action-page.html +2 -2
  27. package/src/html/templates/static-page-cover-1col.html +2 -2
  28. package/src/html/templates/static-page-cover-2col.html +2 -2
  29. package/src/html/templates/static-page-cover-banner.html +2 -2
  30. package/src/html/templates/static-page-with-banner.html +2 -2
  31. package/src/html/templates/static-page.html +2 -2
  32. package/src/html/templates/teaser-page.html +2 -2
  33. package/src/html/thank-you-page-cover-1col.html +1 -1
  34. package/src/html/thank-you-page-cover-2col.html +1 -1
  35. package/src/html/thank-you-page-cover-banner.html +1 -1
  36. package/src/html/thank-you-page-with-banner.html +1 -1
  37. package/src/html/thank-you-page.html +1 -1
  38. package/src/html/typography-static-page.html +1 -1
  39. package/src/js/foundist.js +27 -11
  40. package/src/scss/_settings.scss +4 -1
  41. package/src/scss/_util.scss +4 -2
  42. package/src/scss/components/_accordion.scss +1 -1
  43. package/src/scss/components/_card.scss +3 -1
  44. package/src/scss/components/_cookiebar.scss +1 -1
  45. package/src/scss/components/_letter.scss +3 -1
  46. package/src/scss/components/_menu.scss +28 -28
  47. package/src/scss/components/_progressbar.scss +1 -1
  48. package/src/scss/components/_reveal.scss +5 -3
  49. package/src/scss/components/_settings.scss +18 -12
  50. package/src/scss/components/_share-button.scss +1 -1
  51. package/src/scss/components/_sticky-button.scss +4 -2
  52. package/src/scss/form/_braintree_apple_pay.scss +2 -0
  53. package/src/scss/form/_donation-amount-button.scss +7 -7
  54. package/src/scss/form/_e2t.scss +2 -0
  55. package/src/scss/form/_fields.scss +35 -1
  56. package/src/scss/form/_paymethod-select-button.scss +1 -4
  57. package/src/scss/form/_settings.scss +27 -19
  58. package/src/scss/layout/_cover.scss +11 -4
  59. package/src/scss/layout/_settings.scss +1 -1
  60. package/src/scss/main.scss +4 -0
  61. package/src/scss/typography/_elements.scss +1 -1
  62. 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 / 2) !default;
6
- $form-spacing: rem-calc($base-line-height / 4) !default;
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(1.25 * $base-line-height / 2) - $button-border-width + $button-text-offset
32
- 1em rem-calc(1.25 * $base-line-height / 2) - $button-border-width - $button-text-offset !default;
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-get($button-palette, primary) !default;
38
+ $button-background: map.get($button-palette, primary) !default;
35
39
  $button-background-hover-lightness: 10% !default;
36
- $button-background-hover: scale-color(
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-color(
41
- map-get($button-palette, primary),
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-color($form-background, $lightness: -10%),
65
- scale-color(get-background-color($form-background), $lightness: -5%)
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-color($input-border-color, $lightness: -10%) !default;
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 / 2) $input-border-width $input-border-color !default;
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) / 2) - $input-border-width
90
+ rem-calc(($input-height - $input-line-height * $input-font-size) * 0.5) - $input-border-width
87
91
  ) 1rem !default;
88
- $input-placeholder-color: $medium-gray !default;
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 / 2) !default;
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: $medium-gray !default;
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-color() relation, because of it should still be derived
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-color(
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: auto;
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-get($breakpoints, large) + map-get($breakpoints, xlarge)) / 2) {
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 / 2;
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 / 2;
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 / 2) solid $light-gray,
21
+ rem-calc($base-line-height * 0.5) solid $light-gray,
22
22
  none
23
23
  ) !default;
24
24
  $header-border: if(
@@ -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";
@@ -46,6 +46,6 @@ h6,
46
46
  // Quotes
47
47
 
48
48
  blockquote p {
49
- margin-bottom: $global-margin / 2;
49
+ margin-bottom: $global-margin * 0.5;
50
50
  padding: 0;
51
51
  }
@@ -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(variable-exists("header-color"), $header-color, $body-font-color) !default;
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-color($anchor-color, $lightness: -14%) !default;
74
- $anchor-color-active: scale-color($anchor-color, $lightness: 6%) !default;
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