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.
- package/README.md +19 -21
- package/package.json +15 -15
- package/scss/_base_button.scss +1 -1
- package/scss/_base_details.scss +2 -2
- package/scss/_base_fontfaces.scss +183 -181
- package/scss/_base_forms.scss +2 -2
- package/scss/_base_grid-definitions.scss +6 -6
- package/scss/_base_hr.scss +4 -4
- package/scss/_base_placeholders.scss +12 -12
- package/scss/_base_tables.scss +2 -2
- package/scss/_base_typography-definitions.scss +50 -50
- package/scss/_base_typography.scss +2 -2
- package/scss/_layouts_fluid-breakout.scss +12 -12
- package/scss/_patterns_chip.scss +265 -53
- package/scss/_patterns_divider.scss +1 -1
- package/scss/_patterns_grid.scss +4 -4
- package/scss/_patterns_heading-icon.scss +2 -2
- package/scss/_patterns_label.scss +6 -30
- package/scss/_patterns_logo-section.scss +4 -4
- package/scss/_patterns_matrix.scss +4 -4
- package/scss/_patterns_navigation.scss +9 -9
- package/scss/_patterns_search-and-filter.scss +10 -6
- package/scss/_patterns_side-navigation.scss +2 -2
- package/scss/_patterns_switch.scss +11 -11
- package/scss/_patterns_table-expanding.scss +0 -4
- package/scss/_patterns_table-mobile-card.scss +3 -3
- package/scss/_settings_colors.scss +75 -2
- package/scss/_settings_grid.scss +2 -4
- package/scss/_settings_spacing.scss +45 -45
- package/scss/_settings_themes.scss +1 -0
- package/scss/_utilities_content-align.scss +2 -2
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
overflow: visible;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
&[
|
|
60
|
-
content: attr(
|
|
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,
|
|
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.
|
|
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:
|
|
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;
|
package/scss/_settings_grid.scss
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
118
|
+
$text-max-width: 40em !default;
|
|
119
119
|
|
|
120
120
|
$icon-sizes: (
|
|
121
|
-
|
|
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,
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.u-align-text--small-to-default {
|
|
63
|
-
padding-top: map-get($nudges,
|
|
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,
|
|
67
|
+
padding-top: map-get($nudges, x-small) + $sp-unit;
|
|
68
68
|
}
|
|
69
69
|
}
|