vanilla-framework 4.0.0-alpha.1 → 4.0.0-alpha.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": "vanilla-framework",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"@canonical/latest-news": "1.4.1",
|
|
60
60
|
"@percy/script": "1.1.0",
|
|
61
61
|
"@testing-library/cypress": "9.0.0",
|
|
62
|
-
"autoprefixer": "10.4.
|
|
63
|
-
"cypress": "12.
|
|
62
|
+
"autoprefixer": "10.4.14",
|
|
63
|
+
"cypress": "12.11.0",
|
|
64
64
|
"get-site-urls": "3.0.0",
|
|
65
65
|
"markdown-spellcheck": "1.3.1",
|
|
66
66
|
"parker": "0.0.10",
|
|
67
|
-
"postcss": "8.4.
|
|
67
|
+
"postcss": "8.4.23",
|
|
68
68
|
"postcss-cli": "9.1.0",
|
|
69
69
|
"postcss-scss": "4.0.6",
|
|
70
|
-
"prettier": "2.8.
|
|
71
|
-
"sass": "1.
|
|
70
|
+
"prettier": "2.8.8",
|
|
71
|
+
"sass": "1.62.1",
|
|
72
72
|
"stylelint": "14.16.1",
|
|
73
73
|
"stylelint-config-prettier": "9.0.5",
|
|
74
74
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
@mixin vf-base-background {
|
|
2
2
|
// stylelint-disable-next-line selector-max-type -- base styles can use type selectors
|
|
3
|
-
|
|
3
|
+
body {
|
|
4
4
|
background: $color-x-light;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
// stylelint-disable-next-line selector-max-type -- base styles can use type selectors
|
|
8
|
+
body.is-paper {
|
|
9
|
+
background: $color-paper;
|
|
10
|
+
}
|
|
6
11
|
}
|
package/scss/_base_forms.scss
CHANGED
|
@@ -67,6 +67,25 @@
|
|
|
67
67
|
border: $input-border-thickness solid $color;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
// adjust input background color for paper theme
|
|
72
|
+
|
|
73
|
+
// XXX: currently these colours are transparent,
|
|
74
|
+
// so they work both on paper and white backgrounds.
|
|
75
|
+
// We may need later to add a specific override for
|
|
76
|
+
// a white background within paper themed pages.
|
|
77
|
+
.is-paper & {
|
|
78
|
+
background-color: $colors--paper-theme--background-inputs;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
background-color: $colors--paper-theme--background-hover;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:active,
|
|
85
|
+
&:focus {
|
|
86
|
+
background-color: $colors--paper-theme--background-active;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
70
89
|
}
|
|
71
90
|
|
|
72
91
|
// Disabled form elements
|
|
@@ -99,23 +99,38 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
.is-paper .p-search-box {
|
|
104
|
+
.p-search-box__input {
|
|
105
|
+
@include vf-search-box-paper-theme;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
@mixin vf-search-box-theme(
|
|
110
|
+
@mixin vf-search-box-theme(
|
|
111
|
+
$color-search-box-background,
|
|
112
|
+
$color-search-box-background-hover,
|
|
113
|
+
$color-search-box-background-active,
|
|
114
|
+
$color-search-box-border,
|
|
115
|
+
$color-search-box-text
|
|
116
|
+
) {
|
|
105
117
|
//XXX: This should inherit from input color theming. Once that becomes available, delete this.
|
|
106
118
|
background-color: $color-search-box-background;
|
|
107
119
|
border-color: $color-search-box-border;
|
|
108
120
|
color: $color-search-box-text;
|
|
109
121
|
|
|
122
|
+
&:hover,
|
|
123
|
+
&:-webkit-autofill:hover {
|
|
124
|
+
background-color: $color-search-box-background-hover !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
110
127
|
&:active,
|
|
111
128
|
&:focus,
|
|
112
|
-
&:hover,
|
|
113
129
|
&:-internal-autofill-selected,
|
|
114
130
|
&:-webkit-autofill,
|
|
115
|
-
&:-webkit-autofill:hover,
|
|
116
131
|
&:-webkit-autofill:focus {
|
|
117
132
|
// XXX: remove important once the button {} selector is refactored to use themeing. At the moment, it trumps these.
|
|
118
|
-
background-color: $color-search-box-background !important;
|
|
133
|
+
background-color: $color-search-box-background-active !important;
|
|
119
134
|
border-color: $color-search-box-border !important;
|
|
120
135
|
}
|
|
121
136
|
}
|
|
@@ -123,6 +138,8 @@
|
|
|
123
138
|
@mixin vf-search-box-light-theme {
|
|
124
139
|
@include vf-search-box-theme(
|
|
125
140
|
$color-search-box-background: $colors--light-theme--background-inputs,
|
|
141
|
+
$color-search-box-background-hover: $colors--light-theme--background-hover,
|
|
142
|
+
$color-search-box-background-active: $colors--light-theme--background-active,
|
|
126
143
|
$color-search-box-border: $colors--light-theme--border-high-contrast,
|
|
127
144
|
$color-search-box-text: $colors--light-theme--text-default
|
|
128
145
|
);
|
|
@@ -131,6 +148,8 @@
|
|
|
131
148
|
@mixin vf-search-box-dark-theme {
|
|
132
149
|
@include vf-search-box-theme(
|
|
133
150
|
$color-search-box-background: lighten($colors--dark-theme--background-default, 10%),
|
|
151
|
+
$color-search-box-background-hover: $colors--dark-theme--background-hover,
|
|
152
|
+
$color-search-box-background-active: $colors--dark-theme--background-active,
|
|
134
153
|
$color-search-box-border: $color-x-light,
|
|
135
154
|
$color-search-box-text: $colors--dark-theme--text-default
|
|
136
155
|
);
|
|
@@ -139,3 +158,17 @@
|
|
|
139
158
|
color: $colors--dark-theme--text-default;
|
|
140
159
|
}
|
|
141
160
|
}
|
|
161
|
+
|
|
162
|
+
@mixin vf-search-box-paper-theme {
|
|
163
|
+
// XXX: currently these colours are transparent,
|
|
164
|
+
// so they work both on paper and white backgrounds.
|
|
165
|
+
// We may need later to add a specific override for
|
|
166
|
+
// a white background within paper themed pages.
|
|
167
|
+
@include vf-search-box-theme(
|
|
168
|
+
$color-search-box-background: $colors--paper-theme--background-inputs,
|
|
169
|
+
$color-search-box-background-hover: $colors--paper-theme--background-hover,
|
|
170
|
+
$color-search-box-background-active: $colors--paper-theme--background-active,
|
|
171
|
+
$color-search-box-border: $colors--light-theme--border-high-contrast,
|
|
172
|
+
$color-search-box-text: $colors--light-theme--text-default
|
|
173
|
+
);
|
|
174
|
+
}
|
|
@@ -24,19 +24,26 @@
|
|
|
24
24
|
@extend %vf-strip;
|
|
25
25
|
|
|
26
26
|
background-color: transparent;
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
.p-strip--light {
|
|
30
|
+
@extend %vf-strip;
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
background-color: $color-light;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.p-strip--dark {
|
|
36
|
+
@extend %vf-strip;
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
background-color: $color-dark;
|
|
39
|
+
color: $color-light;
|
|
40
|
+
}
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
.p-strip--white {
|
|
43
|
+
@extend %vf-strip;
|
|
44
|
+
|
|
45
|
+
background-color: $color-x-light;
|
|
46
|
+
color: $colors--light-theme--text-default;
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
|
|
@@ -18,6 +18,8 @@ $color-caution: #f99b11 !default;
|
|
|
18
18
|
$color-positive: #0e8420 !default;
|
|
19
19
|
$color-information: #24598f !default;
|
|
20
20
|
|
|
21
|
+
$color-paper: #f3f3f3 !default;
|
|
22
|
+
|
|
21
23
|
// for dark themes
|
|
22
24
|
$color-negative-dark: #a11223 !default;
|
|
23
25
|
$color-positive-dark: #008013 !default;
|
|
@@ -196,6 +198,11 @@ $colors-dark-theme--tinted-borders: (
|
|
|
196
198
|
information: hsl(210deg 80% 65%),
|
|
197
199
|
);
|
|
198
200
|
|
|
201
|
+
// Paper theme (work in progress)
|
|
202
|
+
$colors--paper-theme--background-inputs: rgba($color-x-dark, $input-background-opacity-amount) !default;
|
|
203
|
+
$colors--paper-theme--background-active: rgba($color-x-dark, $active-background-opacity-amount) !default;
|
|
204
|
+
$colors--paper-theme--background-hover: rgba($color-x-dark, $hover-background-opacity-amount) !default;
|
|
205
|
+
|
|
199
206
|
// Branding colors
|
|
200
207
|
$color-brand: #333 !default;
|
|
201
208
|
$color-brand-dark: $color-brand !default;
|