vanilla-framework 4.3.0 → 4.4.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_typography-definitions.scss +1 -1
- package/scss/_layouts_docs.scss +98 -0
- package/scss/_layouts_full-width.scss +2 -0
- package/scss/_patterns_side-navigation.scss +26 -1
- package/scss/_patterns_table-of-contents.scss +16 -28
- package/scss/_vanilla.scss +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@canonical/cookie-policy": "3.5.0",
|
|
59
59
|
"@canonical/latest-news": "1.4.1",
|
|
60
|
-
"@percy/cli": "1.27.
|
|
60
|
+
"@percy/cli": "1.27.2",
|
|
61
61
|
"@testing-library/cypress": "9.0.0",
|
|
62
|
-
"autoprefixer": "10.4.
|
|
62
|
+
"autoprefixer": "10.4.16",
|
|
63
63
|
"cypress": "12.17.4",
|
|
64
64
|
"get-site-urls": "3.0.0",
|
|
65
65
|
"markdown-spellcheck": "1.3.1",
|
|
66
66
|
"parker": "0.0.10",
|
|
67
|
-
"postcss": "8.4.
|
|
67
|
+
"postcss": "8.4.31",
|
|
68
68
|
"postcss-cli": "10.1.0",
|
|
69
|
-
"postcss-scss": "4.0.
|
|
69
|
+
"postcss-scss": "4.0.9",
|
|
70
70
|
"prettier": "2.8.8",
|
|
71
|
-
"sass": "1.
|
|
71
|
+
"sass": "1.68.0",
|
|
72
72
|
"stylelint": "15.10.3",
|
|
73
73
|
"stylelint-config-prettier": "9.0.5",
|
|
74
74
|
"stylelint-config-recommended-scss": "5.0.2",
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@mixin vf-l-docs {
|
|
2
|
+
$l-documentation-sidebar-width: 15rem !default;
|
|
3
|
+
|
|
4
|
+
// we switch to full screen layout (with side navigation fixed to left side)
|
|
5
|
+
// when screen is big enough to fit 12 column grid and side navigation
|
|
6
|
+
$breakpoint-full-screen-layout: calc($breakpoint-large + $l-documentation-sidebar-width);
|
|
7
|
+
|
|
8
|
+
// root element for the documentation layout
|
|
9
|
+
.l-docs,
|
|
10
|
+
// root element for that can be used on a nested container to create a subgrid aligned with the main documentation layout grid
|
|
11
|
+
.l-docs__subgrid {
|
|
12
|
+
// container for the site global navigation header
|
|
13
|
+
.l-docs__header {
|
|
14
|
+
grid-area: header;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// left side container, for side navigation
|
|
18
|
+
.l-docs__sidebar {
|
|
19
|
+
grid-area: sidebar;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// main content title container
|
|
23
|
+
// will appear above table of contents on medium screens
|
|
24
|
+
.l-docs__title {
|
|
25
|
+
grid-area: title;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// metadata container (for table of contents, etc)
|
|
29
|
+
// will appear between title and content on medium screens
|
|
30
|
+
// and on the right side on large screens
|
|
31
|
+
.l-docs__meta {
|
|
32
|
+
grid-area: meta;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// main content container
|
|
36
|
+
// will appear below table of contents on medium screens
|
|
37
|
+
.l-docs__main {
|
|
38
|
+
grid-area: main;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// container for site global footer
|
|
42
|
+
.l-docs__footer {
|
|
43
|
+
grid-area: footer;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (min-width: $breakpoint-large) {
|
|
48
|
+
.l-docs {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-gap: 0;
|
|
51
|
+
grid-template-areas:
|
|
52
|
+
'header header'
|
|
53
|
+
'sidebar title'
|
|
54
|
+
'sidebar meta'
|
|
55
|
+
'sidebar main'
|
|
56
|
+
'footer footer';
|
|
57
|
+
|
|
58
|
+
grid-template-columns: $l-documentation-sidebar-width minmax(0, 1fr);
|
|
59
|
+
grid-template-rows: auto auto auto 1fr auto; // stretch main content to fill the space
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.l-docs__subgrid {
|
|
64
|
+
display: grid;
|
|
65
|
+
grid-template-areas: 'sidebar main meta';
|
|
66
|
+
grid-template-columns: $l-documentation-sidebar-width minmax(0, 1fr) min-content;
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (min-width: $breakpoint-full-screen-layout) {
|
|
72
|
+
.l-docs {
|
|
73
|
+
grid-template-areas:
|
|
74
|
+
'header header header'
|
|
75
|
+
'sidebar title meta'
|
|
76
|
+
'sidebar main meta'
|
|
77
|
+
'footer footer footer';
|
|
78
|
+
|
|
79
|
+
grid-template-columns: $l-documentation-sidebar-width minmax(0, 1fr) $l-documentation-sidebar-width;
|
|
80
|
+
grid-template-rows: auto auto 1fr auto; // stretch main content to fill the space
|
|
81
|
+
|
|
82
|
+
.l-docs__content {
|
|
83
|
+
display: contents;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.l-docs__subgrid {
|
|
88
|
+
grid-template-columns: $l-documentation-sidebar-width minmax(0, 1fr) $l-documentation-sidebar-width;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// on largest screens we want to keep the table of contents sticky
|
|
92
|
+
.l-docs__meta {
|
|
93
|
+
align-self: start;
|
|
94
|
+
position: sticky;
|
|
95
|
+
top: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
.p-side-navigation--raw-html {
|
|
540
540
|
@include vf-side-navigation-raw-html-theme-light;
|
|
541
541
|
|
|
542
|
-
&.is-
|
|
542
|
+
&.is-dark {
|
|
543
543
|
@include vf-side-navigation-raw-html-theme-dark;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
@@ -723,6 +723,20 @@
|
|
|
723
723
|
$color-sidenav-list-border: $colors--light-theme--border-low-contrast,
|
|
724
724
|
$color-sidenav-toggle-icon: $colors--light-theme--text-inactive
|
|
725
725
|
);
|
|
726
|
+
|
|
727
|
+
.is-paper & {
|
|
728
|
+
@include vf-side-navigation-theme(
|
|
729
|
+
$color-sidenav-text-default: $colors--light-theme--text-inactive,
|
|
730
|
+
$color-sidenav-background-default: $color-paper,
|
|
731
|
+
$color-sidenav-background-overlay: $colors--light-theme--background-overlay,
|
|
732
|
+
$color-sidenav-text-active: $colors--light-theme--text-default,
|
|
733
|
+
$color-sidenav-item-background-active: $colors--paper-theme--background-active,
|
|
734
|
+
$color-sidenav-item-background-hover: $colors--paper-theme--background-hover,
|
|
735
|
+
$color-sidenav-item-border-highlight: $colors--light-theme--text-default,
|
|
736
|
+
$color-sidenav-list-border: $colors--light-theme--border-low-contrast,
|
|
737
|
+
$color-sidenav-toggle-icon: $colors--light-theme--text-inactive
|
|
738
|
+
);
|
|
739
|
+
}
|
|
726
740
|
}
|
|
727
741
|
|
|
728
742
|
@mixin vf-side-navigation-theme-dark {
|
|
@@ -804,6 +818,17 @@
|
|
|
804
818
|
$color-sidenav-item-border-highlight: $colors--light-theme--text-default,
|
|
805
819
|
$color-sidenav-list-border: $colors--light-theme--border-low-contrast
|
|
806
820
|
);
|
|
821
|
+
|
|
822
|
+
.is-paper {
|
|
823
|
+
@include vf-side-navigation-raw-html-theme(
|
|
824
|
+
$color-sidenav-text-default: $colors--light-theme--text-inactive,
|
|
825
|
+
$color-sidenav-text-active: $colors--light-theme--text-default,
|
|
826
|
+
$color-sidenav-item-background-active: $colors--paper-theme--background-active,
|
|
827
|
+
$color-sidenav-item-background-hover: $colors--paper-theme--background-hover,
|
|
828
|
+
$color-sidenav-item-border-highlight: $colors--light-theme--text-default,
|
|
829
|
+
$color-sidenav-list-border: $colors--light-theme--border-low-contrast
|
|
830
|
+
);
|
|
831
|
+
}
|
|
807
832
|
}
|
|
808
833
|
|
|
809
834
|
@mixin vf-side-navigation-raw-html-theme-dark {
|
|
@@ -2,55 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
@mixin vf-p-table-of-contents {
|
|
4
4
|
.p-table-of-contents {
|
|
5
|
-
|
|
6
|
-
font-size: 0.875rem;
|
|
7
|
-
padding: 0 $sp-large;
|
|
8
|
-
|
|
9
|
-
@media (min-width: $threshold-6-12-col) {
|
|
10
|
-
border-left: 1px solid $color-mid-light;
|
|
11
|
-
border-top: 0;
|
|
12
|
-
padding: 0 $sp-medium;
|
|
13
|
-
}
|
|
5
|
+
@extend %vf-grid-container-padding;
|
|
14
6
|
}
|
|
15
7
|
|
|
16
8
|
.p-table-of-contents__header {
|
|
17
|
-
|
|
18
|
-
font-size: $sp-medium;
|
|
19
|
-
line-height: 1.5;
|
|
20
|
-
margin-bottom: $sp-medium;
|
|
21
|
-
text-transform: uppercase;
|
|
9
|
+
@extend %muted-heading;
|
|
22
10
|
}
|
|
23
11
|
|
|
24
12
|
.p-table-of-contents__section {
|
|
25
|
-
padding: $
|
|
13
|
+
padding-bottom: $spv--large;
|
|
26
14
|
|
|
27
15
|
&:not(:last-child) {
|
|
28
|
-
border-bottom: 1px
|
|
16
|
+
border-bottom: 1px solid $color-mid-light;
|
|
29
17
|
}
|
|
30
18
|
}
|
|
31
19
|
|
|
32
|
-
.p-table-of-
|
|
20
|
+
.p-table-of-contents__list {
|
|
33
21
|
list-style: none;
|
|
34
22
|
margin: 0;
|
|
35
23
|
padding: 0;
|
|
36
24
|
|
|
25
|
+
.p-table-of-contents__list {
|
|
26
|
+
margin-left: $sph--large;
|
|
27
|
+
}
|
|
28
|
+
|
|
37
29
|
.p-table-of-contents__link {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
display: block;
|
|
31
|
+
// paddings based on side navigation
|
|
32
|
+
padding-bottom: $spv--x-small;
|
|
33
|
+
padding-top: $spv--x-small;
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
&.is-active {
|
|
36
|
+
font-weight: $font-weight-bold;
|
|
44
37
|
}
|
|
45
38
|
|
|
46
|
-
&:
|
|
39
|
+
&:visited {
|
|
47
40
|
color: $color-link;
|
|
48
41
|
}
|
|
49
|
-
|
|
50
|
-
&.is-active {
|
|
51
|
-
font-weight: $font-weight-bold;
|
|
52
|
-
padding-left: $sp-x-small;
|
|
53
|
-
}
|
|
54
42
|
}
|
|
55
43
|
}
|
|
56
44
|
}
|
package/scss/_vanilla.scss
CHANGED
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
// Layouts
|
|
59
59
|
@import 'layouts_application';
|
|
60
|
+
@import 'layouts_docs';
|
|
60
61
|
@import 'layouts_full-width';
|
|
61
62
|
@import 'layouts_site';
|
|
62
63
|
@import 'layouts_fluid-breakout';
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
|
|
148
149
|
// Layouts
|
|
149
150
|
@include vf-l-application;
|
|
151
|
+
@include vf-l-docs;
|
|
150
152
|
@include vf-l-full-width;
|
|
151
153
|
@include vf-l-site;
|
|
152
154
|
@include vf-l-fluid-breakout;
|