vanilla-framework 3.8.2 → 3.9.0

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 (35) hide show
  1. package/package.json +8 -8
  2. package/scss/_base_button.scss +6 -7
  3. package/scss/_base_code.scss +3 -3
  4. package/scss/_base_forms-range.scss +1 -1
  5. package/scss/_base_forms.scss +25 -12
  6. package/scss/_base_hr.scss +7 -7
  7. package/scss/_base_placeholders.scss +2 -2
  8. package/scss/_layouts_fluid-breakout.scss +2 -2
  9. package/scss/_patterns_card.scss +1 -1
  10. package/scss/_patterns_chip.scss +3 -3
  11. package/scss/_patterns_contextual-menu.scss +2 -2
  12. package/scss/_patterns_form-tick-elements.scss +11 -7
  13. package/scss/_patterns_form-validation.scss +31 -4
  14. package/scss/_patterns_icons.scss +103 -103
  15. package/scss/_patterns_links.scss +1 -1
  16. package/scss/_patterns_lists.scss +4 -4
  17. package/scss/_patterns_logo-section.scss +4 -4
  18. package/scss/_patterns_matrix.scss +2 -2
  19. package/scss/_patterns_modal.scss +2 -2
  20. package/scss/_patterns_navigation.scss +5 -5
  21. package/scss/_patterns_notifications.scss +2 -2
  22. package/scss/_patterns_search-and-filter.scss +5 -4
  23. package/scss/_patterns_search-box.scss +9 -7
  24. package/scss/_patterns_segmented-control.scss +1 -1
  25. package/scss/_patterns_side-navigation.scss +1 -1
  26. package/scss/_patterns_strip.scss +2 -2
  27. package/scss/_patterns_switch.scss +2 -2
  28. package/scss/_patterns_table-sortable.scss +2 -2
  29. package/scss/_settings_colors.scss +16 -1
  30. package/scss/_settings_grid.scss +1 -1
  31. package/scss/_settings_placeholders.scss +2 -2
  32. package/scss/_settings_spacing.scss +1 -1
  33. package/scss/_utilities_font-metrics.scss +5 -5
  34. package/scss/_utilities_margin-collapse.scss +1 -1
  35. package/scss/_utilities_vertical-spacing.scss +1 -1
@@ -57,7 +57,7 @@
57
57
  border-bottom: 1px solid $colors--light-theme--border-default;
58
58
  content: '';
59
59
  flex-grow: 1;
60
- margin: $spv--x-large 0 calc(#{$spv--x-large} - 1px) 0;
60
+ margin: $spv--x-large 0 calc($spv--x-large - 1px) 0;
61
61
  }
62
62
 
63
63
  &::after {
@@ -278,13 +278,13 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
278
278
 
279
279
  &::before {
280
280
  // Need to account for the 1px border:
281
- line-height: calc(#{$bullet-width-mobile} - 2px);
281
+ line-height: calc($bullet-width-mobile - 2px);
282
282
  margin-right: $sph--large;
283
283
  width: $bullet-width-mobile;
284
284
 
285
285
  @media (min-width: $breakpoint-heading-threshold) {
286
286
  // Need to account for the 1px border:
287
- line-height: calc(#{$bullet-width} - 2px);
287
+ line-height: calc($bullet-width - 2px);
288
288
  width: $bullet-width;
289
289
  }
290
290
  }
@@ -324,14 +324,14 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
324
324
 
325
325
  &::before {
326
326
  // Need to account for the 1px border:
327
- line-height: calc(#{$bullet-width-mobile} - 2px);
327
+ line-height: calc($bullet-width-mobile - 2px);
328
328
  margin-right: $sph--large;
329
329
  margin-top: $bullet-margin-mobile;
330
330
  width: $bullet-width-mobile;
331
331
 
332
332
  @media (min-width: $breakpoint-heading-threshold) {
333
333
  // Need to account for the 1px border:
334
- line-height: calc(#{$bullet-width} - 2px);
334
+ line-height: calc($bullet-width - 2px);
335
335
  margin-top: $bullet-margin;
336
336
  width: $bullet-width;
337
337
  }
@@ -87,7 +87,7 @@
87
87
  @if $rem-contribution == 0 {
88
88
  width: $percentage-contribution;
89
89
  } @else {
90
- width: calc(#{$percentage-contribution} - #{$rem-contribution});
90
+ width: calc($percentage-contribution - $rem-contribution);
91
91
  }
92
92
  }
93
93
 
@@ -112,16 +112,16 @@
112
112
  margin-bottom: $spv--x-large;
113
113
  // negates the margin of logos that sit in the first column
114
114
  margin-left: -#{$margin-small};
115
- width: calc(100% + #{$margin-small});
115
+ width: calc(100% + $margin-small);
116
116
 
117
117
  @media (min-width: $threshold-4-6-col) {
118
118
  margin-left: -$margin-medium;
119
- width: calc(100% + #{$margin-medium});
119
+ width: calc(100% + $margin-medium);
120
120
  }
121
121
 
122
122
  @media (min-width: $threshold-6-12-col) {
123
123
  margin-left: -$margin-large;
124
- width: calc(100% + #{$margin-large});
124
+ width: calc(100% + $margin-large);
125
125
  }
126
126
  }
127
127
 
@@ -19,7 +19,7 @@
19
19
  display: flex;
20
20
  flex: 1 1 auto;
21
21
  padding-bottom: $spv--large;
22
- padding-top: calc(#{$spv--large} - 1px);
22
+ padding-top: calc($spv--large - 1px);
23
23
 
24
24
  &:first-child {
25
25
  border-top: none;
@@ -118,7 +118,7 @@
118
118
  padding-right: $sph--large;
119
119
 
120
120
  @media (min-width: $breakpoint-large) {
121
- width: calc(100% - #{$matrix-img-width + $matrix-img-gutter});
121
+ width: calc(100% - ($matrix-img-width + $matrix-img-gutter));
122
122
  }
123
123
  }
124
124
 
@@ -17,7 +17,7 @@
17
17
  right: 0;
18
18
  top: 0;
19
19
  width: 100%;
20
- z-index: 101;
20
+ z-index: 150; // render on top of any other content or layout elements
21
21
  }
22
22
 
23
23
  .p-modal__dialog {
@@ -27,7 +27,7 @@
27
27
 
28
28
  left: $sph--x-large;
29
29
  margin-bottom: 0;
30
- max-height: calc(100% - #{2 * $spv--large});
30
+ max-height: calc(100% - 2 * $spv--large);
31
31
  max-width: $grid-max-width;
32
32
  overflow: auto;
33
33
  padding-top: 0;
@@ -412,13 +412,13 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
412
412
  height: $spv--large;
413
413
  pointer-events: none;
414
414
  position: absolute;
415
- right: calc(#{$sph--small} + 1px); // 1px for the border on selects. this aligns it with any selects underneath
415
+ right: calc($sph--small + 1px); // 1px for the border on selects. this aligns it with any selects underneath
416
416
  text-indent: calc(100% + 10rem);
417
- top: calc(#{$spv--medium} + #{map-get($nudges, x-small)});
417
+ top: calc($spv--medium + map-get($nudges, x-small));
418
418
  width: map-get($icon-sizes, default);
419
419
 
420
420
  @media (min-width: $breakpoint-navigation-threshold) {
421
- top: calc(#{$spv--large} + #{map-get($nudges, x-small)});
421
+ top: calc($spv--large + map-get($nudges, x-small));
422
422
  }
423
423
  }
424
424
  }
@@ -543,7 +543,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
543
543
  position: absolute;
544
544
  right: map-get($grid-margin-widths, small);
545
545
  text-indent: calc(100% + 10rem);
546
- top: calc(#{$spv--large} + #{map-get($nudges, x-small)});
546
+ top: calc($spv--large + map-get($nudges, x-small));
547
547
  width: map-get($icon-sizes, default);
548
548
 
549
549
  @media (min-width: $threshold-4-6-col) {
@@ -551,7 +551,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
551
551
  }
552
552
 
553
553
  @media (min-width: $breakpoint-navigation-threshold) {
554
- right: calc(#{$sph--small} + 1px); // 1px for the border on selects. this aligns it with any selects underneath
554
+ right: calc($sph--small + 1px); // 1px for the border on selects. this aligns it with any selects underneath
555
555
  }
556
556
  }
557
557
 
@@ -81,9 +81,9 @@ $notification-text-margin-bottom: $spv--large - $spv-nudge;
81
81
  background-size: map-get($icon-sizes, default);
82
82
  border-radius: 0 $border-radius $border-radius 0;
83
83
  margin-bottom: $spv--x-large;
84
- padding-bottom: calc(#{$spv--small} - 1px);
84
+ padding-bottom: calc($spv--small - 1px);
85
85
  padding-left: $notification-content-icon-space;
86
- padding-top: calc(#{$spv--small} - 1px);
86
+ padding-top: calc($spv--small - 1px);
87
87
  position: relative;
88
88
 
89
89
  &::before {
@@ -19,15 +19,15 @@
19
19
  // When the search and filter is not expanded, but is overflowing with chips, we need to
20
20
  // specify a height that matches that of a standard input element. This height is a combination
21
21
  // of an input's line-height, its vertical padding, and a nudge.
22
- $input-height: calc(#{map-get($line-heights, default-text)} + #{$input-vertical-padding} + #{$spv-nudge} - 1px);
22
+ $input-height: calc(map-get($line-heights, default-text) + $input-vertical-padding + $spv-nudge - $input-border-thickness);
23
23
 
24
24
  .p-search-and-filter {
25
- border: 1px solid $colors--light-theme--border-high-contrast;
25
+ border-bottom: $input-border-thickness solid $colors--light-theme--border-high-contrast;
26
26
  position: relative;
27
27
 
28
28
  .p-search-and-filter__search-container {
29
29
  align-items: center;
30
- background-color: $color-x-light;
30
+ background-color: $colors--light-theme--background-inputs;
31
31
  display: flex;
32
32
  flex-wrap: wrap;
33
33
  height: auto;
@@ -72,7 +72,7 @@
72
72
  .p-search-and-filter__panel {
73
73
  @include vf-transition(opacity, fast);
74
74
 
75
- background: $color-x-light;
75
+ background-color: $colors--light-theme--background-inputs;
76
76
  border-radius: $border-radius;
77
77
  box-shadow: $box-shadow;
78
78
  opacity: 1;
@@ -100,6 +100,7 @@
100
100
 
101
101
  .p-search-and-filter__clear {
102
102
  @extend %vf-button-has-icon;
103
+ background-color: $colors--light-theme--background-inputs;
103
104
 
104
105
  border: none;
105
106
  bottom: $focus-outline-offset;
@@ -1,9 +1,7 @@
1
1
  @mixin vf-p-search-box {
2
- $input-border-thicknes: 1px;
3
-
4
2
  %search-box-button {
5
3
  display: block;
6
- height: calc(#{2 * $spv-nudge + map-get($line-heights, default-text)} - #{2 * $bar-thickness}); // side padding + icon width - focus outline width * 2
4
+ height: calc((2 * $spv-nudge + map-get($line-heights, default-text)) - (2 * $bar-thickness)); // side padding + icon width - focus outline width * 2
7
5
  margin: $bar-thickness 0;
8
6
  position: relative;
9
7
 
@@ -43,7 +41,7 @@
43
41
  .p-search-box__input {
44
42
  flex: 1 1 100%;
45
43
  margin-bottom: 0;
46
- padding-right: calc(2 * #{2 * $spv-nudge + map-get($line-heights, default-text)});
44
+ padding-right: calc(2 * (2 * $spv-nudge + map-get($line-heights, default-text)));
47
45
  position: absolute;
48
46
  right: 0;
49
47
 
@@ -124,7 +122,7 @@
124
122
 
125
123
  @mixin vf-search-box-light-theme {
126
124
  @include vf-search-box-theme(
127
- $color-search-box-background: $colors--light-theme--background-default,
125
+ $color-search-box-background: $colors--light-theme--background-inputs,
128
126
  $color-search-box-border: $colors--light-theme--border-high-contrast,
129
127
  $color-search-box-text: $colors--light-theme--text-default
130
128
  );
@@ -132,8 +130,12 @@
132
130
 
133
131
  @mixin vf-search-box-dark-theme {
134
132
  @include vf-search-box-theme(
135
- $color-search-box-background: $colors--dark-theme--background-default,
136
- $color-search-box-border: $colors--dark-theme--border-high-contrast,
133
+ $color-search-box-background: lighten($colors--dark-theme--background-default, 10%),
134
+ $color-search-box-border: $color-x-light,
137
135
  $color-search-box-text: $colors--dark-theme--text-default
138
136
  );
137
+
138
+ &::placeholder {
139
+ color: $colors--dark-theme--text-default;
140
+ }
139
141
  }
@@ -33,7 +33,7 @@
33
33
  position: absolute;
34
34
  right: 0;
35
35
  top: 0;
36
- width: 1px;
36
+ width: $input-border-thickness;
37
37
  }
38
38
  }
39
39
 
@@ -179,7 +179,7 @@
179
179
  border-bottom-style: solid;
180
180
  border-bottom-width: 1px;
181
181
  margin-bottom: $spv--small;
182
- padding-bottom: calc(#{$spv--small} - 1px); // compensate for border thickness
182
+ padding-bottom: calc($spv--small - 1px); // compensate for border thickness
183
183
  padding-left: 0.25rem; // nudge to visually align icon with text
184
184
  padding-top: $spv--small;
185
185
  position: sticky;
@@ -130,7 +130,7 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
130
130
  $padding: 3rem;
131
131
 
132
132
  background-position: 0% 0%, top right, right 0 bottom $padding, right bottom, 0% 0%;
133
- background-size: 100% calc(100% - #{$padding}), 100% 100%, 100% $padding, 100% $padding, auto;
133
+ background-size: 100% calc(100% - $padding), 100% 100%, 100% $padding, 100% $padding, auto;
134
134
  margin-bottom: -$padding;
135
135
  padding-bottom: ($padding * 3) !important;
136
136
 
@@ -138,7 +138,7 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
138
138
  $padding: 6rem;
139
139
 
140
140
  background-position: 0% 0%, top right, right 0 bottom $padding, right bottom, 0% 0%;
141
- background-size: 100% calc(100% - #{$padding}), 50% 100%, 100% $padding, 100% $padding, auto;
141
+ background-size: 100% calc(100% - $padding), 50% 100%, 100% $padding, 100% $padding, auto;
142
142
  margin-bottom: -$padding;
143
143
  padding-bottom: ($padding * 3) !important;
144
144
  }
@@ -13,7 +13,7 @@ $knob-size: $sp-unit * 2;
13
13
  position: absolute;
14
14
 
15
15
  &:checked + .p-switch__slider::before {
16
- border: 1px solid $color-link;
16
+ border: $input-border-thickness solid $color-link;
17
17
  left: 50%;
18
18
  }
19
19
 
@@ -50,7 +50,7 @@ $knob-size: $sp-unit * 2;
50
50
  @include vf-transition($duration: slow);
51
51
 
52
52
  background: $color-x-light;
53
- border: 1px solid $color-mid-dark;
53
+ border: $input-border-thickness solid $color-mid-dark;
54
54
  border-radius: 50%;
55
55
  content: '';
56
56
  height: $knob-size;
@@ -15,8 +15,8 @@
15
15
  display: inline-block;
16
16
  margin-left: $sp-x-small;
17
17
  // table heading text is smaller than the icon, so we need to compensate with negative top margin
18
- margin-top: calc(#{map-get($font-sizes, x-small)}rem - #{$default-icon-size});
19
- vertical-align: calc(#{$vertical-offset} + #{0.5 * $cap-height} - #{0.5 * $default-icon-size});
18
+ margin-top: calc(#{map-get($font-sizes, x-small)}rem - $default-icon-size);
19
+ vertical-align: calc($vertical-offset + 0.5 * $cap-height - 0.5 * $default-icon-size);
20
20
  }
21
21
 
22
22
  // stylelint-disable selector-max-type -- table elements can use selector types
@@ -38,8 +38,9 @@ $color-focus-positive: #003008 !default;
38
38
  $color-focus-negative: #3b0006 !default;
39
39
 
40
40
  // Button background color changes
41
+ $input-background-opacity-amount: 0.04;
41
42
  $hover-background-opacity-amount: 0.05;
42
- $active-background-opacity-amount: 0.1;
43
+ $active-background-opacity-amount: 0.08;
43
44
 
44
45
  $muted-text-opacity-amount: 0.6;
45
46
  $inactive-text-opacity-amount: 0.75;
@@ -50,6 +51,19 @@ $color-code-background: rgba($color-x-dark, 0.03);
50
51
  $color-code-background-dark: rgba($color-x-light, 0.3);
51
52
  $color-code-heading-background: rgba($color-x-dark, 0.08);
52
53
 
54
+ // Background colours for form elements
55
+ $color-positive-background: #edf8eb;
56
+ $color-positive-background--hover: #e5f6e2;
57
+ $color-positive-background--focus: #e0f4dc;
58
+
59
+ $color-caution-background: #f8efe8;
60
+ $color-caution-background--hover: #f5e7dd;
61
+ $color-caution-background--focus: #f3e2d6;
62
+
63
+ $color-negative-background: #f8e9e8;
64
+ $color-negative-background--hover: #f5dfdd;
65
+ $color-negative-background--focus: #f3d8d6;
66
+
53
67
  $states: (
54
68
  error: $color-negative,
55
69
  caution: $color-caution,
@@ -85,6 +99,7 @@ $colors--light-theme--text-inactive: rgba($color-x-dark, $inactive-text-opacity-
85
99
 
86
100
  $colors--light-theme--background-default: #fff !default;
87
101
  $colors--light-theme--background-alt: #f7f7f7 !default;
102
+ $colors--light-theme--background-inputs: adjust-color($color-x-dark, $lightness: 100% * (1 - $input-background-opacity-amount)) !default;
88
103
  $colors--light-theme--background-active: adjust-color($color-x-dark, $lightness: 100% * (1 - $active-background-opacity-amount)) !default;
89
104
  $colors--light-theme--background-hover: adjust-color($color-x-dark, $lightness: 100% * (1 - $hover-background-opacity-amount)) !default;
90
105
  $colors--light-theme--background-overlay: transparentize($color-dark, 0.15) !default;
@@ -28,4 +28,4 @@ $grid-margin-widths: (
28
28
  $l-fluid-breakout-max-width: $grid-max-width !default;
29
29
  $l-fluid-breakout-aside-width: 14rem !default;
30
30
  $l-fluid-breakout-main-child-width: 13rem !default;
31
- $l-fluid-breakout-3-col-threshold: calc(#{$grid-max-width} + #{$l-fluid-breakout-aside-width});
31
+ $l-fluid-breakout-3-col-threshold: calc($grid-max-width + $l-fluid-breakout-aside-width);
@@ -2,9 +2,9 @@
2
2
  @import 'settings_colors';
3
3
 
4
4
  // Global placeholder settings
5
-
5
+ $input-border-thickness: 1.5px;
6
6
  $bar-thickness: 0.1875rem !default; // 3px at 16px fontsize, expressed in rems so it scales with text if the root font-size changes at a breakpoint
7
7
  $border-radius: $sp-unit * 0.25 !default;
8
- $border: 1px solid $color-mid-light !default;
8
+ $border: $input-border-thickness solid $color-mid-light !default;
9
9
  $box-shadow: 0 1px 1px 0 transparentize($color-x-dark, 0.85), 0 2px 2px -1px transparentize($color-x-dark, 0.85), 0 0 3px 0 transparentize($color-x-dark, 0.8) !default;
10
10
  $box-shadow--deep: 0 0 2rem 0 rgba($color-x-dark, $shadow-opacity) !default;
@@ -105,7 +105,7 @@ $sp-after: (
105
105
  $spv-nudge: map-get($nudges, p) !default; // top: nudge; bottom: unit - nudge; result: height = exact multiple of base unit
106
106
  $spv-nudge-compensation: $sp-unit - $spv-nudge !default;
107
107
  $input-margin-bottom: $sp-unit * 4 - $spv-nudge * 2;
108
- $input-vertical-padding: calc(#{$spv-nudge} - 1px);
108
+ $input-vertical-padding: calc($spv-nudge - 1px);
109
109
 
110
110
  // tick element variables
111
111
  $form-tick-box-size: 1rem;
@@ -11,11 +11,11 @@
11
11
  border-top-style: solid;
12
12
  border-width: 1px;
13
13
  content: '';
14
- height: calc(#{$cap-height - $x-height});
14
+ height: calc($cap-height - $x-height);
15
15
  left: -#{$horizontal-bleed};
16
16
  position: absolute;
17
- top: calc(#{$baseline-position - $cap-height} - 1px);
18
- width: calc(#{$horizontal-bleed * 2} + 100%);
17
+ top: calc($baseline-position - $cap-height - 1px);
18
+ width: calc($horizontal-bleed * 2 + 100%);
19
19
  }
20
20
 
21
21
  &::after {
@@ -24,8 +24,8 @@
24
24
  height: 1px;
25
25
  left: -#{$horizontal-bleed};
26
26
  position: absolute;
27
- top: calc(#{$baseline-position} - 1px);
28
- width: calc(#{$horizontal-bleed * 2} + 100%);
27
+ top: calc($baseline-position - 1px);
28
+ width: calc($horizontal-bleed * 2 + 100%);
29
29
  }
30
30
  }
31
31
  }
@@ -23,6 +23,6 @@
23
23
 
24
24
  .u-table-cell-padding-overlap {
25
25
  margin-bottom: -#{$table-cell-vertical-padding} !important;
26
- margin-top: calc(-#{$table-cell-vertical-padding} - 1px) !important;
26
+ margin-top: calc(-1 * $table-cell-vertical-padding - 1px) !important;
27
27
  }
28
28
  }
@@ -12,7 +12,7 @@
12
12
  &::after {
13
13
  @extend %u-vertical-spacer;
14
14
 
15
- margin-top: calc(#{$sp-unit * $i} - 1px); // subtracting the element height, which is set to 1px above.
15
+ margin-top: calc($sp-unit * $i - 1px); // subtracting the element height, which is set to 1px above.
16
16
  }
17
17
  }
18
18
  }