vanilla-framework 3.11.1 → 3.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 +6 -6
- package/scss/_base_icon-definitions.scss +12 -0
- package/scss/_base_typography-definitions.scss +17 -7
- package/scss/_base_typography.scss +2 -0
- package/scss/_patterns_article-pagination.scss +7 -5
- package/scss/_patterns_icons.scss +36 -0
- package/scss/_patterns_lists.scss +93 -33
- package/scss/_patterns_logo-section.scss +7 -3
- package/scss/_patterns_muted-heading.scss +2 -1
- package/scss/_patterns_navigation.scss +74 -14
- package/scss/_patterns_search-and-filter.scss +1 -1
- package/scss/_utilities_has-icon.scss +6 -0
- package/scss/_vanilla.scss +2 -0
package/package.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
+
"name": "vanilla-framework",
|
|
3
|
+
"version": "3.13.0",
|
|
2
4
|
"author": {
|
|
3
5
|
"email": "webteam@canonical.com",
|
|
4
6
|
"name": "Canonical Webteam"
|
|
@@ -20,7 +22,6 @@
|
|
|
20
22
|
"module"
|
|
21
23
|
],
|
|
22
24
|
"license": "LGPL-3.0",
|
|
23
|
-
"name": "vanilla-framework",
|
|
24
25
|
"repository": {
|
|
25
26
|
"type": "git",
|
|
26
27
|
"url": "https://github.com/canonical/vanilla-framework"
|
|
@@ -47,7 +48,6 @@
|
|
|
47
48
|
"percy": "percy exec -- node snapshots.js",
|
|
48
49
|
"icon-svgs-to-mixins": "node scripts/convert-svgs-to-icon-mixins.js icons"
|
|
49
50
|
},
|
|
50
|
-
"version": "3.11.1",
|
|
51
51
|
"files": [
|
|
52
52
|
"_index.scss",
|
|
53
53
|
"/scss",
|
|
@@ -61,19 +61,19 @@
|
|
|
61
61
|
"postcss": "8.4.21",
|
|
62
62
|
"postcss-cli": "9.1.0",
|
|
63
63
|
"postcss-scss": "4.0.6",
|
|
64
|
-
"sass": "1.58.
|
|
64
|
+
"sass": "1.58.3",
|
|
65
65
|
"yaml": "1.10.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@percy/script": "1.1.0",
|
|
69
69
|
"@testing-library/cypress": "9.0.0",
|
|
70
|
-
"cypress": "12.
|
|
70
|
+
"cypress": "12.7.0",
|
|
71
71
|
"get-site-urls": "3.0.0",
|
|
72
72
|
"markdown-spellcheck": "1.3.1",
|
|
73
73
|
"parker": "0.0.10",
|
|
74
|
-
"prettier": "2.8.
|
|
74
|
+
"prettier": "2.8.4",
|
|
75
75
|
"stylelint": "14.16.1",
|
|
76
|
-
"stylelint-config-prettier": "9.0.
|
|
76
|
+
"stylelint-config-prettier": "9.0.5",
|
|
77
77
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
78
78
|
"stylelint-order": "5.0.0",
|
|
79
79
|
"stylelint-prettier": "2.0.0",
|
|
@@ -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
|
+
}
|
|
@@ -146,6 +146,8 @@
|
|
|
146
146
|
|
|
147
147
|
%default-text {
|
|
148
148
|
@extend %common-default-text-properties;
|
|
149
|
+
font-size: 1rem;
|
|
150
|
+
font-weight: $font-weight-regular-text;
|
|
149
151
|
|
|
150
152
|
margin-bottom: map-get($sp-after, default-text) - map-get($nudges, p);
|
|
151
153
|
}
|
|
@@ -204,10 +206,22 @@
|
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
%small-caps-text {
|
|
207
|
-
@extend %
|
|
209
|
+
@extend %default-text;
|
|
208
210
|
font-variant-caps: all-small-caps;
|
|
209
211
|
letter-spacing: 0.05em;
|
|
210
212
|
margin-bottom: map-get($sp-after, default-text) - map-get($nudges, p);
|
|
213
|
+
|
|
214
|
+
&.u-no-margin--bottom {
|
|
215
|
+
@extend %u-no-margin--bottom--small;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// deprecated: the use of .u-align-text--x-small-to-default on small caps text is deprecated
|
|
219
|
+
// previously small caps was implemented as x-small text variant requiring .u-align-text--x-small-to-default compensations
|
|
220
|
+
// but now it's implemented with default text size not requiring any compensations,
|
|
221
|
+
// so we need to reset the padding-top to the default value
|
|
222
|
+
&.u-align-text--x-small-to-default {
|
|
223
|
+
padding-top: map-get($nudges, p) + map-get($browser-rounding-compensations, p);
|
|
224
|
+
}
|
|
211
225
|
}
|
|
212
226
|
|
|
213
227
|
%table-header-label {
|
|
@@ -218,13 +232,9 @@
|
|
|
218
232
|
text-transform: uppercase;
|
|
219
233
|
}
|
|
220
234
|
|
|
235
|
+
// deprecated: %muted-text is deprecated, use %small-caps-text instead
|
|
221
236
|
%muted-heading {
|
|
222
|
-
@extend %
|
|
223
|
-
@extend %table-header-label;
|
|
224
|
-
|
|
225
|
-
&.u-no-margin--bottom {
|
|
226
|
-
@extend %u-no-margin--bottom--small;
|
|
227
|
-
}
|
|
237
|
+
@extend %small-caps-text;
|
|
228
238
|
}
|
|
229
239
|
|
|
230
240
|
%bold {
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
@mixin vf-p-article-pagination {
|
|
4
4
|
%chevron-icon {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
@extend %icon;
|
|
6
|
+
@include vf-icon-chevron($color-mid-dark);
|
|
7
|
+
|
|
8
|
+
content: '';
|
|
8
9
|
position: absolute;
|
|
9
|
-
top:
|
|
10
|
+
top: calc($spv--large + $spv--x-small);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.p-article-pagination {
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
@extend %chevron-icon;
|
|
75
76
|
|
|
76
77
|
left: $sp-small;
|
|
77
|
-
transform:
|
|
78
|
+
transform: rotate(90deg);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
@extend %chevron-icon;
|
|
97
98
|
|
|
98
99
|
right: $sp-small;
|
|
100
|
+
transform: rotate(-90deg);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
}
|
|
@@ -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 {
|
|
@@ -64,33 +63,59 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
64
63
|
|
|
65
64
|
%vf-list-item-state-base {
|
|
66
65
|
@extend %vf-list;
|
|
67
|
-
|
|
68
|
-
background-position-y: $spv--x-small + $list-status-icon-nudge;
|
|
69
66
|
background-repeat: no-repeat;
|
|
70
67
|
background-size: $list-status-icon-height;
|
|
71
|
-
|
|
68
|
+
content: '';
|
|
69
|
+
display: inline-block;
|
|
70
|
+
height: $sph--large;
|
|
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
|
+
}
|
|
72
95
|
}
|
|
73
96
|
}
|
|
74
97
|
|
|
75
|
-
@mixin vf-list-item-
|
|
98
|
+
@mixin vf-list-item-has-prefix {
|
|
99
|
+
padding-left: $sp-x-large;
|
|
76
100
|
position: relative;
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
> .p-list--divided,
|
|
103
|
+
> .p-list {
|
|
104
|
+
margin-left: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::before {
|
|
83
108
|
left: 0;
|
|
84
109
|
position: absolute;
|
|
85
|
-
|
|
110
|
+
width: $sp-medium;
|
|
86
111
|
}
|
|
112
|
+
}
|
|
87
113
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
114
|
+
@mixin vf-list-item-divided {
|
|
115
|
+
box-shadow: inset 0px 1px 0px 0px $color-mid-x-light;
|
|
116
|
+
margin: 0;
|
|
117
|
+
padding-bottom: $sph--large;
|
|
118
|
+
padding-top: $sph--small;
|
|
94
119
|
}
|
|
95
120
|
|
|
96
121
|
// Mixin for inline list items
|
|
@@ -105,14 +130,6 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
105
130
|
}
|
|
106
131
|
}
|
|
107
132
|
|
|
108
|
-
@function svg-tick($color) {
|
|
109
|
-
@if type-of($color) != 'color' {
|
|
110
|
-
@warn '#{$color} is not a color.';
|
|
111
|
-
@return false;
|
|
112
|
-
}
|
|
113
|
-
@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");
|
|
114
|
-
}
|
|
115
|
-
|
|
116
133
|
// List styling using list class
|
|
117
134
|
@mixin vf-p-list {
|
|
118
135
|
.p-list {
|
|
@@ -133,24 +150,64 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
133
150
|
.p-list__item {
|
|
134
151
|
@extend %vf-list-item;
|
|
135
152
|
@include vf-list-item-divided;
|
|
153
|
+
|
|
154
|
+
&.is-ticked::before,
|
|
155
|
+
&.is-crossed::before {
|
|
156
|
+
top: $spv--medium;
|
|
157
|
+
}
|
|
136
158
|
}
|
|
137
159
|
|
|
138
160
|
&.is-split .p-list__item:last-of-type {
|
|
139
161
|
border-bottom: 1px solid $color-mid-light;
|
|
140
162
|
}
|
|
163
|
+
|
|
164
|
+
& & {
|
|
165
|
+
margin-bottom: 0;
|
|
166
|
+
margin-left: $sp-x-large;
|
|
167
|
+
padding-top: $sph--large;
|
|
168
|
+
|
|
169
|
+
.p-list__item:last-child {
|
|
170
|
+
padding-bottom: 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
141
173
|
}
|
|
174
|
+
|
|
175
|
+
// stylelint-disable selector-max-type -- we want to target ordered lists
|
|
176
|
+
ol.p-list--divided {
|
|
177
|
+
list-style: none;
|
|
178
|
+
|
|
179
|
+
.p-list__item {
|
|
180
|
+
@extend %vf-list-item-ordered;
|
|
181
|
+
@include vf-list-item-has-prefix;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// stylelint-enable selector-max-type -- we want to target ordered lists
|
|
142
185
|
}
|
|
143
186
|
|
|
144
187
|
// Displays item with a state icon
|
|
145
188
|
@mixin vf-p-list-item-state {
|
|
146
|
-
.is-ticked {
|
|
147
|
-
@
|
|
148
|
-
|
|
189
|
+
.p-list__item.is-ticked {
|
|
190
|
+
@include vf-list-item-has-prefix;
|
|
191
|
+
|
|
192
|
+
&::before {
|
|
193
|
+
@extend %vf-list-item-state-base;
|
|
194
|
+
@include vf-icon-success;
|
|
195
|
+
}
|
|
149
196
|
}
|
|
150
197
|
|
|
151
|
-
.is-crossed {
|
|
152
|
-
@
|
|
153
|
-
|
|
198
|
+
.p-list__item.is-crossed {
|
|
199
|
+
@include vf-list-item-has-prefix;
|
|
200
|
+
|
|
201
|
+
&::before {
|
|
202
|
+
@extend %vf-list-item-state-base;
|
|
203
|
+
@include vf-icon-error;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Displays item with a bullet
|
|
208
|
+
.p-list__item.has-bullet {
|
|
209
|
+
@extend %vf-list-item-bullet;
|
|
210
|
+
@include vf-list-item-has-prefix;
|
|
154
211
|
}
|
|
155
212
|
}
|
|
156
213
|
|
|
@@ -288,6 +345,10 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
288
345
|
width: $bullet-width;
|
|
289
346
|
}
|
|
290
347
|
}
|
|
348
|
+
.p-strip--dark &::before {
|
|
349
|
+
background-color: $color-x-dark;
|
|
350
|
+
border: 1px solid $color-x-light;
|
|
351
|
+
}
|
|
291
352
|
}
|
|
292
353
|
|
|
293
354
|
.p-stepped-list__title + .p-stepped-list__content {
|
|
@@ -407,7 +468,6 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
407
468
|
columns: 2;
|
|
408
469
|
|
|
409
470
|
.p-list__item {
|
|
410
|
-
display: inline-block;
|
|
411
471
|
width: 100%;
|
|
412
472
|
}
|
|
413
473
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
|
|
3
|
-
@mixin vf-p-set-logo-section-item-width($breakpoint: small) {
|
|
3
|
+
@mixin vf-p-set-logo-section-item-width($breakpoint: small, $column-span: 1) {
|
|
4
4
|
// This mixin calculates the width of an individual logo.
|
|
5
5
|
|
|
6
6
|
$grid-column-count: $grid-columns-small;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
$gutter: map-get($grid-gutter-widths, default);
|
|
27
27
|
$media-query-keyword: min-width;
|
|
28
28
|
$media-query-width: $threshold-6-12-col;
|
|
29
|
-
$logo-column-span:
|
|
29
|
+
$logo-column-span: $column-span;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
@media ($media-query-keyword: #{$media-query-width}) {
|
|
@@ -141,7 +141,11 @@
|
|
|
141
141
|
|
|
142
142
|
@include vf-p-set-logo-section-item-width($breakpoint: small);
|
|
143
143
|
@include vf-p-set-logo-section-item-width($breakpoint: medium);
|
|
144
|
-
@include vf-p-set-logo-section-item-width($breakpoint: large);
|
|
144
|
+
@include vf-p-set-logo-section-item-width($breakpoint: large, $column-span: 2);
|
|
145
|
+
|
|
146
|
+
.p-logo-section--dense & {
|
|
147
|
+
@include vf-p-set-logo-section-item-width($breakpoint: large);
|
|
148
|
+
}
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
.p-logo-section__logo {
|
|
@@ -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
|
|
package/scss/_vanilla.scss
CHANGED
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
@import 'utilities_equal-height';
|
|
68
68
|
@import 'utilities_floats';
|
|
69
69
|
@import 'utilities_font-metrics';
|
|
70
|
+
@import 'utilities_has-icon';
|
|
70
71
|
@import 'utilities_hide';
|
|
71
72
|
@import 'utilities_image-position';
|
|
72
73
|
@import 'utilities_layout';
|
|
@@ -150,6 +151,7 @@
|
|
|
150
151
|
@include vf-u-embedded-media;
|
|
151
152
|
@include vf-u-equal-height;
|
|
152
153
|
@include vf-u-floats;
|
|
154
|
+
@include vf-u-has-icon;
|
|
153
155
|
@include vf-u-image-position;
|
|
154
156
|
@include vf-u-layout;
|
|
155
157
|
@include vf-u-margin-collapse;
|