vanilla-framework 3.0.1 → 3.1.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 +6 -6
- package/scss/_base_forms-range.scss +14 -17
- package/scss/_patterns_lists.scss +19 -0
- package/scss/_patterns_notifications.scss +2 -0
- package/scss/_patterns_pagination.scss +2 -1
- package/scss/_patterns_side-navigation.scss +2 -0
- package/scss/_patterns_switch.scss +11 -4
- package/scss/_patterns_table-mobile-card.scss +2 -5
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"percy": "percy exec -- node snapshots.js",
|
|
45
45
|
"icon-svgs-to-mixins": "node scripts/convert-svgs-to-icon-mixins.js icons"
|
|
46
46
|
},
|
|
47
|
-
"version": "3.0
|
|
47
|
+
"version": "3.1.0",
|
|
48
48
|
"files": [
|
|
49
49
|
"_index.scss",
|
|
50
50
|
"/scss",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"!/scss/standalone"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@canonical/cookie-policy": "3.
|
|
55
|
+
"@canonical/cookie-policy": "3.4.0",
|
|
56
56
|
"@canonical/latest-news": "1.3.0",
|
|
57
|
-
"autoprefixer": "10.4.
|
|
58
|
-
"postcss": "8.4.
|
|
57
|
+
"autoprefixer": "10.4.2",
|
|
58
|
+
"postcss": "8.4.6",
|
|
59
59
|
"postcss-cli": "9.1.0",
|
|
60
|
-
"sass": "1.
|
|
60
|
+
"sass": "1.49.7"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@percy/script": "1.1.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"markdown-spellcheck": "1.3.1",
|
|
66
66
|
"parker": "0.0.10",
|
|
67
67
|
"prettier": "2.5.1",
|
|
68
|
-
"stylelint": "14.
|
|
68
|
+
"stylelint": "14.3.0",
|
|
69
69
|
"stylelint-config-prettier": "9.0.3",
|
|
70
70
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
71
71
|
"stylelint-order": "5.0.0",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
@mixin vf-b-range {
|
|
2
2
|
$thumb-shadow: 0 0 $bar-thickness 1px rgba(0, 0, 0, 0.2);
|
|
3
|
-
$thumb-size:
|
|
4
|
-
$thumb-radius:
|
|
5
|
-
$
|
|
6
|
-
$track-
|
|
7
|
-
$track-border: $track-border-size solid $colors--light-theme--border-high-contrast;
|
|
3
|
+
$thumb-size: 1rem;
|
|
4
|
+
$thumb-radius: 50%;
|
|
5
|
+
$thumb-border: 1px solid $color-mid-dark;
|
|
6
|
+
$track-height: $bar-thickness;
|
|
8
7
|
$track-radius: $bar-thickness;
|
|
9
8
|
|
|
10
9
|
// stylelint-disable selector-max-type -- base styles can use type selectors
|
|
@@ -14,16 +13,15 @@
|
|
|
14
13
|
-moz-appearance: none;
|
|
15
14
|
appearance: none;
|
|
16
15
|
// stylelint-enable property-no-vendor-prefix
|
|
17
|
-
border-radius: $track-radius
|
|
16
|
+
border-radius: $track-radius;
|
|
18
17
|
margin: $sp-small 0;
|
|
19
18
|
padding: 0;
|
|
20
19
|
width: 100%;
|
|
21
20
|
|
|
22
21
|
// Chrome
|
|
23
22
|
&::-webkit-slider-runnable-track {
|
|
24
|
-
border: $track-
|
|
25
|
-
|
|
26
|
-
height: $track-height + 1;
|
|
23
|
+
border-radius: $track-radius;
|
|
24
|
+
height: $track-height;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
&::-webkit-slider-thumb {
|
|
@@ -33,11 +31,11 @@
|
|
|
33
31
|
appearance: none;
|
|
34
32
|
// stylelint-enable property-no-vendor-prefix
|
|
35
33
|
background: $color-x-light;
|
|
36
|
-
border:
|
|
34
|
+
border: $thumb-border;
|
|
37
35
|
border-radius: $thumb-radius;
|
|
38
36
|
box-shadow: $thumb-shadow;
|
|
39
37
|
height: $thumb-size;
|
|
40
|
-
margin-top: (
|
|
38
|
+
margin-top: (-$thumb-size + $track-height) * 0.5;
|
|
41
39
|
width: $thumb-size;
|
|
42
40
|
|
|
43
41
|
&:hover {
|
|
@@ -47,21 +45,20 @@
|
|
|
47
45
|
|
|
48
46
|
// Firefox
|
|
49
47
|
&::-moz-range-track {
|
|
50
|
-
background: $color-
|
|
51
|
-
border: $track-border;
|
|
48
|
+
background: $color-mid-light;
|
|
52
49
|
border-radius: $track-radius;
|
|
53
|
-
height: $track-height
|
|
50
|
+
height: $track-height;
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
&::-moz-range-progress {
|
|
57
|
-
background-color: $color-
|
|
54
|
+
background-color: $color-link;
|
|
58
55
|
border-radius: $track-radius;
|
|
59
|
-
height: $track-height
|
|
56
|
+
height: $track-height;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
&::-moz-range-thumb {
|
|
63
60
|
background: $color-x-light;
|
|
64
|
-
border:
|
|
61
|
+
border: $thumb-border;
|
|
65
62
|
border-radius: $thumb-radius;
|
|
66
63
|
box-shadow: $thumb-shadow;
|
|
67
64
|
height: $thumb-size;
|
|
@@ -29,6 +29,18 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
%nested-counter {
|
|
33
|
+
// Counter is named and it will be reset for each "ol" element.
|
|
34
|
+
counter-reset: list-item;
|
|
35
|
+
li::marker {
|
|
36
|
+
// "counters" function returns a string representing the current value of the named counter ("list-item").
|
|
37
|
+
// It is used to insert a string between different levels of nested counters.
|
|
38
|
+
// Source: https://www.w3schools.com/css/css_counters.asp
|
|
39
|
+
content: counters(list-item, '.') '. ';
|
|
40
|
+
counter-increment: list-item;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
// Mixin for list items
|
|
33
45
|
%vf-list-item {
|
|
34
46
|
padding-bottom: $spv--x-small;
|
|
@@ -395,6 +407,12 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
395
407
|
}
|
|
396
408
|
}
|
|
397
409
|
|
|
410
|
+
@mixin vf-p-list-nested-counter {
|
|
411
|
+
.p-list--nested-counter {
|
|
412
|
+
@extend %nested-counter;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
398
416
|
@mixin vf-p-lists {
|
|
399
417
|
@include vf-p-list-placeholders;
|
|
400
418
|
|
|
@@ -407,4 +425,5 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
407
425
|
@include vf-p-stepped-list;
|
|
408
426
|
@include vf-p-stepped-list-detailed;
|
|
409
427
|
@include vf-p-list-split;
|
|
428
|
+
@include vf-p-list-nested-counter;
|
|
410
429
|
}
|
|
@@ -101,6 +101,8 @@ $notification-text-margin-bottom: $spv--large - $spv-nudge;
|
|
|
101
101
|
background-repeat: no-repeat;
|
|
102
102
|
background-size: unset;
|
|
103
103
|
border: 0;
|
|
104
|
+
// set the height of the button to be size of an icon + padding on top and bottom
|
|
105
|
+
height: calc(2 * $spv--small + $default-icon-size);
|
|
104
106
|
position: absolute;
|
|
105
107
|
right: $sph--large * 0.5;
|
|
106
108
|
top: $spv--small;
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
@extend %vf-button-base;
|
|
6
6
|
@include vf-button-pattern;
|
|
7
7
|
|
|
8
|
-
&.is-active
|
|
8
|
+
&.is-active,
|
|
9
|
+
&[aria-current='page'] {
|
|
9
10
|
background-color: scale-color($color-x-light, $lightness: -$active-background-opacity-amount * 100%);
|
|
10
11
|
color: $color-dark;
|
|
11
12
|
text-decoration: none;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
|
-
$knob-size: $sp-unit *
|
|
2
|
+
$knob-size: $sp-unit * 2;
|
|
3
3
|
|
|
4
4
|
@mixin vf-p-switch {
|
|
5
5
|
.p-switch {
|
|
6
|
+
align-items: center;
|
|
6
7
|
display: flex;
|
|
7
8
|
}
|
|
8
9
|
|
|
@@ -12,6 +13,7 @@ $knob-size: $sp-unit * 3;
|
|
|
12
13
|
position: absolute;
|
|
13
14
|
|
|
14
15
|
&:checked + .p-switch__slider::before {
|
|
16
|
+
border: 1px solid $color-link;
|
|
15
17
|
left: 50%;
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -19,6 +21,10 @@ $knob-size: $sp-unit * 3;
|
|
|
19
21
|
@extend %vf-disabled-element;
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
&:checked + .p-switch__slider {
|
|
25
|
+
background: $color-link;
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
&:focus {
|
|
23
29
|
outline: none;
|
|
24
30
|
|
|
@@ -29,9 +35,8 @@ $knob-size: $sp-unit * 3;
|
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
.p-switch__slider {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
background: linear-gradient(to right, $color-link 50%, $color-mid-light 50%);
|
|
38
|
+
background: $color-mid-light;
|
|
39
|
+
border-radius: $knob-size;
|
|
35
40
|
box-shadow: inset 0 2px 5px 0 transparentize($color-dark, 0.8);
|
|
36
41
|
display: inline-block;
|
|
37
42
|
height: $knob-size;
|
|
@@ -45,6 +50,8 @@ $knob-size: $sp-unit * 3;
|
|
|
45
50
|
@include vf-animation($duration: slow);
|
|
46
51
|
|
|
47
52
|
background: $color-x-light;
|
|
53
|
+
border: 1px solid $color-mid-dark;
|
|
54
|
+
border-radius: 50%;
|
|
48
55
|
content: '';
|
|
49
56
|
height: $knob-size;
|
|
50
57
|
left: 0;
|
|
@@ -27,16 +27,13 @@
|
|
|
27
27
|
tr {
|
|
28
28
|
border: $border;
|
|
29
29
|
border-radius: $border-radius;
|
|
30
|
-
display:
|
|
31
|
-
grid-gap: 0 map-get($grid-gutter-widths, small);
|
|
32
|
-
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
33
|
-
grid-template-rows: auto;
|
|
30
|
+
display: block;
|
|
34
31
|
margin-bottom: $spv--x-large;
|
|
35
32
|
padding: 0 $sph--large;
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
td,
|
|
39
35
|
tbody th {
|
|
36
|
+
display: block;
|
|
40
37
|
min-width: 100%;
|
|
41
38
|
overflow: hidden;
|
|
42
39
|
padding-left: 0;
|