vanilla-framework 3.10.0 → 3.11.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
CHANGED
|
@@ -235,7 +235,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
.l-aside {
|
|
238
|
-
@include vf-transition($property: #{transform, box-shadow}, $duration: snap);
|
|
238
|
+
@include vf-transition($property: #{transform, box-shadow, visibility}, $duration: snap);
|
|
239
239
|
|
|
240
240
|
box-shadow: $panel-drop-shadow;
|
|
241
241
|
grid-area: main;
|
|
@@ -260,6 +260,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
260
260
|
&.is-collapsed {
|
|
261
261
|
box-shadow: $panel-drop-shadow-transparent;
|
|
262
262
|
transform: translateX(100%);
|
|
263
|
+
visibility: hidden;
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
@media (min-width: $application-layout--breakpoint-side-nav-collapsed) {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@mixin vf-l-full-width {
|
|
2
|
+
$l-full-screen-aside-width: 15rem;
|
|
3
|
+
|
|
4
|
+
// we switch to full screen layout (with side navigation fixed to left side)
|
|
5
|
+
// when screen is big enough to fit side nav on left, same size on right, and grid
|
|
6
|
+
// in the middle
|
|
7
|
+
// we have to calculate media query breakpoint in px instead of rem to make sure
|
|
8
|
+
// we take into account bigger font size on large screens
|
|
9
|
+
$breakpoint-full-screen-layout: calc(($grid-max-width + 2 * $l-full-screen-aside-width) * $font-size-ratio--largescreen);
|
|
10
|
+
// TODO: make sure it works with grid-max-width set to 100% as in
|
|
11
|
+
// like: https://github.com/canonical/jaas-dashboard/blob/b9ca3876d054c48dc2da74df0080cd14a0f15740/src/scss/index.scss#L28
|
|
12
|
+
|
|
13
|
+
@media (min-width: $breakpoint-large) {
|
|
14
|
+
.l-full-width__sidebar {
|
|
15
|
+
background: $color-light;
|
|
16
|
+
|
|
17
|
+
// height of top navigation, as padding applied to .p-navigation__link + line-heigh of the anchor text inside
|
|
18
|
+
$navigation-top-height: $spv--large * 2 + map-get($line-heights, default-text);
|
|
19
|
+
|
|
20
|
+
height: calc(100% - $navigation-top-height); // height of document reduced by height of top nav
|
|
21
|
+
min-height: calc(100vh - $navigation-top-height);
|
|
22
|
+
position: absolute;
|
|
23
|
+
width: $l-full-screen-aside-width;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
|
|
26
|
+
&::after {
|
|
27
|
+
background: linear-gradient(90deg, transparent, rgba($color-x-dark, 0.05));
|
|
28
|
+
bottom: 0;
|
|
29
|
+
content: '';
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: 0;
|
|
33
|
+
width: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// side navigation component drawer needs background only when it's fixed on smaller screens
|
|
37
|
+
// keep it transparent when it's visible as part of full width layout
|
|
38
|
+
.p-side-navigation__drawer {
|
|
39
|
+
background: transparent;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.l-full-width {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-areas: 'start main end';
|
|
46
|
+
grid-template-columns: $l-full-screen-aside-width minmax(0, 1fr) min-content;
|
|
47
|
+
width: 100%;
|
|
48
|
+
|
|
49
|
+
// left side container
|
|
50
|
+
.l-start {
|
|
51
|
+
grid-area: start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// main container
|
|
55
|
+
.l-main {
|
|
56
|
+
grid-area: main;
|
|
57
|
+
|
|
58
|
+
// grid should align to the left (no left margin)
|
|
59
|
+
// TODO: ideally this should be applied to %fixed-width-container
|
|
60
|
+
.row,
|
|
61
|
+
.u-fixed-width {
|
|
62
|
+
margin-left: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// right side container
|
|
67
|
+
.l-end {
|
|
68
|
+
grid-area: end;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// full width layout
|
|
74
|
+
@media (min-width: $breakpoint-full-screen-layout) {
|
|
75
|
+
.l-full-width {
|
|
76
|
+
grid-template-columns: $l-full-screen-aside-width minmax(0, 1fr) $l-full-screen-aside-width;
|
|
77
|
+
|
|
78
|
+
.l-main {
|
|
79
|
+
.row,
|
|
80
|
+
.u-fixed-width {
|
|
81
|
+
margin-left: auto;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
package/scss/_vanilla.scss
CHANGED
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
// Layouts
|
|
56
56
|
@import 'layouts_application';
|
|
57
|
+
@import 'layouts_full-width';
|
|
57
58
|
@import 'layouts_site';
|
|
58
59
|
@import 'layouts_fluid-breakout';
|
|
59
60
|
|
|
@@ -137,6 +138,7 @@
|
|
|
137
138
|
|
|
138
139
|
// Layouts
|
|
139
140
|
@include vf-l-application;
|
|
141
|
+
@include vf-l-full-width;
|
|
140
142
|
@include vf-l-site;
|
|
141
143
|
@include vf-l-fluid-breakout;
|
|
142
144
|
|