mod-base 1.0.23-beta.1 → 1.0.23-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-base",
3
- "version": "1.0.23-beta.1",
3
+ "version": "1.0.23-beta.2",
4
4
  "description": "Base Styles for S3 Sites",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -10,9 +10,9 @@ $color-button: null;
10
10
 
11
11
  $contact-us-blue-light: #8498E7;
12
12
 
13
- @function contrastText($base-color, $light-color, $dark-color) {
13
+ @function btnColorContrast($base-color, $light-color, $dark-color) {
14
14
  $result: $light-color;
15
- @if (lightness($base-color) > 50) {
15
+ @if (lightness($base-color) > 45) {
16
16
  $result: $dark-color;
17
17
  }
18
18
  @return $result;
@@ -25,13 +25,13 @@ $contact-us-blue-light: #8498E7;
25
25
  .btn__text {
26
26
  color: $color-btn-text;
27
27
  }
28
-
28
+
29
29
  &:hover,
30
30
  &:active,
31
31
  &:focus {
32
32
  background-color: darken($color-btn, 10%);
33
33
  color: $color-btn-text;
34
-
34
+
35
35
  .btn__text {
36
36
  color: $color-btn-text;
37
37
  }
@@ -43,7 +43,8 @@ $contact-us-blue-light: #8498E7;
43
43
  $foreground: $color-white,
44
44
  $accent-color: null,
45
45
  $color-btn: null,
46
- $color-btn-text: contrastText($color-btn, $foreground, $background),
46
+ $base-color: null,
47
+ $color-btn-text: null,
47
48
  $interactive-text-color: $color-charcoal2,
48
49
  $interactive-text-color-hover: darken($interactive-text-color, 10%),
49
50
  $bbb-img-filter: grayscale(1) invert(.9) brightness(2),
@@ -66,6 +67,7 @@ $contact-us-blue-light: #8498E7;
66
67
  $background-color: $background !global;
67
68
  $text-color: $foreground !global;
68
69
  $theme: $accent-color !global;
70
+ $base-color: $base-color !global;
69
71
  $value-props-background: $value-props-background;
70
72
  $box-shadow-color: rgba($color-black, 60%) !global;
71
73
  $background-img-brightness: brightness(85%) !global;
@@ -74,6 +76,10 @@ $contact-us-blue-light: #8498E7;
74
76
  $bbb-img-filter: $bbb-img-filter;
75
77
  $color-button: $color-btn !global;
76
78
 
79
+ @if ($color-btn != null and $color-btn-text == null) {
80
+ $color-btn-text: btnColorContrast($color-btn, $foreground, $background);
81
+ }
82
+
77
83
  // Most common selectors list
78
84
  $content-selectors: 'input,.toggle-wrapper,.step__header-title,.step__title,[class^="information__"],[class^="featured-block__"],[class^="partners__"],.form-group__label,[class^="abandonment__"],.modal-header--close,.modal-phone,legend,[class^="loader__"], table tr';
79
85
  $background-selectors: '.form,.header,.partners,.guarantee,.information,.modal-content,.matched-steps,.loader,.information__header,.hero__background,.hero__content,.form-input,.form-input-group__icon,.form-input:focus,.expand-collapse__icon,.featured-block,table tr';
@@ -125,7 +131,7 @@ $contact-us-blue-light: #8498E7;
125
131
 
126
132
  .step__header,
127
133
  .step__supertitle {
128
- background-color: $theme;
134
+ background-color: $base-color;
129
135
  }
130
136
 
131
137
  .value-props {
@@ -238,16 +244,18 @@ $contact-us-blue-light: #8498E7;
238
244
  filter: $background-img-brightness;
239
245
  }
240
246
 
241
- .btn--primary,
242
- .btn-primary,
243
- .btn-next,
244
- .featured-block__btn {
245
- @include btnStyles($color-btn, $color-btn-text);
247
+ @if $color-btn != null {
248
+ .btn--primary,
249
+ .btn-primary,
250
+ .btn-next,
251
+ .featured-block__btn {
252
+ @include btnStyles($color-btn, $color-btn-text);
246
253
 
247
- .btn__spinner::after {
248
- border: 4px solid darken($color-btn, 20%);
249
- border-right-color: contrastText($color-btn, $color-white, $color-charcoal7);
250
- border-top-color: contrastText($color-btn, $color-white, $color-charcoal7);
254
+ .btn__spinner::after {
255
+ border: 4px solid darken($color-btn, 20%);
256
+ border-right-color: btnColorContrast($color-btn, $color-white, $color-charcoal7);
257
+ border-top-color: btnColorContrast($color-btn, $color-white, $color-charcoal7);
258
+ }
251
259
  }
252
260
  }
253
261