vanilla-framework 4.12.0 → 4.13.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 +2 -2
- package/scss/_base_forms.scss +1 -1
- package/scss/_base_placeholders.scss +6 -1
- package/scss/_patterns_accordion.scss +2 -2
- package/scss/_patterns_article-pagination.scss +2 -2
- package/scss/_patterns_card.scss +5 -6
- package/scss/_patterns_image.scss +55 -0
- package/scss/_patterns_lists.scss +2 -6
- package/scss/_patterns_matrix.scss +5 -3
- package/scss/_patterns_navigation.scss +17 -11
- package/scss/_patterns_pull-quotes.scss +1 -1
- package/scss/_patterns_search-box.scss +0 -5
- package/scss/_patterns_table-of-contents.scss +2 -2
- package/scss/_patterns_table-sortable.scss +3 -3
- package/scss/_settings_colors.scss +1 -1
- package/scss/_settings_placeholders.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"!/scss/standalone"
|
|
56
56
|
],
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@canonical/cookie-policy": "3.6.
|
|
58
|
+
"@canonical/cookie-policy": "3.6.4",
|
|
59
59
|
"@canonical/latest-news": "1.5.0",
|
|
60
60
|
"@percy/cli": "1.28.7",
|
|
61
61
|
"@testing-library/cypress": "10.0.2",
|
package/scss/_base_forms.scss
CHANGED
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
-webkit-appearance: none;
|
|
186
186
|
appearance: none;
|
|
187
187
|
// stylelint-enable property-no-vendor-prefix
|
|
188
|
-
background-position: right
|
|
188
|
+
background-position: right $sph--small center;
|
|
189
189
|
background-repeat: no-repeat;
|
|
190
190
|
background-size: map-get($icon-sizes, default);
|
|
191
191
|
box-shadow: none;
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
border: $border;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
%vf-bg-themed {
|
|
29
|
+
background-color: $colors--theme--background-default;
|
|
30
|
+
color: $colors--theme--text-default;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
// deprecated -- use the theme colour variables
|
|
29
34
|
%vf-bg--light {
|
|
30
35
|
background-color: $color-light;
|
|
@@ -43,7 +48,7 @@
|
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
%vf-card {
|
|
46
|
-
@extend %vf-bg
|
|
51
|
+
@extend %vf-bg-themed;
|
|
47
52
|
@extend %vf-card-padding;
|
|
48
53
|
|
|
49
54
|
margin-bottom: $spv--x-large;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
&::before {
|
|
35
35
|
@extend %icon;
|
|
36
|
-
@include vf-icon-chevron
|
|
36
|
+
@include vf-icon-chevron-themed;
|
|
37
37
|
@include vf-transition($property: transform, $duration: fast);
|
|
38
38
|
|
|
39
39
|
content: '';
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
background-color: inherit;
|
|
47
47
|
|
|
48
48
|
&:hover {
|
|
49
|
-
background-color: $colors--
|
|
49
|
+
background-color: $colors--theme--background-hover;
|
|
50
50
|
}
|
|
51
51
|
@include vf-transition(#{background-color, border-color});
|
|
52
52
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@mixin vf-p-article-pagination {
|
|
4
4
|
%chevron-icon {
|
|
5
5
|
@extend %icon;
|
|
6
|
-
@include vf-icon-chevron
|
|
6
|
+
@include vf-icon-chevron-themed;
|
|
7
7
|
|
|
8
8
|
content: '';
|
|
9
9
|
position: absolute;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
.p-article-pagination__label,
|
|
19
19
|
.p-article-pagination__title {
|
|
20
|
-
color: $colors--
|
|
20
|
+
color: $colors--theme--text-default;
|
|
21
21
|
display: block;
|
|
22
22
|
margin-top: 0;
|
|
23
23
|
width: 100%;
|
package/scss/_patterns_card.scss
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
.p-card {
|
|
13
13
|
@extend %vf-card;
|
|
14
14
|
@extend %vf-is-bordered;
|
|
15
|
-
|
|
16
15
|
padding: calc($spv--large - 1px);
|
|
17
16
|
}
|
|
18
17
|
}
|
|
@@ -30,8 +29,8 @@
|
|
|
30
29
|
|
|
31
30
|
@mixin vf-p-card-overlay {
|
|
32
31
|
.p-card--overlay {
|
|
33
|
-
background:
|
|
34
|
-
color: $colors--
|
|
32
|
+
background: $colors--theme--background-alt;
|
|
33
|
+
color: $colors--theme--text-default;
|
|
35
34
|
margin-bottom: $spv--x-large;
|
|
36
35
|
overflow: auto;
|
|
37
36
|
padding: $spv--large;
|
|
@@ -42,8 +41,8 @@
|
|
|
42
41
|
.p-card--muted {
|
|
43
42
|
@extend %vf-has-box-shadow;
|
|
44
43
|
|
|
45
|
-
background-color: $
|
|
46
|
-
color: $colors--
|
|
44
|
+
background-color: $colors--theme--background-default;
|
|
45
|
+
color: $colors--theme--text-default;
|
|
47
46
|
margin-bottom: $spv--x-large;
|
|
48
47
|
overflow: auto;
|
|
49
48
|
padding: $spv--large;
|
|
@@ -61,7 +60,7 @@
|
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
.p-card__header {
|
|
64
|
-
border-bottom: 1px solid $
|
|
63
|
+
border-bottom: 1px solid $colors--theme--border-low-contrast;
|
|
65
64
|
padding-bottom: $spv--large;
|
|
66
65
|
|
|
67
66
|
> .p-link--soft {
|
|
@@ -1,6 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@classreference
|
|
3
|
+
image-container:
|
|
4
|
+
Image container:
|
|
5
|
+
.p-image-container:
|
|
6
|
+
Main element of the image component.
|
|
7
|
+
"&.is-highlighted":
|
|
8
|
+
Highlighted variant, to be used to highlight contents.
|
|
9
|
+
.p-image-container--16-9:
|
|
10
|
+
Wraps contents in a container with an aspect ratio of 16:9.
|
|
11
|
+
.p-image-container--3-2:
|
|
12
|
+
Wraps contents in a container with an aspect ratio of 3:2.
|
|
13
|
+
.p-image-container--2-3:
|
|
14
|
+
Wraps contents in a container with an aspect ratio of 2:3.
|
|
15
|
+
.p-image-container--cinematic:
|
|
16
|
+
Wraps contents in a container with an aspect ratio of 2.4:1.
|
|
17
|
+
.p-image-container--square:
|
|
18
|
+
Wraps contents in a container with an aspect ratio of 1:1.
|
|
19
|
+
Image:
|
|
20
|
+
.p-image-container__image:
|
|
21
|
+
Image element within an image container.
|
|
22
|
+
*/
|
|
23
|
+
|
|
1
24
|
@import 'settings';
|
|
2
25
|
|
|
3
26
|
@mixin vf-p-image {
|
|
27
|
+
.p-image-container,
|
|
28
|
+
[class^='p-image-container--'] {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: grid;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
text-align: center;
|
|
33
|
+
.p-image-container__image {
|
|
34
|
+
object-fit: contain;
|
|
35
|
+
}
|
|
36
|
+
&.is-highlighted {
|
|
37
|
+
background: $colors--theme--background-alt;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-image-container--16-9 {
|
|
42
|
+
aspect-ratio: 16/9;
|
|
43
|
+
}
|
|
44
|
+
.p-image-container--3-2 {
|
|
45
|
+
aspect-ratio: 3/2;
|
|
46
|
+
}
|
|
47
|
+
.p-image-container--2-3 {
|
|
48
|
+
aspect-ratio: 2/3;
|
|
49
|
+
}
|
|
50
|
+
.p-image-container--cinematic {
|
|
51
|
+
aspect-ratio: 2.4/1;
|
|
52
|
+
}
|
|
53
|
+
.p-image-container--square {
|
|
54
|
+
aspect-ratio: 1/1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Deprecated; will be removed in v5
|
|
4
58
|
.p-image--bordered {
|
|
5
59
|
border: {
|
|
6
60
|
color: $color-mid-light;
|
|
@@ -9,6 +63,7 @@
|
|
|
9
63
|
}
|
|
10
64
|
}
|
|
11
65
|
|
|
66
|
+
// Deprecated; will be removed in v5
|
|
12
67
|
.p-image--shadowed {
|
|
13
68
|
box-shadow: 0 1px 5px 1px transparentize($color-mid-light, 0.8);
|
|
14
69
|
}
|
|
@@ -87,7 +87,7 @@ $list-step-bullet-margin: $sph--x-large;
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&::before {
|
|
90
|
-
color: $colors--
|
|
90
|
+
color: $colors--theme--text-default;
|
|
91
91
|
content: counters(list-item, '.') '. ';
|
|
92
92
|
display: inline-block;
|
|
93
93
|
text-align: right;
|
|
@@ -96,7 +96,7 @@ $list-step-bullet-margin: $sph--x-large;
|
|
|
96
96
|
|
|
97
97
|
%vf-list-item-bullet {
|
|
98
98
|
&::before {
|
|
99
|
-
color: $colors--
|
|
99
|
+
color: $colors--theme--text-default;
|
|
100
100
|
content: '•';
|
|
101
101
|
display: inline-block;
|
|
102
102
|
text-align: right;
|
|
@@ -174,10 +174,6 @@ $list-step-bullet-margin: $sph--x-large;
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
&.is-split .p-list__item:last-of-type {
|
|
178
|
-
border-bottom: 1px solid $color-mid-light;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
177
|
& & {
|
|
182
178
|
margin-bottom: 0;
|
|
183
179
|
margin-left: $sp-x-large;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.p-matrix__item {
|
|
18
|
-
border-top: 1px solid $
|
|
18
|
+
border-top: 1px solid $colors--theme--border-low-contrast;
|
|
19
19
|
display: flex;
|
|
20
20
|
flex: 1 1 auto;
|
|
21
21
|
padding-bottom: $spv--large;
|
|
@@ -40,8 +40,10 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
// TODO: Multiple redundant properties between this media query and the one
|
|
44
|
+
// below
|
|
43
45
|
@media (min-width: $threshold-6-12-col) {
|
|
44
|
-
border-right: 1px solid $
|
|
46
|
+
border-right: 1px solid $colors--theme--border-low-contrast;
|
|
45
47
|
padding-left: $spv--large;
|
|
46
48
|
padding-right: $spv--large;
|
|
47
49
|
width: 33.333%;
|
|
@@ -67,7 +69,7 @@
|
|
|
67
69
|
|
|
68
70
|
@media (min-width: $threshold-6-12-col) {
|
|
69
71
|
// 3 items per row
|
|
70
|
-
border-right: 1px solid $
|
|
72
|
+
border-right: 1px solid $colors--theme--border-low-contrast;
|
|
71
73
|
width: 33.333%;
|
|
72
74
|
|
|
73
75
|
&:empty {
|
|
@@ -32,7 +32,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
35
|
-
padding-left:
|
|
35
|
+
padding-left: $sph--large;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -45,7 +45,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
48
|
-
padding-right:
|
|
48
|
+
padding-right: $sph--large;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -67,7 +67,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&:hover {
|
|
70
|
-
background-color: $colors--theme--background-
|
|
70
|
+
background-color: $colors--theme--background-hover;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
&[aria-pressed='true'],
|
|
@@ -110,7 +110,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
113
|
-
padding-left:
|
|
113
|
+
padding-left: $sph--large;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -227,7 +227,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
227
227
|
|
|
228
228
|
// shift navigation items by the size of grid margin to align with grid
|
|
229
229
|
.p-navigation__items:first-child {
|
|
230
|
-
margin-left: calc(-1 *
|
|
230
|
+
margin-left: calc(-1 * $sph--large);
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
// on medium screen sizes (6 columns) use 2/4 column split
|
|
@@ -404,6 +404,12 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
404
404
|
justify-content: space-between;
|
|
405
405
|
margin-right: map-get($grid-margin-widths, default);
|
|
406
406
|
width: 100%;
|
|
407
|
+
|
|
408
|
+
// in documentation layout navigation items need to be aligned with the grid of the content
|
|
409
|
+
// so we substract the navigation item padding from the grid margin
|
|
410
|
+
.l-docs__main & {
|
|
411
|
+
margin-left: calc(map-get($grid-margin-widths, default) - $sph--large);
|
|
412
|
+
}
|
|
407
413
|
}
|
|
408
414
|
}
|
|
409
415
|
|
|
@@ -424,7 +430,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
424
430
|
}
|
|
425
431
|
|
|
426
432
|
[class*='p-navigation__item'].is-selected > .p-navigation__link {
|
|
427
|
-
background-color: $colors--theme--background-
|
|
433
|
+
background-color: $colors--theme--background-hover;
|
|
428
434
|
|
|
429
435
|
@include vf-highlight-bar($colors--theme--text-default, left, true);
|
|
430
436
|
|
|
@@ -508,7 +514,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
508
514
|
height: 100%; // keep the height of the navigation when 'Search' label is hidden
|
|
509
515
|
|
|
510
516
|
padding-left: 0; // on small screens label is hidden, so we remove left padding as well
|
|
511
|
-
padding-right: calc(
|
|
517
|
+
padding-right: calc(2 * $sph--small + map-get($icon-sizes, default)); // TODO: 2x sp small, or just large?
|
|
512
518
|
position: relative;
|
|
513
519
|
|
|
514
520
|
// hide "search" label on small screens (only show the icon)
|
|
@@ -518,7 +524,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
518
524
|
|
|
519
525
|
// show both label and icon on large screens
|
|
520
526
|
@media (min-width: $breakpoint-large) {
|
|
521
|
-
padding-left:
|
|
527
|
+
padding-left: $sph--large;
|
|
522
528
|
|
|
523
529
|
.p-navigation__search-label {
|
|
524
530
|
display: initial;
|
|
@@ -536,7 +542,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
536
542
|
height: $spv--large;
|
|
537
543
|
pointer-events: none;
|
|
538
544
|
position: absolute;
|
|
539
|
-
right: calc(
|
|
545
|
+
right: calc($sph--large / 2);
|
|
540
546
|
text-indent: calc(100% + 10rem);
|
|
541
547
|
top: calc($spv--medium + map-get($nudges, x-small));
|
|
542
548
|
width: map-get($icon-sizes, default);
|
|
@@ -679,7 +685,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
679
685
|
}
|
|
680
686
|
|
|
681
687
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
682
|
-
right: calc(
|
|
688
|
+
right: calc($sph--large / 2); // position by the center of grid margin
|
|
683
689
|
top: calc($spv--large + map-get($nudges, x-small));
|
|
684
690
|
transform: rotate(0deg);
|
|
685
691
|
}
|
|
@@ -702,7 +708,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
702
708
|
|
|
703
709
|
.p-navigation__link {
|
|
704
710
|
// increase padding to accommodate chevron icon
|
|
705
|
-
padding-right:
|
|
711
|
+
padding-right: calc(2 * $sph--small + map-get($icon-sizes, default));
|
|
706
712
|
}
|
|
707
713
|
|
|
708
714
|
&:first-child .p-navigation__link::before {
|
|
@@ -32,10 +32,6 @@
|
|
|
32
32
|
.p-search-box__reset {
|
|
33
33
|
@extend %search-box-button;
|
|
34
34
|
@extend %transparent-button;
|
|
35
|
-
|
|
36
|
-
&:not(:last-of-type):not(:only-of-type) {
|
|
37
|
-
margin-right: $bar-thickness;
|
|
38
|
-
}
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
// Theme set on body element
|
|
@@ -80,7 +76,6 @@
|
|
|
80
76
|
|
|
81
77
|
border-left-style: solid;
|
|
82
78
|
border-left-width: 1px;
|
|
83
|
-
margin-right: $bar-thickness;
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
81
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
padding-bottom: $spv--large;
|
|
14
14
|
|
|
15
15
|
&:not(:last-child) {
|
|
16
|
-
border-bottom: 1px solid $
|
|
16
|
+
border-bottom: 1px solid $colors--theme--border-low-contrast;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:visited {
|
|
40
|
-
color: $
|
|
40
|
+
color: $colors--theme--link-default;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
&[aria-sort='ascending']::after {
|
|
31
31
|
@extend %heading-icon;
|
|
32
|
+
|
|
33
|
+
-webkit-transform: rotate(180deg); // stylelint-disable-line property-no-vendor-prefix
|
|
34
|
+
transform: rotate(180deg);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
&[aria-sort='descending']::after {
|
|
35
38
|
@extend %heading-icon;
|
|
36
|
-
|
|
37
|
-
-webkit-transform: rotate(180deg); // stylelint-disable-line property-no-vendor-prefix
|
|
38
|
-
transform: rotate(180deg);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
&[aria-sort]:hover {
|
|
@@ -172,7 +172,7 @@ $colors--dark-theme--link-default: $color-link-dark !default;
|
|
|
172
172
|
$colors--dark-theme--link-visited: $color-link-visited-dark !default;
|
|
173
173
|
|
|
174
174
|
$colors--dark-theme--background-default: #262626 !default;
|
|
175
|
-
$colors--dark-theme--background-alt: #
|
|
175
|
+
$colors--dark-theme--background-alt: #202020 !default;
|
|
176
176
|
$colors--dark-theme--background-code: $color-code-background-dark !default;
|
|
177
177
|
$colors--dark-theme--background-inputs: rgba($colors--dark-theme--text-default, $input-background-opacity-amount) !default;
|
|
178
178
|
$colors--dark-theme--background-active: rgba($colors--dark-theme--text-default, $active-background-opacity-amount) !default;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
$input-border-thickness: 1.5px;
|
|
6
6
|
$bar-thickness: 0.1875rem !default; // 3px at 16px fontsize, expressed in rems so it scales with text if the root font-size changes at a breakpoint
|
|
7
7
|
$border-radius: 0; // deprecated, will be removed in future version of Vanilla
|
|
8
|
-
$border: $input-border-thickness solid $
|
|
8
|
+
$border: $input-border-thickness solid $colors--theme--border-default !default;
|
|
9
9
|
$box-shadow:
|
|
10
10
|
0 1px 1px 0 transparentize($color-x-dark, 0.85),
|
|
11
11
|
0 2px 2px -1px transparentize($color-x-dark, 0.85),
|