vanilla-framework 4.5.0 → 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 +9 -9
- package/scss/_base_typography-definitions.scss +55 -62
- package/scss/_base_typography-heading-mixins.scss +2 -0
- package/scss/_layouts_application-panels.scss +1 -0
- package/scss/_patterns_grid.scss +51 -9
- package/scss/_patterns_navigation.scss +1 -1
- package/scss/_patterns_search-box.scss +14 -12
- package/scss/_patterns_side-navigation.scss +6 -0
- package/scss/_patterns_suru.scss +0 -6
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"
|
|
@@ -56,25 +56,25 @@
|
|
|
56
56
|
],
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@canonical/cookie-policy": "3.5.0",
|
|
59
|
-
"@canonical/latest-news": "1.
|
|
60
|
-
"@percy/cli": "1.27.
|
|
61
|
-
"@testing-library/cypress": "
|
|
59
|
+
"@canonical/latest-news": "1.5.0",
|
|
60
|
+
"@percy/cli": "1.27.6",
|
|
61
|
+
"@testing-library/cypress": "10.0.1",
|
|
62
62
|
"autoprefixer": "10.4.16",
|
|
63
|
-
"cypress": "
|
|
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
|
@@ -144,9 +144,9 @@
|
|
|
144
144
|
|
|
145
145
|
// column reordering
|
|
146
146
|
$offsets: (
|
|
147
|
-
(small, 0, $threshold-4-6-col, $grid-columns-small
|
|
148
|
-
(medium, $threshold-4-6-col, $threshold-6-12-col, $grid-columns-medium
|
|
149
|
-
(large, $threshold-6-12-col, false, $grid-columns
|
|
147
|
+
(small, 0, $threshold-4-6-col, $grid-columns-small),
|
|
148
|
+
(medium, $threshold-4-6-col, $threshold-6-12-col, $grid-columns-medium),
|
|
149
|
+
(large, $threshold-6-12-col, false, $grid-columns)
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
@each $label, $breakpoint-min, $breakpoint-reset, $col-count in $offsets {
|
|
@@ -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;
|
|
@@ -79,31 +79,33 @@
|
|
|
79
79
|
.p-search-box__input {
|
|
80
80
|
@include vf-search-box-dark-theme;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
.p-search-box.is-light {
|
|
84
|
-
.p-search-box__input {
|
|
85
|
-
@include vf-search-box-light-theme;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
82
|
} @else {
|
|
89
83
|
.p-search-box {
|
|
90
84
|
.p-search-box__input {
|
|
91
85
|
@include vf-search-box-light-theme;
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
|
-
|
|
95
|
-
.p-search-box.is-dark {
|
|
96
|
-
.p-search-box__input {
|
|
97
|
-
@include vf-search-box-dark-theme;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
88
|
}
|
|
101
89
|
|
|
90
|
+
// beware that the order of the following classes is important
|
|
91
|
+
// as they are used to override the default theme
|
|
102
92
|
.is-paper .p-search-box {
|
|
103
93
|
.p-search-box__input {
|
|
104
94
|
@include vf-search-box-paper-theme;
|
|
105
95
|
}
|
|
106
96
|
}
|
|
97
|
+
|
|
98
|
+
.p-search-box.is-light {
|
|
99
|
+
.p-search-box__input {
|
|
100
|
+
@include vf-search-box-light-theme;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.p-search-box.is-dark {
|
|
105
|
+
.p-search-box__input {
|
|
106
|
+
@include vf-search-box-dark-theme;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
107
109
|
}
|
|
108
110
|
|
|
109
111
|
@mixin vf-search-box-theme(
|
|
@@ -292,6 +292,7 @@
|
|
|
292
292
|
&[aria-expanded='false'] {
|
|
293
293
|
height: 0;
|
|
294
294
|
opacity: 0;
|
|
295
|
+
overflow: hidden;
|
|
295
296
|
transform: translate3d(0, -0.5rem, 0);
|
|
296
297
|
visibility: hidden;
|
|
297
298
|
}
|
|
@@ -544,6 +545,11 @@
|
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
547
|
}
|
|
548
|
+
|
|
549
|
+
.is-paper .p-side-navigation__drawer,
|
|
550
|
+
.is-paper .p-side-navigation__drawer-header {
|
|
551
|
+
background: $color-paper;
|
|
552
|
+
}
|
|
547
553
|
}
|
|
548
554
|
|
|
549
555
|
// helper
|
package/scss/_patterns_suru.scss
CHANGED
|
@@ -5,15 +5,9 @@
|
|
|
5
5
|
aspect-ratio: calc(2216 / 428); // aspect ratio calculated from image dimensions
|
|
6
6
|
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg');
|
|
7
7
|
background-size: contain;
|
|
8
|
-
display: none; // only show suru on large screens
|
|
9
8
|
margin: 0 auto;
|
|
10
9
|
max-width: $grid-max-width;
|
|
11
10
|
|
|
12
|
-
// show suru only on large screens
|
|
13
|
-
@media (min-width: $breakpoint-large) {
|
|
14
|
-
display: block;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
11
|
&.is-dark {
|
|
18
12
|
aspect-ratio: calc(2580 / 501); // aspect ratio calculated from image dimensions
|
|
19
13
|
background-image: url('#{$assets-path}9469ef82-1_website_suru_DARK_25%20(1)122.jpg');
|