vanilla-framework 3.5.0 → 3.7.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/README.md +3 -3
- package/package.json +12 -8
- package/scss/_base_button.scss +1 -1
- package/scss/_layouts_application.scss +4 -22
- package/scss/_patterns_accordion.scss +17 -4
- package/scss/_patterns_badge.scss +34 -0
- package/scss/_patterns_chip.scss +1 -1
- package/scss/_patterns_contextual-menu.scss +1 -1
- package/scss/_patterns_form-tick-elements.scss +1 -1
- package/scss/_patterns_grid.scss +1 -1
- package/scss/_patterns_lists.scss +11 -9
- package/scss/_patterns_navigation.scss +3 -3
- package/scss/_patterns_search-and-filter.scss +1 -1
- package/scss/_patterns_side-navigation-expandable.scss +113 -0
- package/scss/_patterns_side-navigation.scss +7 -5
- package/scss/_patterns_switch.scss +1 -1
- package/scss/_patterns_tabs.scss +5 -2
- package/scss/_settings_animations.scss +10 -2
- package/scss/_vanilla.scss +4 -0
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#  Vanilla Framework
|
|
2
2
|
|
|
3
|
-
[](https://circleci.com/gh/canonical/vanilla-framework)
|
|
4
4
|
[](http://badge.fury.io/js/vanilla-framework)
|
|
5
5
|
[](https://www.npmjs.com/package/vanilla-framework)
|
|
6
|
-
[](https://david-dm.org/canonical/vanilla-framework#info=devDependencies)
|
|
7
7
|
[](http://webchat.freenode.net/?channels=vanilla-framework)
|
|
8
8
|
[](https://percy.io)
|
|
9
9
|
|
|
@@ -24,7 +24,7 @@ Vanilla Framework is an extensible CSS framework, built using [Sass](http://sass
|
|
|
24
24
|
|
|
25
25
|
### Hotlinking
|
|
26
26
|
|
|
27
|
-
You can link to the latest build to add directly into your markup like so, by replacing the x values with the [version number you wish to link](https://github.com/canonical
|
|
27
|
+
You can link to the latest build to add directly into your markup like so, by replacing the x values with the [version number you wish to link](https://github.com/canonical/vanilla-framework/releases).
|
|
28
28
|
|
|
29
29
|
```html
|
|
30
30
|
<link rel="stylesheet" href="https://assets.ubuntu.com/v1/vanilla-framework-version-x.x.x.min.css" />
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"bugs": {
|
|
7
7
|
"email": "webteam@canonical.com",
|
|
8
|
-
"url": "http://github.com/canonical
|
|
8
|
+
"url": "http://github.com/canonical/vanilla-framework/issues"
|
|
9
9
|
},
|
|
10
10
|
"description": "A simple, extendable CSS framework.",
|
|
11
11
|
"homepage": "https://vanillaframework.io/",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"name": "vanilla-framework",
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "https://github.com/canonical
|
|
26
|
+
"url": "https://github.com/canonical/vanilla-framework"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"start": "yarn build && yarn serve",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"build:essential": "yarn run build-js && sass --load-path=node_modules --embed-sources --style=compressed scss/build.scss:build/css/build.css scss/docs:build/css/docs && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
|
|
33
33
|
"build-js": "mkdir -p build/js/modules && cp node_modules/@canonical/cookie-policy/build/js/cookie-policy.js build/js/modules && cp node_modules/@canonical/latest-news/dist/latest-news.js build/js/modules",
|
|
34
34
|
"build-class-references": "node scripts/create-class-references.js",
|
|
35
|
+
"cypress:open": "cypress open",
|
|
36
|
+
"cypress:run": "cypress run",
|
|
35
37
|
"serve": "./entrypoint 0.0.0.0:${PORT}",
|
|
36
38
|
"test-scss": "node -e 'require(\"./tests/parker\").parkerTest()'",
|
|
37
39
|
"test-spelling": "mdspell templates/docs/**/*.md -r -n -a --en-gb",
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"percy": "percy exec -- node snapshots.js",
|
|
46
48
|
"icon-svgs-to-mixins": "node scripts/convert-svgs-to-icon-mixins.js icons"
|
|
47
49
|
},
|
|
48
|
-
"version": "3.
|
|
50
|
+
"version": "3.7.0",
|
|
49
51
|
"files": [
|
|
50
52
|
"_index.scss",
|
|
51
53
|
"/scss",
|
|
@@ -54,21 +56,23 @@
|
|
|
54
56
|
],
|
|
55
57
|
"dependencies": {
|
|
56
58
|
"@canonical/cookie-policy": "3.4.0",
|
|
57
|
-
"@canonical/latest-news": "1.
|
|
58
|
-
"autoprefixer": "10.4.
|
|
59
|
+
"@canonical/latest-news": "1.4.1",
|
|
60
|
+
"autoprefixer": "10.4.8",
|
|
59
61
|
"postcss": "8.4.14",
|
|
60
62
|
"postcss-cli": "9.1.0",
|
|
61
63
|
"postcss-scss": "4.0.4",
|
|
62
|
-
"sass": "1.
|
|
64
|
+
"sass": "1.54.0",
|
|
63
65
|
"yaml": "1.10.2"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
68
|
"@percy/script": "1.1.0",
|
|
69
|
+
"@testing-library/cypress": "8.0.3",
|
|
70
|
+
"cypress": "10.6.0",
|
|
67
71
|
"get-site-urls": "1.1.7",
|
|
68
72
|
"markdown-spellcheck": "1.3.1",
|
|
69
73
|
"parker": "0.0.10",
|
|
70
|
-
"prettier": "2.
|
|
71
|
-
"stylelint": "14.
|
|
74
|
+
"prettier": "2.7.1",
|
|
75
|
+
"stylelint": "14.9.1",
|
|
72
76
|
"stylelint-config-prettier": "9.0.3",
|
|
73
77
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
74
78
|
"stylelint-order": "5.0.0",
|
package/scss/_base_button.scss
CHANGED
|
@@ -64,13 +64,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
64
64
|
// Navigation panel/drawer
|
|
65
65
|
// -------------------------
|
|
66
66
|
.l-navigation {
|
|
67
|
-
@include vf-
|
|
68
|
-
$property: (
|
|
69
|
-
transform,
|
|
70
|
-
box-shadow,
|
|
71
|
-
),
|
|
72
|
-
$duration: fast
|
|
73
|
-
);
|
|
67
|
+
@include vf-transition($property: #{transform, box-shadow}, $duration: fast);
|
|
74
68
|
|
|
75
69
|
bottom: 0;
|
|
76
70
|
box-shadow: $panel-drop-shadow;
|
|
@@ -117,13 +111,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
117
111
|
}
|
|
118
112
|
|
|
119
113
|
.l-navigation {
|
|
120
|
-
@include vf-
|
|
121
|
-
$property: (
|
|
122
|
-
width,
|
|
123
|
-
box-shadow,
|
|
124
|
-
),
|
|
125
|
-
$duration: fast
|
|
126
|
-
);
|
|
114
|
+
@include vf-transition($property: #{width, box-shadow}, $duration: fast);
|
|
127
115
|
|
|
128
116
|
box-shadow: $panel-drop-shadow-transparent;
|
|
129
117
|
overflow: hidden;
|
|
@@ -182,7 +170,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
182
170
|
%vf-application-layout--faded-when-collapsed {
|
|
183
171
|
// when app navigation panel is collapsed, fade out unnecessary elements
|
|
184
172
|
@include vf-application-layout--when-collapsed() {
|
|
185
|
-
@include vf-
|
|
173
|
+
@include vf-transition($property: opacity, $duration: snap);
|
|
186
174
|
|
|
187
175
|
opacity: 0;
|
|
188
176
|
}
|
|
@@ -246,13 +234,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
246
234
|
}
|
|
247
235
|
|
|
248
236
|
.l-aside {
|
|
249
|
-
@include vf-
|
|
250
|
-
$property: (
|
|
251
|
-
transform,
|
|
252
|
-
box-shadow,
|
|
253
|
-
),
|
|
254
|
-
$duration: snap
|
|
255
|
-
);
|
|
237
|
+
@include vf-transition($property: #{transform, box-shadow}, $duration: snap);
|
|
256
238
|
|
|
257
239
|
box-shadow: $panel-drop-shadow;
|
|
258
240
|
grid-area: main;
|
|
@@ -28,13 +28,12 @@
|
|
|
28
28
|
padding-right: $sph--large;
|
|
29
29
|
position: relative;
|
|
30
30
|
text-align: left;
|
|
31
|
-
transition-duration: 0s;
|
|
32
31
|
width: 100%;
|
|
33
32
|
z-index: 2;
|
|
34
33
|
|
|
35
34
|
&::before {
|
|
36
35
|
@include vf-icon-chevron($color-mid-dark);
|
|
37
|
-
@include vf-
|
|
36
|
+
@include vf-transition($property: transform, $duration: fast);
|
|
38
37
|
@extend %icon;
|
|
39
38
|
|
|
40
39
|
content: '';
|
|
@@ -49,12 +48,15 @@
|
|
|
49
48
|
&:hover {
|
|
50
49
|
background-color: $colors--light-theme--background-hover;
|
|
51
50
|
}
|
|
51
|
+
@include vf-transition(#{background-color, border-color});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
&[aria-expanded='false'] {
|
|
55
55
|
&::before {
|
|
56
56
|
transform: rotate(-90deg);
|
|
57
57
|
}
|
|
58
|
+
|
|
59
|
+
@include vf-transition(#{background-color, border-color});
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -88,11 +90,22 @@
|
|
|
88
90
|
.p-accordion__panel {
|
|
89
91
|
margin: 0;
|
|
90
92
|
overflow: auto; // include child margins into its height
|
|
91
|
-
padding-left: $
|
|
93
|
+
padding-left: $icon-size + $sph--large * 2;
|
|
92
94
|
|
|
95
|
+
@include vf-transition(#{transform, opacity}, fast);
|
|
93
96
|
// Hides panel content
|
|
94
97
|
&[aria-hidden='true'] {
|
|
95
|
-
|
|
98
|
+
height: 0;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: translate3d(0, -0.5rem, 0);
|
|
101
|
+
visibility: hidden;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&[aria-hidden='false'] {
|
|
105
|
+
height: auto;
|
|
106
|
+
opacity: 1;
|
|
107
|
+
transform: translate3d(0, 0, 0);
|
|
108
|
+
visibility: visible;
|
|
96
109
|
}
|
|
97
110
|
|
|
98
111
|
&.has-tick-elements {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import 'settings';
|
|
2
|
+
|
|
3
|
+
@mixin vf-p-badge {
|
|
4
|
+
%vf-badge {
|
|
5
|
+
@extend %x-small-text;
|
|
6
|
+
background-color: $color-dark;
|
|
7
|
+
border-radius: 1rem;
|
|
8
|
+
box-sizing: content-box;
|
|
9
|
+
color: $color-x-light;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
max-width: 4ch;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
padding: 0 $spv--x-small;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.p-badge,
|
|
17
|
+
.p-badge--negative {
|
|
18
|
+
@extend %vf-badge;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-badge--negative {
|
|
22
|
+
background-color: $color-negative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.p-chip,
|
|
26
|
+
[class*='p-chip--'] {
|
|
27
|
+
.p-badge,
|
|
28
|
+
.p-badge--negative {
|
|
29
|
+
align-self: center;
|
|
30
|
+
margin-left: $sph--small;
|
|
31
|
+
margin-right: -0.15rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/scss/_patterns_chip.scss
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
// In cases where contextual menu toggle is a button, we do not want it to
|
|
90
90
|
// have a margin, but since it is never the last child in this pattern,
|
|
91
91
|
// so we need to remove the margin.
|
|
92
|
-
// https://github.com/canonical
|
|
92
|
+
// https://github.com/canonical/vanilla-framework/pull/3584
|
|
93
93
|
margin-right: 0;
|
|
94
94
|
|
|
95
95
|
&[aria-expanded='true'] .p-contextual-menu__indicator {
|
package/scss/_patterns_grid.scss
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@mixin vf-p-grid {
|
|
18
18
|
// FIXME: this should be removed from framework SCSS
|
|
19
|
-
// (see https://github.com/canonical
|
|
19
|
+
// (see https://github.com/canonical/vanilla-framework/issues/3199)
|
|
20
20
|
.grid-demo [class*='#{$grid-column-prefix}'] {
|
|
21
21
|
background: transparentize($color-negative, 0.9);
|
|
22
22
|
margin-bottom: $spv--small;
|
|
@@ -171,14 +171,14 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
171
171
|
|
|
172
172
|
.p-inline-list__item {
|
|
173
173
|
@include vf-inline-list-item;
|
|
174
|
-
|
|
174
|
+
margin-right: $sph--small;
|
|
175
175
|
position: relative;
|
|
176
176
|
|
|
177
177
|
&::after {
|
|
178
178
|
content: '\2022';
|
|
179
179
|
line-height: map-get($line-heights, default-text);
|
|
180
|
-
position:
|
|
181
|
-
right:
|
|
180
|
+
position: relative;
|
|
181
|
+
right: -0.25rem;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
&:last-of-type,
|
|
@@ -291,12 +291,6 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
.p-stepped-list--detailed .p-stepped-list__title + .p-stepped-list__content {
|
|
295
|
-
@media (min-width: $threshold-6-12-col) {
|
|
296
|
-
margin-left: 0;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
294
|
@for $i from 6 through 1 {
|
|
301
295
|
// Bullet sizes for each heading level
|
|
302
296
|
$bullet-width: map-get($line-heights, default-text);
|
|
@@ -307,6 +301,7 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
307
301
|
$bullet-width-mobile: map-get($line-heights, h#{$i}-mobile);
|
|
308
302
|
}
|
|
309
303
|
|
|
304
|
+
.p-heading--#{$i}.p-stepped-list__title,
|
|
310
305
|
h#{$i}.p-stepped-list__title {
|
|
311
306
|
padding-left: $bullet-width-mobile + $sph--large;
|
|
312
307
|
|
|
@@ -324,6 +319,7 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
324
319
|
}
|
|
325
320
|
}
|
|
326
321
|
|
|
322
|
+
.p-heading--#{$i}.p-stepped-list__title + .p-stepped-list__content,
|
|
327
323
|
h#{$i}.p-stepped-list__title + .p-stepped-list__content {
|
|
328
324
|
margin-left: $bullet-width-mobile + $sph--large;
|
|
329
325
|
|
|
@@ -332,6 +328,12 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
332
328
|
}
|
|
333
329
|
}
|
|
334
330
|
}
|
|
331
|
+
|
|
332
|
+
.p-stepped-list--detailed .p-stepped-list__title + .p-stepped-list__content {
|
|
333
|
+
@media (min-width: $threshold-6-12-col) {
|
|
334
|
+
margin-left: 0;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
@mixin vf-p-stepped-list-detailed {
|
|
@@ -57,7 +57,7 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
57
57
|
$properties: #{background-color, color, opacity};
|
|
58
58
|
@extend %navigation-link-responsive-padding-horizontal;
|
|
59
59
|
@extend %navigation-link-responsive-padding-vertical;
|
|
60
|
-
@include vf-
|
|
60
|
+
@include vf-transition($properties, snap);
|
|
61
61
|
@include vf-focus;
|
|
62
62
|
|
|
63
63
|
// override button styles
|
|
@@ -245,7 +245,7 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
245
245
|
|
|
246
246
|
.p-navigation__logo-title {
|
|
247
247
|
@extend %vf-heading-4;
|
|
248
|
-
|
|
248
|
+
font-size: #{map-get($font-sizes, h4)}rem;
|
|
249
249
|
line-height: map-get($line-heights, x-small);
|
|
250
250
|
}
|
|
251
251
|
|
|
@@ -443,7 +443,7 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
.p-navigation__search-overlay {
|
|
446
|
-
@include vf-
|
|
446
|
+
@include vf-transition(opacity, snap);
|
|
447
447
|
|
|
448
448
|
background-color: $colors--light-theme--background-overlay;
|
|
449
449
|
display: block;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@import 'settings';
|
|
2
|
+
|
|
3
|
+
@mixin vf-p-side-navigation-expandable {
|
|
4
|
+
.p-side-navigation__item,
|
|
5
|
+
.p-side-navigation__item--title {
|
|
6
|
+
// position relative for the absolutely positioned `.p-side-navigation__expand` button
|
|
7
|
+
position: relative;
|
|
8
|
+
}
|
|
9
|
+
.p-side-navigation__link.is-expandable,
|
|
10
|
+
.p-side-navigation__text.is-expandable {
|
|
11
|
+
// extra padding to accomodate for `.p-side-navigation__expand` button
|
|
12
|
+
padding-right: 3rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.p-side-navigation__expand {
|
|
16
|
+
@include vf-button-base;
|
|
17
|
+
background: none;
|
|
18
|
+
border: 0;
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
font-size: inherit;
|
|
21
|
+
line-height: inherit;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding-bottom: $spv--x-small;
|
|
24
|
+
padding-top: $spv--x-small;
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0;
|
|
27
|
+
top: 0;
|
|
28
|
+
|
|
29
|
+
&::before {
|
|
30
|
+
@extend %icon;
|
|
31
|
+
@include vf-icon-chevron;
|
|
32
|
+
content: '';
|
|
33
|
+
transform: rotate(-90deg);
|
|
34
|
+
transition: transform 100ms;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.p-side-navigation__expand[aria-expanded='true']::before {
|
|
39
|
+
transform: rotate(0deg);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// transition
|
|
43
|
+
.p-side-navigation__list {
|
|
44
|
+
@include vf-animation(#{transform, opacity}, fast);
|
|
45
|
+
}
|
|
46
|
+
.p-side-navigation__expand[aria-expanded='false'] + .p-side-navigation__list {
|
|
47
|
+
height: 0;
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translate3d(0, -0.5rem, 0);
|
|
50
|
+
// disable transition on close
|
|
51
|
+
transition-duration: 0s;
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.p-side-navigation__expand[aria-expanded='true'] + .p-side-navigation__list {
|
|
56
|
+
height: auto;
|
|
57
|
+
opacity: 1;
|
|
58
|
+
transform: translate3d(0, 0, 0);
|
|
59
|
+
visibility: visible;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Theming for the expandable variant
|
|
63
|
+
@if ($theme-default-p-side-navigation == 'dark') {
|
|
64
|
+
.p-side-navigation,
|
|
65
|
+
[class*='p-side-navigation--'] {
|
|
66
|
+
@include vf-side-navigation-expandable-theme-dark;
|
|
67
|
+
|
|
68
|
+
&.is-light {
|
|
69
|
+
@include vf-side-navigation-expandable-theme-light;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
} @else {
|
|
73
|
+
.p-side-navigation,
|
|
74
|
+
[class*='p-side-navigation--'] {
|
|
75
|
+
@include vf-side-navigation-expandable-theme-light;
|
|
76
|
+
|
|
77
|
+
&.is-dark {
|
|
78
|
+
@include vf-side-navigation-expandable-theme-dark;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@mixin vf-side-navigation-expandable-theme($color-sidenav-text-active, $color-sidenav-item-background-hover, $color-sidenav-toggle-icon) {
|
|
85
|
+
.p-side-navigation__expand {
|
|
86
|
+
background-color: inherit;
|
|
87
|
+
&::before {
|
|
88
|
+
@include vf-icon-chevron($color-sidenav-toggle-icon);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
background: $color-sidenav-item-background-hover;
|
|
93
|
+
color: $color-sidenav-text-active;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@mixin vf-side-navigation-expandable-theme-light {
|
|
99
|
+
@include vf-side-navigation-expandable-theme(
|
|
100
|
+
$color-sidenav-text-active: $colors--light-theme--text-default,
|
|
101
|
+
$color-sidenav-item-background-hover: $colors--light-theme--background-hover,
|
|
102
|
+
$color-sidenav-toggle-icon: $colors--light-theme--text-inactive
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@mixin vf-side-navigation-expandable-theme-dark {
|
|
107
|
+
@include vf-side-navigation-expandable-theme(
|
|
108
|
+
$color-sidenav-text-active: $colors--dark-theme--text-default,
|
|
109
|
+
$color-sidenav-item-background-hover: $colors--dark-theme--background-hover,
|
|
110
|
+
// color of toggle icon - needed because of lack of rgba support in icon mixin
|
|
111
|
+
$color-sidenav-toggle-icon: #999
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.p-side-navigation__overlay {
|
|
146
|
-
@include vf-
|
|
146
|
+
@include vf-transition(opacity);
|
|
147
147
|
|
|
148
148
|
bottom: 0;
|
|
149
149
|
left: 0;
|
|
@@ -269,10 +269,6 @@
|
|
|
269
269
|
@extend %side-navigation__list;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.p-side-navigation__item--title {
|
|
273
|
-
font-weight: $font-weight-bold;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
272
|
%side-navigation__text {
|
|
277
273
|
@include vf-side-navigation-spacing-left;
|
|
278
274
|
|
|
@@ -280,6 +276,10 @@
|
|
|
280
276
|
padding-bottom: $spv--x-small;
|
|
281
277
|
padding-right: $sph--large;
|
|
282
278
|
padding-top: $spv--x-small;
|
|
279
|
+
|
|
280
|
+
.p-side-navigation__item--title > & {
|
|
281
|
+
font-weight: $font-weight-bold;
|
|
282
|
+
}
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
%side-navigation__heading {
|
|
@@ -330,6 +330,7 @@
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
// nested 2nd level of navigation
|
|
333
|
+
.p-side-navigation__item--title .p-side-navigation__item &,
|
|
333
334
|
.p-side-navigation__item .p-side-navigation__item & {
|
|
334
335
|
@include vf-side-navigation-spacing-left($multiplier: 2);
|
|
335
336
|
|
|
@@ -340,6 +341,7 @@
|
|
|
340
341
|
}
|
|
341
342
|
|
|
342
343
|
// nested 3rd level of navigation
|
|
344
|
+
.p-side-navigation__item--title .p-side-navigation__item .p-side-navigation__item &,
|
|
343
345
|
.p-side-navigation__item .p-side-navigation__item .p-side-navigation__item & {
|
|
344
346
|
@include vf-side-navigation-spacing-left($multiplier: 3);
|
|
345
347
|
|
|
@@ -47,7 +47,7 @@ $knob-size: $sp-unit * 2;
|
|
|
47
47
|
&::before {
|
|
48
48
|
@extend %vf-has-round-corners;
|
|
49
49
|
@extend %vf-has-box-shadow;
|
|
50
|
-
@include vf-
|
|
50
|
+
@include vf-transition($duration: slow);
|
|
51
51
|
|
|
52
52
|
background: $color-x-light;
|
|
53
53
|
border: 1px solid $color-mid-dark;
|
package/scss/_patterns_tabs.scss
CHANGED
|
@@ -42,9 +42,12 @@
|
|
|
42
42
|
);
|
|
43
43
|
@include vf-highlight-bar(transparent, bottom, false);
|
|
44
44
|
|
|
45
|
+
align-items: center;
|
|
45
46
|
border: none;
|
|
46
47
|
color: $color-dark;
|
|
47
|
-
display:
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: $sph--small;
|
|
50
|
+
height: 100%;
|
|
48
51
|
line-height: map-get($line-heights, default-text);
|
|
49
52
|
margin-bottom: 0;
|
|
50
53
|
padding: $spv--medium $sph--large;
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
|
|
53
56
|
&::before {
|
|
54
57
|
@extend %vf-pseudo-border;
|
|
55
|
-
@include vf-
|
|
58
|
+
@include vf-transition(#{background-color, border-color}, snap, in);
|
|
56
59
|
|
|
57
60
|
bottom: 0;
|
|
58
61
|
z-index: 1;
|
|
@@ -12,8 +12,16 @@ $animation-easing: (
|
|
|
12
12
|
in: cubic-bezier(0.55, 0.055, 0.675, 0.19),
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
@mixin vf-
|
|
15
|
+
@mixin vf-transition($property: all, $duration: brisk, $easing: out) {
|
|
16
|
+
@if (type-of($property) != string) {
|
|
17
|
+
@error "vf-transition $property must be a string";
|
|
18
|
+
}
|
|
16
19
|
transition-duration: map-get($animation-duration, $duration);
|
|
17
|
-
transition-property: $property;
|
|
20
|
+
transition-property: unquote($property);
|
|
18
21
|
transition-timing-function: map-get($animation-easing, $easing);
|
|
19
22
|
}
|
|
23
|
+
|
|
24
|
+
// DEPRECATED: vf-animation mixin is deprecated and will be removed in future version of Vanilla, please use vf-transition instead
|
|
25
|
+
@mixin vf-animation($args...) {
|
|
26
|
+
@include vf-transition($args...);
|
|
27
|
+
}
|
package/scss/_vanilla.scss
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@import 'patterns_buttons';
|
|
9
9
|
@import 'patterns_card';
|
|
10
10
|
@import 'patterns_chip';
|
|
11
|
+
@import 'patterns_badge';
|
|
11
12
|
@import 'patterns_code-snippet';
|
|
12
13
|
@import 'patterns_contextual-menu';
|
|
13
14
|
@import 'patterns_divider';
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
@import 'patterns_search-box';
|
|
38
39
|
@import 'patterns_separator';
|
|
39
40
|
@import 'patterns_side-navigation';
|
|
41
|
+
@import 'patterns_side-navigation-expandable';
|
|
40
42
|
@import 'patterns_slider';
|
|
41
43
|
@import 'patterns_status-label';
|
|
42
44
|
@import 'patterns_strip';
|
|
@@ -88,6 +90,7 @@
|
|
|
88
90
|
@include vf-p-buttons;
|
|
89
91
|
@include vf-p-card;
|
|
90
92
|
@include vf-p-chip;
|
|
93
|
+
@include vf-p-badge;
|
|
91
94
|
@include vf-p-code-snippet;
|
|
92
95
|
@include vf-p-contextual-menu;
|
|
93
96
|
@include vf-p-divider;
|
|
@@ -119,6 +122,7 @@
|
|
|
119
122
|
@include vf-p-segmented-control;
|
|
120
123
|
@include vf-p-separator;
|
|
121
124
|
@include vf-p-side-navigation;
|
|
125
|
+
@include vf-p-side-navigation-expandable;
|
|
122
126
|
@include vf-p-slider;
|
|
123
127
|
@include vf-p-status-label;
|
|
124
128
|
@include vf-p-strip;
|