vanilla-framework 3.0.0-beta.2 → 3.1.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.
@@ -288,6 +288,8 @@
288
288
  li > strong,
289
289
  li > a {
290
290
  @extend %side-navigation__text;
291
+
292
+ display: block;
291
293
  }
292
294
 
293
295
  li li > span,
@@ -357,11 +359,11 @@
357
359
  #{$prop}: $multiplier * map-get($grid-margin-widths, small) + $offset;
358
360
 
359
361
  @media (min-width: $threshold-4-6-col) {
360
- #{$prop}: $multiplier * map-get($grid-margin-widths, medium) + $offset;
362
+ #{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
361
363
  }
362
364
 
363
365
  @media (min-width: $threshold-6-12-col) {
364
- #{$prop}: $multiplier * map-get($grid-margin-widths, large) + $offset;
366
+ #{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
365
367
  }
366
368
  }
367
369
 
@@ -1,8 +1,9 @@
1
1
  @import 'settings';
2
- $knob-size: $sp-unit * 3;
2
+ $knob-size: $sp-unit * 2;
3
3
 
4
4
  @mixin vf-p-switch {
5
5
  .p-switch {
6
+ align-items: center;
6
7
  display: flex;
7
8
  }
8
9
 
@@ -12,6 +13,7 @@ $knob-size: $sp-unit * 3;
12
13
  position: absolute;
13
14
 
14
15
  &:checked + .p-switch__slider::before {
16
+ border: 1px solid $color-link;
15
17
  left: 50%;
16
18
  }
17
19
 
@@ -19,6 +21,10 @@ $knob-size: $sp-unit * 3;
19
21
  @extend %vf-disabled-element;
20
22
  }
21
23
 
24
+ &:checked + .p-switch__slider {
25
+ background: $color-link;
26
+ }
27
+
22
28
  &:focus {
23
29
  outline: none;
24
30
 
@@ -29,9 +35,8 @@ $knob-size: $sp-unit * 3;
29
35
  }
30
36
 
31
37
  .p-switch__slider {
32
- @extend %vf-has-round-corners;
33
-
34
- background: linear-gradient(to right, $color-link 50%, $color-mid-light 50%);
38
+ background: $color-mid-light;
39
+ border-radius: $knob-size;
35
40
  box-shadow: inset 0 2px 5px 0 transparentize($color-dark, 0.8);
36
41
  display: inline-block;
37
42
  height: $knob-size;
@@ -45,6 +50,8 @@ $knob-size: $sp-unit * 3;
45
50
  @include vf-animation($duration: slow);
46
51
 
47
52
  background: $color-x-light;
53
+ border: 1px solid $color-mid-dark;
54
+ border-radius: 50%;
48
55
  content: '';
49
56
  height: $knob-size;
50
57
  left: 0;
@@ -20,10 +20,6 @@
20
20
  flow: row;
21
21
  wrap: wrap;
22
22
  }
23
-
24
- + tr {
25
- margin: 0;
26
- }
27
23
  }
28
24
 
29
25
  th,
@@ -27,16 +27,13 @@
27
27
  tr {
28
28
  border: $border;
29
29
  border-radius: $border-radius;
30
- display: grid;
31
- grid-gap: 0 map-get($grid-gutter-widths, small);
32
- grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
33
- grid-template-rows: auto;
30
+ display: block;
34
31
  margin-bottom: $spv--x-large;
35
32
  padding: 0 $sph--large;
36
33
  }
37
-
38
34
  td,
39
35
  tbody th {
36
+ display: block;
40
37
  min-width: 100%;
41
38
  overflow: hidden;
42
39
  padding-left: 0;
@@ -56,8 +53,8 @@
56
53
  overflow: visible;
57
54
  }
58
55
 
59
- &[aria-label]::before {
60
- content: attr(aria-label);
56
+ &[data-heading]::before {
57
+ content: attr(data-heading);
61
58
  display: block;
62
59
  margin-bottom: map-get($sp-after, x-small) - map-get($nudges, x-small) - $sp-unit;
63
60
  overflow: hidden;
@@ -39,7 +39,7 @@ $color-focus-negative: #3b0006 !default;
39
39
 
40
40
  // Button background color changes
41
41
  $hover-background-opacity-amount: 0.05;
42
- $active-background-opacity-amount: 0.08;
42
+ $active-background-opacity-amount: 0.1;
43
43
 
44
44
  $muted-text-opacity-amount: 0.6;
45
45
  $inactive-text-opacity-amount: 0.75;
@@ -93,19 +93,38 @@ $colors--light-theme--border-default: rgba($color-x-dark, 0.15) !default;
93
93
  $colors--light-theme--border-high-contrast: rgba($color-x-dark, 0.56) !default;
94
94
  $colors--light-theme--border-low-contrast: rgba($color-x-dark, 0.1) !default;
95
95
 
96
- //XXX: add dark theme versions of tinted background and border colours for use with dark theme chips, notificaitons, etc.
97
96
  $colors-light-theme--tinted-backgrounds: (
98
- neutral: #f2f2f2,
99
- positive: #e8fdec,
100
- caution: #fef1dc,
101
- negative: #fce8ea,
102
- information: #e5f2ff,
97
+ neutral: (
98
+ default: #f2f2f2,
99
+ hover: adjust-color(#f2f2f2, $lightness: -100% * $hover-background-opacity-amount, $saturation: -100% * 2 * $hover-background-opacity-amount),
100
+ active: adjust-color(#f2f2f2, $lightness: -100% * $active-background-opacity-amount, $saturation: -100% * 2 * $active-background-opacity-amount),
101
+ ),
102
+ positive: (
103
+ default: hsl(129deg 90% 39% / 10%),
104
+ hover: hsl(129deg 100% 39% / #{10% + $hover-background-opacity-amount * 100%}),
105
+ active: hsl(129deg 100% 39% / #{10% + $active-background-opacity-amount * 100%}),
106
+ ),
107
+ caution: (
108
+ default: hsl(27deg 100% 39% / 10%),
109
+ hover: hsl(27deg 100% 39% / #{10% + $hover-background-opacity-amount * 100%}),
110
+ active: hsl(27deg 100% 39% / #{10% + $active-background-opacity-amount * 100%}),
111
+ ),
112
+ negative: (
113
+ default: hsl(354deg 100% 39% / 10%),
114
+ hover: hsl(354deg 100% 39% / #{10% + $hover-background-opacity-amount * 100%}),
115
+ active: hsl(354deg 100% 39% / #{10% + $active-background-opacity-amount * 100%}),
116
+ ),
117
+ information: (
118
+ default: hsl(210deg 100% 39% / 10%),
119
+ hover: hsl(210deg 100% 39% / #{10% + $hover-background-opacity-amount * 100%}),
120
+ active: hsl(210deg 100% 39% / #{10% + $active-background-opacity-amount * 100%}),
121
+ ),
103
122
  );
104
123
 
105
124
  $colors-light-theme--tinted-borders: (
106
125
  neutral: $colors--light-theme--border-high-contrast,
107
126
  positive: $color-positive,
108
- caution: #ec6c04,
127
+ caution: hsl(27deg 100% 39%),
109
128
  negative: $color-negative,
110
129
  information: $color-information,
111
130
  );
@@ -123,9 +142,45 @@ $colors--dark-theme--background-hover: rgba($colors--dark-theme--text-default, $
123
142
  $colors--dark-theme--background-overlay: transparentize($color-dark, 0.15) !default;
124
143
 
125
144
  $colors--dark-theme--border-default: rgba($colors--dark-theme--text-default, 0.2) !default;
126
- $colors--dark-theme--border-high-contrast: rgba($colors--dark-theme--text-default, 0.4) !default;
145
+ $colors--dark-theme--border-high-contrast: hsl(0deg 0% 60%) !default;
127
146
  $colors--dark-theme--border-low-contrast: rgba($colors--dark-theme--text-default, 0.1) !default;
128
147
 
148
+ $colors-dark-theme--tinted-backgrounds: (
149
+ neutral: (
150
+ default: rgba(255, 255, 255, 0.15),
151
+ hover: rgba(255, 255, 255, 0.2),
152
+ active: rgba(255, 255, 255, 0.25),
153
+ ),
154
+ positive: (
155
+ default: hsl(129deg 90% 39% / 20%),
156
+ hover: hsl(129deg 100% 39% / #{20% + 2 * $hover-background-opacity-amount * 100%}),
157
+ active: hsl(129deg 100% 39% / #{20% + 2 * $active-background-opacity-amount * 100%}),
158
+ ),
159
+ caution: (
160
+ default: hsl(27deg 100% 50% / 20%),
161
+ hover: hsl(27deg 100% 60% / #{20% + 2 * $hover-background-opacity-amount * 100%}),
162
+ active: hsl(27deg 100% 50% / #{20% + 2 * $active-background-opacity-amount * 100%}),
163
+ ),
164
+ negative: (
165
+ default: hsl(353deg 100% 70% / 20%),
166
+ hover: hsl(353deg 100% 70% / #{20% + 2 * $hover-background-opacity-amount * 100%}),
167
+ active: hsl(353deg 100% 70% / #{20% + 2 * $active-background-opacity-amount * 100%}),
168
+ ),
169
+ information: (
170
+ default: hsl(210deg 100% 50% / 20%),
171
+ hover: hsl(210deg 100% 50% / #{20% + 2 * $hover-background-opacity-amount * 100%}),
172
+ active: hsl(210deg 100% 50% / #{20% + 2 * $active-background-opacity-amount * 100%}),
173
+ ),
174
+ );
175
+
176
+ $colors-dark-theme--tinted-borders: (
177
+ neutral: hsl(0deg 0% 65%),
178
+ positive: hsl(129deg 60% 65%),
179
+ caution: hsl(27deg 80% 65%),
180
+ negative: hsl(353deg 80% 70%),
181
+ information: hsl(210deg 80% 65%),
182
+ );
183
+
129
184
  // Branding colors
130
185
  $color-brand: #333 !default;
131
186
  $color-brand-dark: $color-brand !default;
@@ -16,14 +16,12 @@ $grid-large-col-prefix: #{$grid-column-prefix} !default;
16
16
 
17
17
  $grid-gutter-widths: (
18
18
  small: $sp-unit * 3,
19
- medium: $sp-unit * 4,
20
- large: $sp-unit * 4,
19
+ default: $sp-unit * 4,
21
20
  ) !default;
22
21
 
23
22
  $grid-margin-widths: (
24
23
  small: $sp-unit * 2,
25
- medium: $sp-unit * 3,
26
- large: $sp-unit * 3,
24
+ default: $sp-unit * 3,
27
25
  ) !default;
28
26
 
29
27
  // Grid breakout template
@@ -118,7 +118,7 @@ $form-radio-circle-offset: 0.5 * ($form-tick-box-size - $form-radio-inner-circle
118
118
  $text-max-width: 40em !default;
119
119
 
120
120
  $icon-sizes: (
121
- accordion: $sp-unit * 1.5,
121
+ small: $sp-unit * 1.5,
122
122
  default: $sp-unit * 2,
123
123
  heading-icon--x-small: $sp-unit * 3,
124
124
  heading-icon--small: $sp-unit * 4,
@@ -7,3 +7,4 @@ $theme-default-p-divider: 'light' !default;
7
7
  $theme-default-p-contextual-menu: 'light' !default;
8
8
  $theme-default-p-inline-list--middot: 'light' !default;
9
9
  $theme-default-p-button: 'light' !default;
10
+ $theme-default-p-chip: 'light' !default;