vanilla-framework 4.5.1 → 4.6.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -57,24 +57,24 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@canonical/cookie-policy": "3.5.0",
|
|
59
59
|
"@canonical/latest-news": "1.5.0",
|
|
60
|
-
"@percy/cli": "1.27.
|
|
61
|
-
"@testing-library/cypress": "
|
|
60
|
+
"@percy/cli": "1.27.6",
|
|
61
|
+
"@testing-library/cypress": "10.0.1",
|
|
62
62
|
"autoprefixer": "10.4.16",
|
|
63
|
-
"cypress": "13.6.
|
|
63
|
+
"cypress": "13.6.2",
|
|
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.32",
|
|
68
68
|
"postcss-cli": "10.1.0",
|
|
69
69
|
"postcss-scss": "4.0.9",
|
|
70
70
|
"prettier": "2.8.8",
|
|
71
|
-
"sass": "1.
|
|
72
|
-
"stylelint": "15.
|
|
71
|
+
"sass": "1.69.6",
|
|
72
|
+
"stylelint": "15.11.0",
|
|
73
73
|
"stylelint-config-prettier": "9.0.5",
|
|
74
74
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
75
75
|
"stylelint-order": "5.0.0",
|
|
76
76
|
"stylelint-prettier": "2.0.0",
|
|
77
77
|
"svgo": "2.8.0",
|
|
78
|
-
"yaml": "2.3.
|
|
78
|
+
"yaml": "2.3.4"
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -5,41 +5,55 @@
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
%vf-heading-2 {
|
|
10
|
-
@extend %vf-is-accent;
|
|
11
|
-
|
|
12
|
-
font-size: #{map-get($font-sizes, h2-mobile)}rem;
|
|
8
|
+
%vf-heading--common {
|
|
13
9
|
font-style: normal;
|
|
14
|
-
font-weight: 180;
|
|
15
|
-
line-height: map-get($line-heights, h2-mobile);
|
|
16
|
-
margin-bottom: map-get($sp-after, h2-mobile) - map-get($nudges, h2-mobile);
|
|
17
10
|
margin-top: 0;
|
|
18
11
|
max-width: $text-max-width;
|
|
19
|
-
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//@section Heading styling in placeholders
|
|
15
|
+
%vf-heading-1 {
|
|
16
|
+
@extend %vf-heading--common;
|
|
17
|
+
@extend %vf-is-accent;
|
|
18
|
+
|
|
19
|
+
font-size: #{map-get($font-sizes, h1-mobile)}rem;
|
|
20
|
+
font-weight: $font-weight-bold;
|
|
21
|
+
line-height: map-get($line-heights, h1-mobile);
|
|
22
|
+
margin-bottom: map-get($sp-after, h1-mobile) - map-get($nudges, h1-mobile);
|
|
23
|
+
padding-top: map-get($nudges, h1-mobile);
|
|
20
24
|
|
|
21
25
|
@media (min-width: $breakpoint-heading-threshold) {
|
|
22
|
-
font-size: #{map-get($font-sizes,
|
|
23
|
-
line-height: map-get($line-heights,
|
|
24
|
-
margin-bottom: map-get($sp-after,
|
|
25
|
-
padding-top: map-get($nudges,
|
|
26
|
+
font-size: #{map-get($font-sizes, h1)}rem;
|
|
27
|
+
line-height: map-get($line-heights, h1);
|
|
28
|
+
margin-bottom: map-get($sp-after, h1) - map-get($nudges, h1);
|
|
29
|
+
padding-top: map-get($nudges, h1);
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
&.u-no-margin--bottom {
|
|
29
|
-
@extend %u-no-margin--bottom--
|
|
33
|
+
@extend %u-no-margin--bottom--h1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:not(.u-no-margin):not(.u-no-margin--bottom) + & {
|
|
37
|
+
// move it up under the heading above by the amount of bottom margin + top padding
|
|
38
|
+
margin-top: calc(-1 * map-get($sp-after, h1-mobile));
|
|
39
|
+
|
|
40
|
+
@media (min-width: $breakpoint-heading-threshold) {
|
|
41
|
+
margin-top: calc(-1 * map-get($sp-after, h1));
|
|
42
|
+
}
|
|
30
43
|
}
|
|
31
44
|
}
|
|
32
45
|
|
|
33
|
-
%vf-heading-
|
|
34
|
-
@extend %vf-heading
|
|
35
|
-
|
|
46
|
+
%vf-heading-2 {
|
|
47
|
+
@extend %vf-heading--common;
|
|
48
|
+
@extend %vf-heading-1;
|
|
49
|
+
font-weight: 180; // custom font weight adjusted for h2
|
|
36
50
|
}
|
|
37
51
|
|
|
38
52
|
%vf-heading-display {
|
|
39
|
-
@extend %vf-heading
|
|
53
|
+
@extend %vf-heading--common;
|
|
40
54
|
|
|
41
55
|
font-size: #{map-get($font-sizes, display-mobile)}rem;
|
|
42
|
-
font-weight:
|
|
56
|
+
font-weight: $font-weight-display-heading;
|
|
43
57
|
line-height: map-get($line-heights, display-mobile);
|
|
44
58
|
margin-bottom: map-get($sp-after, display-mobile) - map-get($nudges, display-mobile);
|
|
45
59
|
padding-top: map-get($nudges, display-mobile);
|
|
@@ -53,15 +67,13 @@
|
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
%vf-heading-3 {
|
|
70
|
+
@extend %vf-heading--common;
|
|
56
71
|
@extend %vf-is-accent;
|
|
57
72
|
|
|
58
73
|
font-size: #{map-get($font-sizes, h3-mobile)}rem;
|
|
59
|
-
font-
|
|
60
|
-
font-weight: 550;
|
|
74
|
+
font-weight: $font-weight-bold;
|
|
61
75
|
line-height: map-get($line-heights, h3-mobile);
|
|
62
76
|
margin-bottom: map-get($sp-after, h3-mobile) - map-get($nudges, h3-mobile);
|
|
63
|
-
margin-top: 0;
|
|
64
|
-
max-width: $text-max-width;
|
|
65
77
|
padding-top: map-get($nudges, h3-mobile);
|
|
66
78
|
|
|
67
79
|
@media (min-width: $breakpoint-heading-threshold) {
|
|
@@ -74,73 +86,54 @@
|
|
|
74
86
|
&.u-no-margin--bottom {
|
|
75
87
|
@extend %u-no-margin--bottom--h3;
|
|
76
88
|
}
|
|
77
|
-
}
|
|
78
89
|
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
&:not(.u-no-margin):not(.u-no-margin--bottom) + & {
|
|
91
|
+
// move it up under the heading above by the amount of bottom margin + top padding
|
|
92
|
+
margin-top: calc(-1 * map-get($sp-after, h3-mobile));
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
font-weight: 275;
|
|
85
|
-
line-height: map-get($line-heights, h4-mobile);
|
|
86
|
-
margin-bottom: map-get($sp-after, h4-mobile) - map-get($nudges, h4-mobile);
|
|
87
|
-
margin-top: 0;
|
|
88
|
-
max-width: $text-max-width;
|
|
89
|
-
padding-top: map-get($nudges, h4-mobile);
|
|
90
|
-
|
|
91
|
-
@media (min-width: $breakpoint-heading-threshold) {
|
|
92
|
-
font-size: #{map-get($font-sizes, h4)}rem;
|
|
93
|
-
line-height: map-get($line-heights, h4);
|
|
94
|
-
margin-bottom: map-get($sp-after, h4) - map-get($nudges, h4);
|
|
95
|
-
padding-top: map-get($nudges, h4);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@if ($increase-font-size-on-larger-screens) {
|
|
99
|
-
@media (min-width: $breakpoint-x-large) {
|
|
100
|
-
margin-bottom: map-get($sp-after, h4) - map-get($nudges, h4-large);
|
|
101
|
-
padding-top: map-get($nudges, h4-large);
|
|
94
|
+
@media (min-width: $breakpoint-heading-threshold) {
|
|
95
|
+
margin-top: calc(-1 * map-get($sp-after, h3));
|
|
102
96
|
}
|
|
103
97
|
}
|
|
98
|
+
}
|
|
104
99
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
%vf-heading-4 {
|
|
101
|
+
@extend %vf-heading--common;
|
|
102
|
+
@extend %vf-heading-3;
|
|
103
|
+
font-weight: 275; // custom font weight adjusted for h4
|
|
108
104
|
}
|
|
109
105
|
|
|
110
106
|
%vf-heading-5 {
|
|
107
|
+
@extend %vf-heading--common;
|
|
108
|
+
|
|
111
109
|
font-size: 1rem;
|
|
112
|
-
font-style: normal;
|
|
113
110
|
font-weight: $font-weight-bold;
|
|
114
111
|
line-height: map-get($line-heights, default-text);
|
|
115
112
|
margin-bottom: map-get($sp-after, p) - map-get($nudges, p);
|
|
116
|
-
margin-top: 0;
|
|
117
|
-
max-width: $text-max-width;
|
|
118
113
|
padding-top: map-get($nudges, p);
|
|
119
114
|
|
|
120
115
|
&.u-no-margin--bottom {
|
|
121
116
|
@extend %u-no-margin--bottom--default-text;
|
|
122
117
|
}
|
|
118
|
+
|
|
119
|
+
&:not(.u-no-margin):not(.u-no-margin--bottom) + & {
|
|
120
|
+
// move it up under the heading above by the amoung of bottom margin + top padding
|
|
121
|
+
margin-top: calc(-1 * map-get($sp-after, p));
|
|
122
|
+
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
%vf-heading-6 {
|
|
126
|
-
|
|
126
|
+
@extend %vf-heading--common;
|
|
127
|
+
@extend %vf-heading-5;
|
|
128
|
+
|
|
127
129
|
font-style: italic;
|
|
128
130
|
font-weight: $font-weight-regular-text;
|
|
129
|
-
line-height: map-get($line-heights, default-text);
|
|
130
|
-
margin-bottom: map-get($sp-after, p) - map-get($nudges, p);
|
|
131
|
-
margin-top: 0;
|
|
132
|
-
max-width: $text-max-width;
|
|
133
|
-
padding-top: map-get($nudges, h6);
|
|
134
131
|
|
|
135
132
|
@if ($increase-font-size-on-larger-screens) {
|
|
136
133
|
@media (min-width: $breakpoint-x-large) {
|
|
137
134
|
padding-top: map-get($nudges, h6-large);
|
|
138
135
|
}
|
|
139
136
|
}
|
|
140
|
-
|
|
141
|
-
&.u-no-margin--bottom {
|
|
142
|
-
@extend %u-no-margin--bottom--default-text;
|
|
143
|
-
}
|
|
144
137
|
}
|
|
145
138
|
|
|
146
139
|
%common-default-text-properties {
|
package/scss/_patterns_grid.scss
CHANGED
|
@@ -197,6 +197,7 @@
|
|
|
197
197
|
$col-50: calc($grid-columns / 2);
|
|
198
198
|
$col-75: calc(($grid-columns / 4) * 3);
|
|
199
199
|
|
|
200
|
+
// 50/50 split on medium and large screens
|
|
200
201
|
.row--50-50 {
|
|
201
202
|
@extend %vf-row;
|
|
202
203
|
|
|
@@ -213,6 +214,7 @@
|
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
|
|
217
|
+
// 25/75 split on medium and large screens
|
|
216
218
|
.row--25-75 {
|
|
217
219
|
@extend %vf-row;
|
|
218
220
|
|
|
@@ -220,7 +222,18 @@
|
|
|
220
222
|
@include vf-grid-column($grid-columns-small);
|
|
221
223
|
|
|
222
224
|
@media (min-width: $threshold-4-6-col) {
|
|
223
|
-
|
|
225
|
+
&:nth-of-type(1) {
|
|
226
|
+
@include vf-grid-column(2);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&:nth-of-type(2) {
|
|
230
|
+
@include vf-grid-column(4);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// if there is only one column, use the whole width
|
|
234
|
+
&:only-of-type {
|
|
235
|
+
@include vf-grid-column(6);
|
|
236
|
+
}
|
|
224
237
|
}
|
|
225
238
|
|
|
226
239
|
@media (min-width: $threshold-6-12-col) {
|
|
@@ -241,9 +254,22 @@
|
|
|
241
254
|
}
|
|
242
255
|
}
|
|
243
256
|
|
|
244
|
-
|
|
257
|
+
// 50/50 split just on medium screens
|
|
258
|
+
.row--50-50-on-medium {
|
|
259
|
+
@extend %vf-row;
|
|
260
|
+
|
|
245
261
|
> .col {
|
|
246
|
-
@media (
|
|
262
|
+
@media ($threshold-4-6-col <= width < $threshold-6-12-col) {
|
|
263
|
+
@include vf-grid-column($col-50-medium);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.row--25-75-on-medium {
|
|
269
|
+
@extend %vf-row;
|
|
270
|
+
|
|
271
|
+
> .col {
|
|
272
|
+
@media ($threshold-4-6-col <= width < $threshold-6-12-col) {
|
|
247
273
|
&:nth-of-type(1) {
|
|
248
274
|
@include vf-grid-column(2);
|
|
249
275
|
}
|
|
@@ -252,13 +278,29 @@
|
|
|
252
278
|
@include vf-grid-column(4);
|
|
253
279
|
}
|
|
254
280
|
|
|
255
|
-
// if there is only one column
|
|
281
|
+
// if there is only one column, use the whole width
|
|
256
282
|
&:only-of-type {
|
|
257
|
-
@include vf-grid-column(
|
|
258
|
-
grid-column-start: calc(3);
|
|
283
|
+
@include vf-grid-column(6);
|
|
259
284
|
}
|
|
260
285
|
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// 50/50 split just on large screens
|
|
290
|
+
.row--50-50-on-large {
|
|
291
|
+
@extend %vf-row;
|
|
292
|
+
|
|
293
|
+
> .col {
|
|
294
|
+
@media (min-width: $threshold-6-12-col) {
|
|
295
|
+
@include vf-grid-column($col-50);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.row--25-75-on-large {
|
|
301
|
+
@extend %vf-row;
|
|
261
302
|
|
|
303
|
+
> .col {
|
|
262
304
|
@media (min-width: $threshold-6-12-col) {
|
|
263
305
|
&:nth-of-type(1) {
|
|
264
306
|
@include vf-grid-column($col-25);
|
|
@@ -282,7 +282,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
282
282
|
.p-navigation__link {
|
|
283
283
|
@extend %navigation-link;
|
|
284
284
|
|
|
285
|
-
padding-left: $sph--x-large;
|
|
285
|
+
padding-left: calc($sph--x-large + 0.19rem); // additional padding added to align better with logos as originally designed in SVG
|
|
286
286
|
|
|
287
287
|
&:hover {
|
|
288
288
|
background-color: transparent !important;
|