vanilla-framework 3.0.0-beta.1 → 3.0.1

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.
@@ -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,
@@ -56,10 +56,10 @@
56
56
  overflow: visible;
57
57
  }
58
58
 
59
- &[aria-label]::before {
60
- content: attr(aria-label);
59
+ &[data-heading]::before {
60
+ content: attr(data-heading);
61
61
  display: block;
62
- margin-bottom: map-get($sp-after, x-small) - map-get($nudges, nudge--x-small) - $sp-unit;
62
+ margin-bottom: map-get($sp-after, x-small) - map-get($nudges, x-small) - $sp-unit;
63
63
  overflow: hidden;
64
64
  padding-left: 0;
65
65
  padding-right: 0;
@@ -39,7 +39,8 @@ $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
  $muted-text-opacity-amount: 0.6;
44
45
  $inactive-text-opacity-amount: 0.75;
45
46
 
@@ -92,6 +93,42 @@ $colors--light-theme--border-default: rgba($color-x-dark, 0.15) !default;
92
93
  $colors--light-theme--border-high-contrast: rgba($color-x-dark, 0.56) !default;
93
94
  $colors--light-theme--border-low-contrast: rgba($color-x-dark, 0.1) !default;
94
95
 
96
+ $colors-light-theme--tinted-backgrounds: (
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
+ ),
122
+ );
123
+
124
+ $colors-light-theme--tinted-borders: (
125
+ neutral: $colors--light-theme--border-high-contrast,
126
+ positive: $color-positive,
127
+ caution: hsl(27deg 100% 39%),
128
+ negative: $color-negative,
129
+ information: $color-information,
130
+ );
131
+
95
132
  // Dark theme
96
133
  $colors--dark-theme--text-default: hsl(0, 0%, 100%) !default;
97
134
  $colors--dark-theme--text-hover: hsl(0, 0%, 76%) !default; // minimum contrast on primary that satisfies contrast checker AA
@@ -105,9 +142,45 @@ $colors--dark-theme--background-hover: rgba($colors--dark-theme--text-default, $
105
142
  $colors--dark-theme--background-overlay: transparentize($color-dark, 0.15) !default;
106
143
 
107
144
  $colors--dark-theme--border-default: rgba($colors--dark-theme--text-default, 0.2) !default;
108
- $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;
109
146
  $colors--dark-theme--border-low-contrast: rgba($colors--dark-theme--text-default, 0.1) !default;
110
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
+
111
184
  // Branding colors
112
185
  $color-brand: #333 !default;
113
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
@@ -8,27 +8,26 @@ $sp-unit-ratio: 0.5 !default;
8
8
  $sp-unit: 1rem * $sp-unit-ratio !default;
9
9
 
10
10
  $font-sizes: (
11
- x-small: pow($ms-ratio, -2),
12
- small: pow($ms-ratio, -1),
13
- root: 1,
14
- h4-mobile: 1.22176,
15
- h4: pow($ms-ratio, 2),
16
- h3-mobile: pow($ms-ratio, 3),
17
- h3: pow($ms-ratio, 4),
18
- h2-mobile: 1.83274,
19
- h2: pow($ms-ratio, 6),
20
- h1-mobile: pow($ms-ratio, 6),
21
11
  h1: pow($ms-ratio, 8),
12
+ h1-mobile: pow($ms-ratio, 6),
13
+ h2: pow($ms-ratio, 6),
14
+ h2-mobile: 1.83274,
15
+ h3: pow($ms-ratio, 4),
16
+ h3-mobile: pow($ms-ratio, 3),
17
+ h4: pow($ms-ratio, 2),
18
+ h4-mobile: 1.22176,
19
+ small: pow($ms-ratio, -1),
20
+ x-small: pow($ms-ratio, -2),
22
21
  );
23
22
 
24
23
  $line-heights: (
25
24
  h1: 7 * $sp-unit,
26
- h2: 6 * $sp-unit,
27
- h3: 5 * $sp-unit,
28
- h4: 4 * $sp-unit,
29
25
  h1-mobile: 6 * $sp-unit,
26
+ h2: 6 * $sp-unit,
30
27
  h2-mobile: 5 * $sp-unit,
28
+ h3: 5 * $sp-unit,
31
29
  h3-mobile: 4 * $sp-unit,
30
+ h4: 4 * $sp-unit,
32
31
  h4-mobile: 3 * $sp-unit,
33
32
  default-text: 3 * $sp-unit,
34
33
  small: 2.5 * $sp-unit,
@@ -37,36 +36,36 @@ $line-heights: (
37
36
 
38
37
  // baseline nudges for type scale ratio of (16/14)^2
39
38
  $nudges: (
40
- nudge--h1-large: 0.15rem,
41
- nudge--h4-large: 0,
42
- nudge--h1: 0.2rem,
43
- nudge--h2: 0.2rem,
44
- nudge--h3: 0.1rem,
45
- nudge--h4: 0.05rem,
46
- nudge--h6: 0.338rem,
47
- nudge--h6-large: 0.345rem,
48
- nudge--h1-mobile: 0.165rem,
49
- nudge--h2-mobile: 0.1rem,
50
- nudge--h3-mobile: 0.5rem,
51
- nudge--h4-mobile: 0.3rem,
52
- nudge--p: 0.4rem,
53
- nudge--p-ubuntumono: 0.45rem,
54
- nudge--small: 0.05rem,
55
- nudge--x-small: 0.25rem,
39
+ h1-large: 0.15rem,
40
+ h1-mobile: 0.165rem,
41
+ h1: 0.2rem,
42
+ h2: 0.2rem,
43
+ h2-mobile: 0.1rem,
44
+ h3: 0.1rem,
45
+ h3-mobile: 0.5rem,
46
+ h4-large: 0,
47
+ h4: 0.05rem,
48
+ h4-mobile: 0.3rem,
49
+ h6: 0.338rem,
50
+ h6-large: 0.345rem,
51
+ p: 0.4rem,
52
+ p-ubuntumono: 0.45rem,
53
+ small: 0.05rem,
54
+ x-small: 0.25rem,
56
55
  ) !default;
57
56
 
58
57
  // Correct baseline drift due to browser rounding. (Visible in text > 1000 lines)
59
58
  // It is applied only to padding-top.
60
59
  $browser-rounding-compensations: (
61
- small: 0.0005rem,
62
- small-largescreen: 0.0006rem,
63
- p: 0.0005rem,
64
- h6: 0,
65
- h5: 0.001rem,
66
- h4: 0.001rem,
67
- h3: 0.001rem,
68
- h2: 0.001rem,
69
60
  h1: 0.001rem,
61
+ h2: 0.001rem,
62
+ h3: 0.001rem,
63
+ h4: 0.001rem,
64
+ h5: 0.001rem,
65
+ h6: 0,
66
+ p: 0.0005rem,
67
+ small-largescreen: 0.0006rem,
68
+ small: 0.0005rem,
70
69
  ) !default;
71
70
 
72
71
  // Main spacing variables. spv stands spacing-vertical; sph stands for spacing-horizontal.
@@ -79,6 +78,7 @@ $spv--x-large: $sp-unit * 3 !default;
79
78
  $spv--strip-regular: $sp-unit * 8 !default;
80
79
  $spv--strip-deep: $sp-unit * 12 !default;
81
80
 
81
+ $sph--x-small: $sp-unit * 0.5 !default; // to be used in place of an inline space between characters/words
82
82
  $sph--small: $sp-unit !default;
83
83
  $sph--large: $sp-unit * 2 !default;
84
84
  $sph--x-large: $sp-unit * 3 !default;
@@ -86,23 +86,23 @@ $sph--x-large: $sp-unit * 3 !default;
86
86
  // Space after text elements
87
87
  $sp-after: (
88
88
  h1: $spv--large,
89
+ h1-mobile: $spv--large,
89
90
  h2: $spv--large,
91
+ h2-mobile: $spv--large,
90
92
  h3: $spv--large,
93
+ h3-mobile: $spv--large,
91
94
  h4: $spv--large,
95
+ h4-mobile: $spv--large,
92
96
  p: $spv--x-large,
93
97
  p-dense: $spv--large,
94
- h1-mobile: $spv--large,
95
- h2-mobile: $spv--large,
96
- h3-mobile: $spv--large,
97
- h4-mobile: $spv--large,
98
+ default-text: $sp-unit,
98
99
  small: $spv--large,
99
100
  small--dense: $spv--large,
100
101
  x-small: $spv--large,
101
- default-text: $sp-unit,
102
102
  ) !default;
103
103
 
104
104
  // commonly occuring calculations available as variables
105
- $spv-nudge: map-get($nudges, nudge--p) !default; // top: nudge; bottom: unit - nudge; result: height = exact multiple of base unit
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
108
  $input-vertical-padding: calc(#{$spv-nudge} - 1px);
@@ -115,10 +115,10 @@ $form-tick-box-nudge: 0.15rem; // to nudge the tick box a bit below baseline (to
115
115
  $form-radio-inner-circle-diameter: 0.375rem;
116
116
  $form-radio-circle-offset: 0.5 * ($form-tick-box-size - $form-radio-inner-circle-diameter);
117
117
 
118
- $max-width--default: 40em !default;
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;
@@ -60,10 +60,10 @@
60
60
  }
61
61
 
62
62
  .u-align-text--small-to-default {
63
- padding-top: map-get($nudges, nudge--small) + $sp-unit;
63
+ padding-top: map-get($nudges, small) + $sp-unit;
64
64
  }
65
65
 
66
66
  .u-align-text--x-small-to-default {
67
- padding-top: map-get($nudges, nudge--x-small) + $sp-unit;
67
+ padding-top: map-get($nudges, x-small) + $sp-unit;
68
68
  }
69
69
  }