vanilla-framework 3.12.1 → 3.14.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 +10 -12
- package/scss/_base_hr.scss +23 -19
- package/scss/_base_icon-definitions.scss +12 -0
- package/scss/_base_media.scss +0 -1
- package/scss/_base_placeholders.scss +2 -7
- package/scss/_patterns_grid.scss +97 -0
- package/scss/_patterns_icons.scss +36 -0
- package/scss/_patterns_lists.scss +67 -47
- package/scss/_patterns_navigation.scss +74 -14
- package/scss/_patterns_rule.scss +12 -0
- package/scss/_patterns_section.scss +15 -0
- package/scss/_settings_spacing.scss +2 -1
- package/scss/_vanilla.scss +4 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
7
7
|
},
|
|
8
8
|
"bugs": {
|
|
9
9
|
"email": "webteam@canonical.com",
|
|
10
|
-
"url": "
|
|
10
|
+
"url": "https://github.com/canonical/vanilla-framework/issues"
|
|
11
11
|
},
|
|
12
12
|
"description": "A simple, extendable CSS framework.",
|
|
13
13
|
"homepage": "https://vanillaframework.io/",
|
|
@@ -54,29 +54,27 @@
|
|
|
54
54
|
"!/scss/docs",
|
|
55
55
|
"!/scss/standalone"
|
|
56
56
|
],
|
|
57
|
-
"
|
|
57
|
+
"devDependencies": {
|
|
58
58
|
"@canonical/cookie-policy": "3.4.0",
|
|
59
59
|
"@canonical/latest-news": "1.4.1",
|
|
60
|
-
"autoprefixer": "10.4.13",
|
|
61
|
-
"postcss": "8.4.21",
|
|
62
|
-
"postcss-cli": "9.1.0",
|
|
63
|
-
"postcss-scss": "4.0.6",
|
|
64
|
-
"sass": "1.58.3",
|
|
65
|
-
"yaml": "1.10.2"
|
|
66
|
-
},
|
|
67
|
-
"devDependencies": {
|
|
68
60
|
"@percy/script": "1.1.0",
|
|
69
61
|
"@testing-library/cypress": "9.0.0",
|
|
62
|
+
"autoprefixer": "10.4.13",
|
|
70
63
|
"cypress": "12.7.0",
|
|
71
64
|
"get-site-urls": "3.0.0",
|
|
72
65
|
"markdown-spellcheck": "1.3.1",
|
|
73
66
|
"parker": "0.0.10",
|
|
67
|
+
"postcss": "8.4.21",
|
|
68
|
+
"postcss-cli": "9.1.0",
|
|
69
|
+
"postcss-scss": "4.0.6",
|
|
74
70
|
"prettier": "2.8.4",
|
|
71
|
+
"sass": "1.58.3",
|
|
75
72
|
"stylelint": "14.16.1",
|
|
76
73
|
"stylelint-config-prettier": "9.0.5",
|
|
77
74
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
78
75
|
"stylelint-order": "5.0.0",
|
|
79
76
|
"stylelint-prettier": "2.0.0",
|
|
80
|
-
"svgo": "2.8.0"
|
|
77
|
+
"svgo": "2.8.0",
|
|
78
|
+
"yaml": "2.2.2"
|
|
81
79
|
}
|
|
82
80
|
}
|
package/scss/_base_hr.scss
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
|
+
%fixed-width-hr {
|
|
4
|
+
@mixin adjusted-width($size) {
|
|
5
|
+
$gutters-sizes: 2 * map-get($grid-margin-widths, $size);
|
|
6
|
+
|
|
7
|
+
max-width: calc($grid-max-width - $gutters-sizes);
|
|
8
|
+
width: calc(100% - $gutters-sizes);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
margin-left: auto;
|
|
12
|
+
margin-right: auto;
|
|
13
|
+
@include adjusted-width(small);
|
|
14
|
+
|
|
15
|
+
@media (min-width: $threshold-4-6-col) {
|
|
16
|
+
@include adjusted-width(default);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.row &,
|
|
20
|
+
.u-fixed-width & {
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
3
25
|
// Horizontal rule
|
|
4
26
|
@mixin vf-b-hr {
|
|
5
27
|
// stylelint-disable selector-max-type -- base styles can use type selectors
|
|
@@ -18,25 +40,7 @@
|
|
|
18
40
|
}
|
|
19
41
|
|
|
20
42
|
&.is-fixed-width {
|
|
21
|
-
|
|
22
|
-
margin-right: auto;
|
|
23
|
-
max-width: calc($grid-max-width - 2 * map-get($grid-margin-widths, small));
|
|
24
|
-
width: calc(100% - 2 * map-get($grid-margin-widths, small));
|
|
25
|
-
|
|
26
|
-
@media (min-width: $threshold-4-6-col) {
|
|
27
|
-
max-width: calc($grid-max-width - 2 * map-get($grid-margin-widths, default));
|
|
28
|
-
width: calc(100% - 2 * map-get($grid-margin-widths, default));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@media (min-width: $threshold-6-12-col) {
|
|
32
|
-
max-width: calc($grid-max-width - 2 * map-get($grid-margin-widths, default));
|
|
33
|
-
width: calc(100% - 2 * map-get($grid-margin-widths, default));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.row &,
|
|
37
|
-
.u-fixed-width & {
|
|
38
|
-
width: 100%;
|
|
39
|
-
}
|
|
43
|
+
@extend %fixed-width-hr;
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -485,3 +485,15 @@
|
|
|
485
485
|
@mixin vf-icon-desktop($color) {
|
|
486
486
|
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='desktop-2'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Union' fill-rule='evenodd' clip-rule='evenodd' d='M2.5 3.5H13.5V10.5H2.5L2.5 3.5ZM1 3.5C1 2.67157 1.67157 2 2.5 2H13.5C14.3284 2 15 2.67157 15 3.5V10.5C15 11.3284 14.3284 12 13.5 12H8.75V13.25H11V14.75H5V13.25H7.25V12H2.5C1.67157 12 1 11.3284 1 10.5V3.5Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E");
|
|
487
487
|
}
|
|
488
|
+
|
|
489
|
+
@mixin vf-icon-play($color) {
|
|
490
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='play'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Triangle (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M11.3844 7.98987L5.50005 3.87809L5.50005 12.1161L11.3844 7.98987ZM12.538 9.01296C13.2485 8.51475 13.2476 7.46192 12.5363 6.96488L5.96604 2.37377C5.13747 1.7948 4.00005 2.3876 4.00005 3.3984L4.00005 12.5968C4.00005 13.6085 5.13935 14.2011 5.96773 13.6202L12.538 9.01296Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E");
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@mixin vf-icon-pause($color) {
|
|
494
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='pause'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Union' fill-rule='evenodd' clip-rule='evenodd' d='M5.5 3.02393H4V12.9917H5.5V3.02393ZM11.5 3.02393H10V12.9917H11.5V3.02393Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
@mixin vf-icon-stop($color) {
|
|
498
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='stop'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Rectangle 13 (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M12 3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V12C3.5 12.2761 3.72386 12.5 4 12.5H12C12.2761 12.5 12.5 12.2761 12.5 12V4C12.5 3.72386 12.2761 3.5 12 3.5ZM4 2C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4C14 2.89543 13.1046 2 12 2H4Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
499
|
+
}
|
package/scss/_base_media.scss
CHANGED
|
@@ -100,13 +100,8 @@
|
|
|
100
100
|
|
|
101
101
|
// Spacing
|
|
102
102
|
%section-padding--shallow {
|
|
103
|
-
padding-bottom: $spv--x-large
|
|
104
|
-
padding-top: $spv--x-large
|
|
105
|
-
|
|
106
|
-
@media (min-width: $breakpoint-large) {
|
|
107
|
-
padding-bottom: $spv--x-large;
|
|
108
|
-
padding-top: $spv--x-large;
|
|
109
|
-
}
|
|
103
|
+
padding-bottom: $spv--x-large;
|
|
104
|
+
padding-top: $spv--x-large;
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
%section-padding--default {
|
package/scss/_patterns_grid.scss
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
@mixin vf-p-grid {
|
|
38
38
|
// FIXME: this should be removed from framework SCSS
|
|
39
39
|
// (see https://github.com/canonical/vanilla-framework/issues/3199)
|
|
40
|
+
.grid-demo .col,
|
|
40
41
|
.grid-demo [class*='#{$grid-column-prefix}'] {
|
|
41
42
|
background: transparentize($color-negative, 0.9);
|
|
42
43
|
margin-bottom: $spv--small;
|
|
@@ -188,4 +189,100 @@
|
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
}
|
|
192
|
+
|
|
193
|
+
// Common grid patterns
|
|
194
|
+
$col-50-medium: calc($grid-columns-medium / 2);
|
|
195
|
+
|
|
196
|
+
$col-25: calc($grid-columns / 4);
|
|
197
|
+
$col-50: calc($grid-columns / 2);
|
|
198
|
+
$col-75: calc(($grid-columns / 4) * 3);
|
|
199
|
+
|
|
200
|
+
.row--50-50 {
|
|
201
|
+
@extend %vf-row;
|
|
202
|
+
|
|
203
|
+
> .col {
|
|
204
|
+
@include vf-grid-column($grid-columns-small);
|
|
205
|
+
|
|
206
|
+
@media (min-width: $threshold-4-6-col) {
|
|
207
|
+
@include vf-grid-column($col-50-medium);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (min-width: $threshold-6-12-col) {
|
|
211
|
+
@include vf-grid-column($col-50);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.row--25-75 {
|
|
217
|
+
@extend %vf-row;
|
|
218
|
+
|
|
219
|
+
> .col {
|
|
220
|
+
@include vf-grid-column($grid-columns-small);
|
|
221
|
+
|
|
222
|
+
@media (min-width: $threshold-4-6-col) {
|
|
223
|
+
@include vf-grid-column($grid-columns-medium);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@media (min-width: $threshold-6-12-col) {
|
|
227
|
+
&:nth-of-type(1) {
|
|
228
|
+
@include vf-grid-column($col-25);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&:nth-of-type(2) {
|
|
232
|
+
@include vf-grid-column($col-75);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// if there is only one column we offset it to the right
|
|
236
|
+
&:only-of-type {
|
|
237
|
+
grid-column-start: calc($col-25 + 1);
|
|
238
|
+
@include vf-grid-column($col-75);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.row--25-25-50 {
|
|
245
|
+
@extend %vf-row;
|
|
246
|
+
|
|
247
|
+
> .col {
|
|
248
|
+
@include vf-grid-column($grid-columns-small);
|
|
249
|
+
|
|
250
|
+
@media (min-width: $threshold-4-6-col) {
|
|
251
|
+
&:nth-of-type(-n + 2) {
|
|
252
|
+
@include vf-grid-column($col-50-medium);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:nth-of-type(3) {
|
|
256
|
+
@include vf-grid-column($grid-columns-medium);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@media (min-width: $threshold-6-12-col) {
|
|
261
|
+
&:nth-of-type(1),
|
|
262
|
+
&:nth-of-type(2) {
|
|
263
|
+
@include vf-grid-column($col-25);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&:nth-of-type(3) {
|
|
267
|
+
@include vf-grid-column($col-50);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.row--25-25-25-25 {
|
|
274
|
+
@extend %vf-row;
|
|
275
|
+
|
|
276
|
+
> .col {
|
|
277
|
+
@include vf-grid-column($grid-columns-small);
|
|
278
|
+
|
|
279
|
+
@media (min-width: $threshold-4-6-col) {
|
|
280
|
+
@include vf-grid-column($col-50-medium);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@media (min-width: $threshold-6-12-col) {
|
|
284
|
+
@include vf-grid-column($col-25);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
191
288
|
}
|
|
@@ -1550,3 +1550,39 @@
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
|
+
|
|
1554
|
+
@mixin vf-p-icon-play {
|
|
1555
|
+
.p-icon--play {
|
|
1556
|
+
@extend %icon;
|
|
1557
|
+
@include vf-icon-play($color-mid-dark);
|
|
1558
|
+
|
|
1559
|
+
[class*='--dark'] &,
|
|
1560
|
+
&.is-light {
|
|
1561
|
+
@include vf-icon-play($color-mid-x-light);
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
@mixin vf-p-icon-pause {
|
|
1567
|
+
.p-icon--pause {
|
|
1568
|
+
@extend %icon;
|
|
1569
|
+
@include vf-icon-pause($color-mid-dark);
|
|
1570
|
+
|
|
1571
|
+
[class*='--dark'] &,
|
|
1572
|
+
&.is-light {
|
|
1573
|
+
@include vf-icon-pause($color-mid-x-light);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
@mixin vf-p-icon-stop {
|
|
1579
|
+
.p-icon--stop {
|
|
1580
|
+
@extend %icon;
|
|
1581
|
+
@include vf-icon-stop($color-mid-dark);
|
|
1582
|
+
|
|
1583
|
+
[class*='--dark'] &,
|
|
1584
|
+
&.is-light {
|
|
1585
|
+
@include vf-icon-stop($color-mid-x-light);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
|
-
$list-status-icon-height:
|
|
3
|
-
$list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that positions the icon correctly
|
|
2
|
+
$list-status-icon-height: $default-icon-size;
|
|
4
3
|
|
|
5
4
|
@mixin vf-p-list-placeholders {
|
|
6
5
|
%numbered-step-container {
|
|
@@ -69,18 +68,62 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
69
68
|
content: '';
|
|
70
69
|
display: inline-block;
|
|
71
70
|
height: $sph--large;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
top: $spv--small;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
%vf-list-item-ordered {
|
|
75
|
+
&::marker {
|
|
76
|
+
content: none;
|
|
77
|
+
display: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&::before {
|
|
81
|
+
color: $color-dark;
|
|
82
|
+
content: counters(list-item, '.') '. ';
|
|
83
|
+
display: inline-block;
|
|
84
|
+
text-align: right;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
%vf-list-item-bullet {
|
|
89
|
+
&::before {
|
|
90
|
+
color: $color-dark;
|
|
91
|
+
content: '•';
|
|
92
|
+
display: inline-block;
|
|
93
|
+
text-align: right;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@mixin vf-list-item-has-prefix {
|
|
99
|
+
padding-left: $sp-x-large;
|
|
100
|
+
position: relative;
|
|
101
|
+
|
|
102
|
+
> .p-list--divided,
|
|
103
|
+
> .p-list {
|
|
104
|
+
margin-left: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::before {
|
|
108
|
+
left: 0;
|
|
109
|
+
position: absolute;
|
|
110
|
+
width: $sp-medium;
|
|
76
111
|
}
|
|
77
112
|
}
|
|
78
113
|
|
|
79
114
|
@mixin vf-list-item-divided {
|
|
80
|
-
box-shadow: inset 0px 1px 0px
|
|
115
|
+
box-shadow: inset 0px 1px 0px 0px $color-mid-x-light;
|
|
81
116
|
margin: 0;
|
|
82
117
|
padding-bottom: $sph--large;
|
|
83
118
|
padding-top: $sph--small;
|
|
119
|
+
|
|
120
|
+
&:first-child {
|
|
121
|
+
box-shadow: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-list--divided > .p-list__item:first-child {
|
|
125
|
+
box-shadow: inset 0px 1px 0px 0px $color-mid-x-light;
|
|
126
|
+
}
|
|
84
127
|
}
|
|
85
128
|
|
|
86
129
|
// Mixin for inline list items
|
|
@@ -95,14 +138,6 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
95
138
|
}
|
|
96
139
|
}
|
|
97
140
|
|
|
98
|
-
@function svg-tick($color) {
|
|
99
|
-
@if type-of($color) != 'color' {
|
|
100
|
-
@warn '#{$color} is not a color.';
|
|
101
|
-
@return false;
|
|
102
|
-
}
|
|
103
|
-
@return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle fill='" + vf-url-friendly-color($color) + "' cx='7' cy='7' r='7'/%3E%3Cpath fill='%23fff' d='M6.1 10.813L2.41 8.105l1.184-1.613L5.9 8.187l4.393-4.394 1.414 1.414z' /%3E%3C/svg%3E");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
141
|
// List styling using list class
|
|
107
142
|
@mixin vf-p-list {
|
|
108
143
|
.p-list {
|
|
@@ -115,22 +150,6 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
115
150
|
}
|
|
116
151
|
}
|
|
117
152
|
|
|
118
|
-
%vf-list-item-ordered {
|
|
119
|
-
&::marker {
|
|
120
|
-
content: none;
|
|
121
|
-
display: none;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&::before {
|
|
125
|
-
color: $color-dark;
|
|
126
|
-
content: counters(list-item, '.') '. ';
|
|
127
|
-
display: inline-block;
|
|
128
|
-
margin-right: $sph--large;
|
|
129
|
-
text-align: right;
|
|
130
|
-
width: $sph--large;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
153
|
// A list with separators between items
|
|
135
154
|
@mixin vf-p-list-divided {
|
|
136
155
|
.p-list--divided {
|
|
@@ -139,6 +158,11 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
139
158
|
.p-list__item {
|
|
140
159
|
@extend %vf-list-item;
|
|
141
160
|
@include vf-list-item-divided;
|
|
161
|
+
|
|
162
|
+
&.is-ticked::before,
|
|
163
|
+
&.is-crossed::before {
|
|
164
|
+
top: $spv--medium;
|
|
165
|
+
}
|
|
142
166
|
}
|
|
143
167
|
|
|
144
168
|
&.is-split .p-list__item:last-of-type {
|
|
@@ -159,8 +183,10 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
159
183
|
// stylelint-disable selector-max-type -- we want to target ordered lists
|
|
160
184
|
ol.p-list--divided {
|
|
161
185
|
list-style: none;
|
|
186
|
+
|
|
162
187
|
.p-list__item {
|
|
163
188
|
@extend %vf-list-item-ordered;
|
|
189
|
+
@include vf-list-item-has-prefix;
|
|
164
190
|
}
|
|
165
191
|
}
|
|
166
192
|
// stylelint-enable selector-max-type -- we want to target ordered lists
|
|
@@ -168,37 +194,31 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
168
194
|
|
|
169
195
|
// Displays item with a state icon
|
|
170
196
|
@mixin vf-p-list-item-state {
|
|
171
|
-
.is-ticked {
|
|
197
|
+
.p-list__item.is-ticked {
|
|
198
|
+
@include vf-list-item-has-prefix;
|
|
199
|
+
|
|
172
200
|
&::before {
|
|
173
201
|
@extend %vf-list-item-state-base;
|
|
174
202
|
@include vf-icon-success;
|
|
175
203
|
}
|
|
176
204
|
}
|
|
177
205
|
|
|
178
|
-
.is-crossed {
|
|
206
|
+
.p-list__item.is-crossed {
|
|
207
|
+
@include vf-list-item-has-prefix;
|
|
208
|
+
|
|
179
209
|
&::before {
|
|
180
210
|
@extend %vf-list-item-state-base;
|
|
181
211
|
@include vf-icon-error;
|
|
182
212
|
}
|
|
183
213
|
}
|
|
184
|
-
}
|
|
185
214
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
display: inline-block;
|
|
191
|
-
margin-right: $sph--large;
|
|
192
|
-
text-align: right;
|
|
193
|
-
width: $sph--large;
|
|
215
|
+
// Displays item with a bullet
|
|
216
|
+
.p-list__item.has-bullet {
|
|
217
|
+
@extend %vf-list-item-bullet;
|
|
218
|
+
@include vf-list-item-has-prefix;
|
|
194
219
|
}
|
|
195
220
|
}
|
|
196
221
|
|
|
197
|
-
// Displays item with a bullet
|
|
198
|
-
.has-bullet {
|
|
199
|
-
@extend %vf-list-item-bullet;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
222
|
// Displays a list inline with spacing
|
|
203
223
|
@mixin vf-p-inline-list {
|
|
204
224
|
.p-inline-list {
|
|
@@ -57,6 +57,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
57
57
|
$properties: #{background-color, color, opacity};
|
|
58
58
|
@extend %navigation-link-responsive-padding-horizontal;
|
|
59
59
|
@extend %navigation-link-responsive-padding-vertical;
|
|
60
|
+
@extend %vf-navigation-separator;
|
|
60
61
|
@include vf-transition($properties, snap);
|
|
61
62
|
@include vf-focus;
|
|
62
63
|
|
|
@@ -70,23 +71,19 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
70
71
|
line-height: map-get($line-heights, default-text);
|
|
71
72
|
margin: 0;
|
|
72
73
|
overflow: hidden;
|
|
74
|
+
padding-left: calc(#{map-get($grid-margin-widths, small)} + #{$sph--x-large}); // allow navigation align with tag logo text on small screens
|
|
73
75
|
position: relative;
|
|
74
76
|
text-align: left;
|
|
75
77
|
text-overflow: ellipsis;
|
|
76
78
|
white-space: nowrap;
|
|
77
79
|
width: 100%;
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
left: 0;
|
|
83
|
-
position: absolute;
|
|
84
|
-
right: 0;
|
|
85
|
-
top: 0;
|
|
81
|
+
@media (min-width: $threshold-4-6-col) {
|
|
82
|
+
padding-left: calc(#{map-get($grid-margin-widths, default)} + #{$sph--x-large});
|
|
83
|
+
}
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
85
|
+
@media (min-width: $breakpoint-navigation-threshold) {
|
|
86
|
+
padding-left: $sph--large;
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
&:visited,
|
|
@@ -101,6 +98,25 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
101
98
|
padding-right: 0;
|
|
102
99
|
}
|
|
103
100
|
|
|
101
|
+
%vf-navigation-separator {
|
|
102
|
+
&::before {
|
|
103
|
+
content: '';
|
|
104
|
+
height: 1px;
|
|
105
|
+
left: calc(#{map-get($grid-margin-widths, small)} + #{$sph--x-large});
|
|
106
|
+
position: absolute;
|
|
107
|
+
right: 0;
|
|
108
|
+
top: 0;
|
|
109
|
+
|
|
110
|
+
@media (min-width: $threshold-4-6-col) {
|
|
111
|
+
left: calc(#{map-get($grid-margin-widths, default)} + #{$sph--x-large});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (min-width: $breakpoint-navigation-threshold) {
|
|
115
|
+
content: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
104
120
|
.p-navigation {
|
|
105
121
|
display: flex;
|
|
106
122
|
flex-direction: column;
|
|
@@ -190,6 +206,17 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
190
206
|
justify-content: space-between;
|
|
191
207
|
padding-right: 0;
|
|
192
208
|
|
|
209
|
+
.p-navigation__link {
|
|
210
|
+
// reset padding for navigation links in the navigation banner
|
|
211
|
+
@extend %navigation-link-responsive-padding-horizontal;
|
|
212
|
+
@extend %navigation-link-responsive-padding-vertical;
|
|
213
|
+
|
|
214
|
+
// remove navigation separator for navigation links in the navigation banner
|
|
215
|
+
&::before {
|
|
216
|
+
content: none;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
193
220
|
@media (min-width: $threshold-4-6-col) {
|
|
194
221
|
padding-left: map-get($grid-margin-widths, default);
|
|
195
222
|
padding-right: 0;
|
|
@@ -270,10 +297,18 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
270
297
|
|
|
271
298
|
// navigation items
|
|
272
299
|
.p-navigation__items {
|
|
300
|
+
@extend %vf-navigation-separator;
|
|
301
|
+
|
|
273
302
|
display: none; // hidden by default on mobile (expands is a dropdown)
|
|
274
303
|
list-style: none;
|
|
275
304
|
margin: -1px 0 0 0;
|
|
276
305
|
padding: 0;
|
|
306
|
+
position: relative;
|
|
307
|
+
|
|
308
|
+
// remove navigation separator for the first navigation items list
|
|
309
|
+
&:first-child::before {
|
|
310
|
+
content: none;
|
|
311
|
+
}
|
|
277
312
|
|
|
278
313
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
279
314
|
display: flex;
|
|
@@ -301,6 +336,11 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
301
336
|
flex-wrap: wrap;
|
|
302
337
|
margin-top: 0; // prevents bottom border of nav from moving 1px
|
|
303
338
|
|
|
339
|
+
// remove separtion for navigation items in the navigation banner
|
|
340
|
+
&::before {
|
|
341
|
+
content: none;
|
|
342
|
+
}
|
|
343
|
+
|
|
304
344
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
305
345
|
display: none;
|
|
306
346
|
}
|
|
@@ -544,6 +584,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
544
584
|
right: map-get($grid-margin-widths, small);
|
|
545
585
|
text-indent: calc(100% + 10rem);
|
|
546
586
|
top: calc($spv--large + map-get($nudges, x-small));
|
|
587
|
+
transform: rotate(-90deg);
|
|
547
588
|
width: map-get($icon-sizes, default);
|
|
548
589
|
|
|
549
590
|
@media (min-width: $threshold-4-6-col) {
|
|
@@ -552,12 +593,17 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
552
593
|
|
|
553
594
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
554
595
|
right: calc($sph--small + 1px); // 1px for the border on selects. this aligns it with any selects underneath
|
|
596
|
+
transform: rotate(0deg);
|
|
555
597
|
}
|
|
556
598
|
}
|
|
557
599
|
|
|
558
600
|
&.is-active {
|
|
559
601
|
&::after {
|
|
560
|
-
transform: rotate(
|
|
602
|
+
transform: rotate(0deg);
|
|
603
|
+
|
|
604
|
+
@media (min-width: $breakpoint-navigation-threshold) {
|
|
605
|
+
transform: rotate(180deg);
|
|
606
|
+
}
|
|
561
607
|
}
|
|
562
608
|
|
|
563
609
|
.p-navigation__dropdown,
|
|
@@ -570,18 +616,29 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
570
616
|
// add padding to accommodate icon
|
|
571
617
|
padding-right: 2 * $sph--small + map-get($icon-sizes, default);
|
|
572
618
|
}
|
|
619
|
+
|
|
620
|
+
&:first-child .p-navigation__link::before {
|
|
621
|
+
content: none;
|
|
622
|
+
}
|
|
573
623
|
}
|
|
574
624
|
|
|
575
625
|
.p-navigation__dropdown-item {
|
|
576
626
|
@extend %navigation-link-responsive-padding-horizontal;
|
|
627
|
+
@extend %navigation-link-responsive-padding-vertical;
|
|
628
|
+
@extend %vf-navigation-separator;
|
|
577
629
|
|
|
578
630
|
display: block;
|
|
579
|
-
padding-
|
|
580
|
-
|
|
631
|
+
padding-left: calc(#{map-get($grid-margin-widths, small)} + #{$sph--x-large}); // make dropdown items align with the tag logo text
|
|
632
|
+
position: relative;
|
|
581
633
|
white-space: nowrap;
|
|
582
634
|
|
|
635
|
+
@media (min-width: $threshold-4-6-col) {
|
|
636
|
+
padding-left: calc(#{map-get($grid-margin-widths, default)} + #{$sph--x-large});
|
|
637
|
+
}
|
|
638
|
+
|
|
583
639
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
584
640
|
padding-bottom: $spv--medium;
|
|
641
|
+
padding-left: $sph--large;
|
|
585
642
|
padding-top: $spv--medium;
|
|
586
643
|
}
|
|
587
644
|
|
|
@@ -685,7 +742,10 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
|
685
742
|
}
|
|
686
743
|
}
|
|
687
744
|
|
|
688
|
-
|
|
745
|
+
// add color to separator line for navigation items, navigation links and dropdown items
|
|
746
|
+
.p-navigation__nav .p-navigation__link::before,
|
|
747
|
+
.p-navigation__nav .p-navigation__items::before,
|
|
748
|
+
.p-navigation__nav .p-navigation__items .p-navigation__dropdown-item::before {
|
|
689
749
|
background: $color-navigation-separator;
|
|
690
750
|
}
|
|
691
751
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@mixin vf-p-section {
|
|
2
|
+
.p-section {
|
|
3
|
+
// same as %section-padding--default
|
|
4
|
+
padding-bottom: $spv--strip-regular * 0.5;
|
|
5
|
+
|
|
6
|
+
@media (min-width: $breakpoint-large) {
|
|
7
|
+
padding-bottom: $spv--strip-regular;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.p-block {
|
|
12
|
+
// same as %section-padding--shallow
|
|
13
|
+
padding-bottom: $spv--x-large;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -75,8 +75,9 @@ $spv--small: $sp-unit !default;
|
|
|
75
75
|
$spv--medium: $sp-unit * 1.5 !default;
|
|
76
76
|
$spv--large: $sp-unit * 2;
|
|
77
77
|
$spv--x-large: $sp-unit * 3 !default;
|
|
78
|
+
$spv--strip-shallow: $sp-unit * 3 !default;
|
|
78
79
|
$spv--strip-regular: $sp-unit * 8 !default;
|
|
79
|
-
$spv--strip-deep: $sp-unit *
|
|
80
|
+
$spv--strip-deep: $sp-unit * 16 !default;
|
|
80
81
|
|
|
81
82
|
$sph--x-small: $sp-unit * 0.5 !default; // to be used in place of an inline space between characters/words
|
|
82
83
|
$sph--small: $sp-unit !default;
|
package/scss/_vanilla.scss
CHANGED
|
@@ -34,8 +34,10 @@
|
|
|
34
34
|
@import 'patterns_notifications';
|
|
35
35
|
@import 'patterns_pagination';
|
|
36
36
|
@import 'patterns_pull-quotes';
|
|
37
|
+
@import 'patterns_rule';
|
|
37
38
|
@import 'patterns_search-and-filter';
|
|
38
39
|
@import 'patterns_search-box';
|
|
40
|
+
@import 'patterns_section';
|
|
39
41
|
@import 'patterns_separator';
|
|
40
42
|
@import 'patterns_side-navigation';
|
|
41
43
|
@import 'patterns_side-navigation-expandable';
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
@include vf-p-buttons;
|
|
93
95
|
@include vf-p-card;
|
|
94
96
|
@include vf-p-chip;
|
|
97
|
+
@include vf-p-section;
|
|
95
98
|
@include vf-p-badge;
|
|
96
99
|
@include vf-p-code-snippet;
|
|
97
100
|
@include vf-p-contextual-menu;
|
|
@@ -119,6 +122,7 @@
|
|
|
119
122
|
@include vf-p-notification;
|
|
120
123
|
@include vf-p-pagination;
|
|
121
124
|
@include vf-p-pull-quotes;
|
|
125
|
+
@include vf-p-rule;
|
|
122
126
|
@include vf-p-search-and-filter;
|
|
123
127
|
@include vf-p-search-box;
|
|
124
128
|
@include vf-p-segmented-control;
|