vanilla-framework 3.7.1 → 3.8.1
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 +1 -1
- package/scss/_base_grid-definitions.scss +0 -18
- package/scss/_base_links.scss +2 -0
- package/scss/_base_placeholders.scss +1 -1
- package/scss/_layouts_application.scss +4 -5
- package/scss/_patterns_accordion.scss +1 -1
- package/scss/_patterns_divider.scss +41 -19
- package/scss/_patterns_form-password-toggle.scss +10 -0
- package/scss/_patterns_form-validation.scss +3 -3
- package/scss/_patterns_grid.scss +91 -41
- package/scss/_patterns_lists.scss +22 -3
- package/scss/_patterns_logo-section.scss +0 -1
- package/scss/_patterns_navigation.scss +10 -10
- package/scss/_patterns_side-navigation.scss +103 -6
- package/scss/_patterns_slider.scss +0 -1
- package/scss/_patterns_strip.scss +14 -14
- package/scss/_patterns_table-sortable.scss +1 -1
- package/scss/_settings_breakpoints.scss +1 -1
- package/scss/_utilities_hide.scss +1 -1
package/package.json
CHANGED
|
@@ -11,24 +11,6 @@
|
|
|
11
11
|
display: block;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
%span-full-grid-on-mobile {
|
|
15
|
-
@media (max-width: $threshold-4-6-col - 1) {
|
|
16
|
-
grid-column: auto / span $grid-columns-small;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
%span-full-grid-on-tablet {
|
|
21
|
-
@media (min-width: $threshold-4-6-col) and (max-width: $threshold-6-12-col - 1) {
|
|
22
|
-
grid-column: auto / span $grid-columns-medium;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
%span-full-grid-on-desktop {
|
|
27
|
-
@media (min-width: $threshold-6-12-col) {
|
|
28
|
-
grid-column: auto / span $grid-columns;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
14
|
%fixed-width-container--common-properties {
|
|
33
15
|
@extend %vf-grid-container-padding;
|
|
34
16
|
|
package/scss/_base_links.scss
CHANGED
|
@@ -40,6 +40,10 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
@mixin vf-l-application {
|
|
43
|
+
$panel-drop-shadow: $box-shadow--deep;
|
|
44
|
+
$panel-drop-shadow-transparent: 0 0 0 0 transparent;
|
|
45
|
+
@include vf-l-application-panels;
|
|
46
|
+
|
|
43
47
|
.l-application {
|
|
44
48
|
display: grid;
|
|
45
49
|
grid-template-areas:
|
|
@@ -53,9 +57,6 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
53
57
|
width: 100vw;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
$panel-drop-shadow: $box-shadow--deep;
|
|
57
|
-
$panel-drop-shadow-transparent: 0 0 0 0 transparent;
|
|
58
|
-
|
|
59
60
|
// Top navigation bar to toggle side navigation on small screens
|
|
60
61
|
.l-navigation-bar {
|
|
61
62
|
grid-area: navbar;
|
|
@@ -275,6 +276,4 @@ $application-layout--side-nav-width-expanded: 15rem !default;
|
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
|
-
|
|
279
|
-
@include vf-l-application-panels;
|
|
280
279
|
}
|
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
|
+
@mixin horizontal-dividers() {
|
|
4
|
+
padding-bottom: $spv--large;
|
|
5
|
+
padding-top: $spv--large;
|
|
6
|
+
|
|
7
|
+
&:not(:first-child)::before {
|
|
8
|
+
bottom: auto;
|
|
9
|
+
content: '';
|
|
10
|
+
height: 1px;
|
|
11
|
+
left: 0;
|
|
12
|
+
position: absolute;
|
|
13
|
+
right: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
width: auto;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin vertical-dividers() {
|
|
20
|
+
padding-bottom: 0;
|
|
21
|
+
padding-top: 0;
|
|
22
|
+
|
|
23
|
+
&:not(:first-child)::before {
|
|
24
|
+
bottom: 0;
|
|
25
|
+
content: '';
|
|
26
|
+
height: auto;
|
|
27
|
+
left: map-get($grid-gutter-widths, default) * -0.5;
|
|
28
|
+
position: absolute;
|
|
29
|
+
right: auto;
|
|
30
|
+
top: 0;
|
|
31
|
+
width: 1px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
3
35
|
@mixin vf-p-divider {
|
|
4
36
|
.p-divider {
|
|
5
37
|
@extend %vf-row;
|
|
@@ -10,29 +42,19 @@
|
|
|
10
42
|
.p-divider__block {
|
|
11
43
|
position: relative;
|
|
12
44
|
|
|
13
|
-
@
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
position: absolute;
|
|
22
|
-
right: 0;
|
|
23
|
-
top: 0;
|
|
45
|
+
@include horizontal-dividers();
|
|
46
|
+
|
|
47
|
+
// Medium screens will have horizontal dividers unless col-medium-...
|
|
48
|
+
// classes have been applied.
|
|
49
|
+
@media (min-width: $threshold-4-6-col) {
|
|
50
|
+
// If a col-medium- class has been applied then use vertical dividers.
|
|
51
|
+
&[class*='#{$grid-medium-col-prefix}'] {
|
|
52
|
+
@include vertical-dividers();
|
|
24
53
|
}
|
|
25
54
|
}
|
|
26
55
|
|
|
27
56
|
@media (min-width: $threshold-6-12-col) {
|
|
28
|
-
|
|
29
|
-
bottom: 0;
|
|
30
|
-
content: '';
|
|
31
|
-
left: map-get($grid-gutter-widths, default) * -0.5; // "large" here is not a typo. The grid switches to 12 columns at breakpoint medium. Hence the use of large-screen gutter
|
|
32
|
-
position: absolute;
|
|
33
|
-
top: 0;
|
|
34
|
-
width: 1px;
|
|
35
|
-
}
|
|
57
|
+
@include vertical-dividers();
|
|
36
58
|
}
|
|
37
59
|
}
|
|
38
60
|
|
|
@@ -11,4 +11,14 @@
|
|
|
11
11
|
display: inline-block;
|
|
12
12
|
margin-right: $sp-xx-small;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
// Override the input text so that it is more easy to read when it
|
|
16
|
+
// has been toggled to display the text. This expects that the input
|
|
17
|
+
// immediately follows the .p-form-password-toggle element.
|
|
18
|
+
.p-form-password-toggle + [type='text'] {
|
|
19
|
+
&[readonly],
|
|
20
|
+
&[readonly='readonly'] {
|
|
21
|
+
color: $color-dark;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
14
24
|
}
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.p-form-validation__message {
|
|
26
|
-
@include vf-icon-success($color-positive);
|
|
27
26
|
@extend %vf-validation-wrapper;
|
|
27
|
+
@include vf-icon-success($color-positive);
|
|
28
28
|
|
|
29
29
|
color: $color-positive;
|
|
30
30
|
}
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.p-form-validation__message {
|
|
39
|
-
@include vf-icon-warning($color-caution);
|
|
40
39
|
@extend %vf-validation-wrapper;
|
|
40
|
+
@include vf-icon-warning($color-caution);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.p-form-validation__message {
|
|
50
|
-
@include vf-icon-error($color-negative);
|
|
51
50
|
@extend %vf-validation-wrapper;
|
|
51
|
+
@include vf-icon-error($color-negative);
|
|
52
52
|
|
|
53
53
|
color: $color-negative;
|
|
54
54
|
}
|
package/scss/_patterns_grid.scss
CHANGED
|
@@ -14,6 +14,26 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
@mixin vf-grid-column-reordering($label, $col-count, $reset: false) {
|
|
18
|
+
@for $i from 1 through $col-count {
|
|
19
|
+
.row [class*='#{$grid-column-prefix}'].#{$grid-column-prefix}start-#{$label}-#{$i} {
|
|
20
|
+
@if $reset {
|
|
21
|
+
grid-column-start: initial;
|
|
22
|
+
} @else {
|
|
23
|
+
grid-column-start: #{$i};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$grid-column-prefix}order-#{$label}-#{$i} {
|
|
28
|
+
@if $reset {
|
|
29
|
+
order: initial;
|
|
30
|
+
} @else {
|
|
31
|
+
order: #{$i};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
17
37
|
@mixin vf-p-grid {
|
|
18
38
|
// FIXME: this should be removed from framework SCSS
|
|
19
39
|
// (see https://github.com/canonical/vanilla-framework/issues/3199)
|
|
@@ -27,18 +47,59 @@
|
|
|
27
47
|
}
|
|
28
48
|
|
|
29
49
|
// mobile grid
|
|
30
|
-
@media (max-width: $threshold-4-6-col - 1) {
|
|
31
|
-
@for $i from $grid-columns-small through 1 {
|
|
32
|
-
.#{$grid-small-col-prefix}#{$i} {
|
|
33
|
-
@include vf-grid-column($i);
|
|
34
50
|
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
// by default medium and large screen col classes should span full width on mobile (to match block level element behaviour)
|
|
52
|
+
%span-full-grid-on-mobile {
|
|
53
|
+
grid-column: auto / span $grid-columns-small;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@for $i from 1 through $grid-columns-medium {
|
|
57
|
+
.#{$grid-medium-col-prefix}#{$i} {
|
|
58
|
+
@extend %span-full-grid-on-mobile;
|
|
59
|
+
@extend %display-block;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@for $i from 1 through $grid-columns {
|
|
64
|
+
.#{$grid-large-col-prefix}#{$i} {
|
|
65
|
+
@extend %span-full-grid-on-mobile;
|
|
66
|
+
@extend %display-block;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// col-small-X classes define grid for small screen
|
|
71
|
+
@for $i from $grid-columns-small through 1 {
|
|
72
|
+
.#{$grid-small-col-prefix}#{$i} {
|
|
73
|
+
@extend %display-block;
|
|
74
|
+
@include vf-grid-column($i);
|
|
75
|
+
|
|
76
|
+
width: 100%;
|
|
37
77
|
}
|
|
38
78
|
}
|
|
39
79
|
|
|
40
80
|
// tablet grid
|
|
41
|
-
|
|
81
|
+
|
|
82
|
+
// on medium/tablet screens, small and large grid class names span full width (to match block level element behaviour)
|
|
83
|
+
%span-full-grid-on-tablet {
|
|
84
|
+
@media (min-width: $threshold-4-6-col) {
|
|
85
|
+
grid-column: auto / span $grid-columns-medium;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@for $i from 1 through $grid-columns-small {
|
|
90
|
+
.#{$grid-small-col-prefix}#{$i} {
|
|
91
|
+
@extend %span-full-grid-on-tablet;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@for $i from 1 through $grid-columns {
|
|
96
|
+
.#{$grid-large-col-prefix}#{$i} {
|
|
97
|
+
@extend %span-full-grid-on-tablet;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// col-medium-X classes define grid for medium screens
|
|
102
|
+
@media (min-width: $threshold-4-6-col) {
|
|
42
103
|
@for $i from $grid-columns-medium through 1 {
|
|
43
104
|
.#{$grid-medium-col-prefix}#{$i} {
|
|
44
105
|
@include vf-grid-column($i);
|
|
@@ -49,38 +110,34 @@
|
|
|
49
110
|
}
|
|
50
111
|
|
|
51
112
|
// desktop grid
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
@include vf-grid-column($i);
|
|
58
|
-
}
|
|
113
|
+
|
|
114
|
+
// on desktop screens small and medium grid class names span full width (to match block level element behaviour)
|
|
115
|
+
%span-full-grid-on-desktop {
|
|
116
|
+
@media (min-width: $threshold-6-12-col) {
|
|
117
|
+
grid-column: auto / span $grid-columns;
|
|
59
118
|
}
|
|
60
119
|
}
|
|
61
120
|
|
|
62
|
-
// span full grid on other breakpoints; (to match block level element behaviour)
|
|
63
121
|
@for $i from 1 through $grid-columns-small {
|
|
64
122
|
.#{$grid-small-col-prefix}#{$i} {
|
|
65
|
-
@extend %span-full-grid-on-tablet;
|
|
66
123
|
@extend %span-full-grid-on-desktop;
|
|
67
|
-
@extend %display-block;
|
|
68
124
|
}
|
|
69
125
|
}
|
|
70
126
|
|
|
71
127
|
@for $i from 1 through $grid-columns-medium {
|
|
72
128
|
.#{$grid-medium-col-prefix}#{$i} {
|
|
73
|
-
@extend %span-full-grid-on-mobile;
|
|
74
129
|
@extend %span-full-grid-on-desktop;
|
|
75
|
-
@extend %display-block;
|
|
76
130
|
}
|
|
77
131
|
}
|
|
78
132
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
133
|
+
// col-X class names define grid on large/desktop screens
|
|
134
|
+
@media (min-width: $threshold-6-12-col) {
|
|
135
|
+
@for $i from $grid-columns through 1 {
|
|
136
|
+
// set col-* to span respective number of columns on desktop
|
|
137
|
+
.#{$grid-large-col-prefix}#{$i} {
|
|
138
|
+
// on smaller screens let them display full width one under another
|
|
139
|
+
@include vf-grid-column($i);
|
|
140
|
+
}
|
|
84
141
|
}
|
|
85
142
|
}
|
|
86
143
|
|
|
@@ -88,28 +145,21 @@
|
|
|
88
145
|
$offsets: (
|
|
89
146
|
(small, 0, $threshold-4-6-col, $grid-columns-small - 1),
|
|
90
147
|
(medium, $threshold-4-6-col, $threshold-6-12-col, $grid-columns-medium - 1),
|
|
91
|
-
(large, $threshold-6-12-col,
|
|
148
|
+
(large, $threshold-6-12-col, false, $grid-columns - 1)
|
|
92
149
|
);
|
|
93
150
|
|
|
94
|
-
@each $label, $breakpoint-min, $breakpoint-
|
|
95
|
-
$query: null;
|
|
151
|
+
@each $label, $breakpoint-min, $breakpoint-reset, $col-count in $offsets {
|
|
96
152
|
@if $breakpoint-min == 0 {
|
|
97
|
-
|
|
98
|
-
} @else if $breakpoint-max == -1 {
|
|
99
|
-
$query: '(min-width: #{$breakpoint-min})';
|
|
153
|
+
@include vf-grid-column-reordering($label, $col-count);
|
|
100
154
|
} @else {
|
|
101
|
-
|
|
155
|
+
@media (min-width: #{$breakpoint-min}) {
|
|
156
|
+
@include vf-grid-column-reordering($label, $col-count);
|
|
157
|
+
}
|
|
102
158
|
}
|
|
103
159
|
|
|
104
|
-
@
|
|
105
|
-
@
|
|
106
|
-
|
|
107
|
-
grid-column-start: #{$i};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.#{$grid-column-prefix}order-#{$label}-#{$i} {
|
|
111
|
-
order: #{$i};
|
|
112
|
-
}
|
|
160
|
+
@if $breakpoint-reset {
|
|
161
|
+
@media (min-width: #{$breakpoint-reset}) {
|
|
162
|
+
@include vf-grid-column-reordering($label, $col-count, $reset: true);
|
|
113
163
|
}
|
|
114
164
|
}
|
|
115
165
|
}
|
|
@@ -127,7 +177,7 @@
|
|
|
127
177
|
position: absolute;
|
|
128
178
|
right: map-get($grid-margin-widths, small);
|
|
129
179
|
|
|
130
|
-
@media (min-width: $threshold-4-6-col)
|
|
180
|
+
@media (min-width: $threshold-4-6-col) {
|
|
131
181
|
left: map-get($grid-margin-widths, default);
|
|
132
182
|
right: map-get($grid-margin-widths, default);
|
|
133
183
|
}
|
|
@@ -17,12 +17,15 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
17
17
|
|
|
18
18
|
&::before {
|
|
19
19
|
align-self: start;
|
|
20
|
-
background-color: $color-
|
|
20
|
+
background-color: $color-x-light;
|
|
21
|
+
border: 1px solid $color-x-dark;
|
|
21
22
|
border-radius: 100%;
|
|
22
23
|
content: counter(li);
|
|
23
24
|
counter-increment: li;
|
|
24
25
|
direction: rtl;
|
|
25
26
|
display: block;
|
|
27
|
+
font-size: map-get($base-font-sizes, base);
|
|
28
|
+
font-weight: $font-weight-regular-text;
|
|
26
29
|
left: 0;
|
|
27
30
|
position: absolute;
|
|
28
31
|
text-align: center;
|
|
@@ -274,10 +277,14 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
&::before {
|
|
280
|
+
// Need to account for the 1px border:
|
|
281
|
+
line-height: calc(#{$bullet-width-mobile} - 2px);
|
|
277
282
|
margin-right: $sph--large;
|
|
278
283
|
width: $bullet-width-mobile;
|
|
279
284
|
|
|
280
285
|
@media (min-width: $breakpoint-heading-threshold) {
|
|
286
|
+
// Need to account for the 1px border:
|
|
287
|
+
line-height: calc(#{$bullet-width} - 2px);
|
|
281
288
|
width: $bullet-width;
|
|
282
289
|
}
|
|
283
290
|
}
|
|
@@ -295,10 +302,16 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
295
302
|
// Bullet sizes for each heading level
|
|
296
303
|
$bullet-width: map-get($line-heights, default-text);
|
|
297
304
|
$bullet-width-mobile: map-get($line-heights, default-text);
|
|
305
|
+
// h6 line height is the same as the bullet width so no need to apply any margin:
|
|
306
|
+
$bullet-margin: 0;
|
|
307
|
+
$bullet-margin-mobile: 0;
|
|
298
308
|
|
|
299
309
|
@if $i < 5 {
|
|
300
|
-
|
|
301
|
-
|
|
310
|
+
// To align the bullet with the title we need to use half
|
|
311
|
+
// the height difference between the bullet and the title and then add the
|
|
312
|
+
// nudge to position it with the lower case text.
|
|
313
|
+
$bullet-margin: calc((map-get($line-heights, h#{$i}) - $bullet-width) / 2) + map-get($nudges, h#{$i});
|
|
314
|
+
$bullet-margin-mobile: calc((map-get($line-heights, h#{$i}-mobile) - $bullet-width-mobile) / 2) + map-get($nudges, h#{$i});
|
|
302
315
|
}
|
|
303
316
|
|
|
304
317
|
.p-heading--#{$i}.p-stepped-list__title,
|
|
@@ -310,10 +323,16 @@ $list-status-icon-nudge: 0.3rem; // 0.3rem seems to be a magic number that posit
|
|
|
310
323
|
}
|
|
311
324
|
|
|
312
325
|
&::before {
|
|
326
|
+
// Need to account for the 1px border:
|
|
327
|
+
line-height: calc(#{$bullet-width-mobile} - 2px);
|
|
313
328
|
margin-right: $sph--large;
|
|
329
|
+
margin-top: $bullet-margin-mobile;
|
|
314
330
|
width: $bullet-width-mobile;
|
|
315
331
|
|
|
316
332
|
@media (min-width: $breakpoint-heading-threshold) {
|
|
333
|
+
// Need to account for the 1px border:
|
|
334
|
+
line-height: calc(#{$bullet-width} - 2px);
|
|
335
|
+
margin-top: $bullet-margin;
|
|
317
336
|
width: $bullet-width;
|
|
318
337
|
}
|
|
319
338
|
}
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
$percentage-contribution: $logo-column-span * $percentage-width-of-one-col;
|
|
42
42
|
$gutter-width-inside-logo: $gutter * ($logo-column-span - 1);
|
|
43
43
|
$rem-contribution: $logo-column-span * math.div($gutters-total-width, $grid-column-count) - $gutter-width-inside-logo;
|
|
44
|
-
|
|
45
44
|
@include vf-p-apply-logo-section-item-width($percentage-contribution, $rem-contribution);
|
|
46
45
|
|
|
47
46
|
// Looping in reverse to ensure nested column rules end up further down in the generated css file, thus having higher specificity.
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
3
|
$lightness-threshold: 70;
|
|
4
|
-
$navigation-logo-tag-width: 1.
|
|
5
|
-
$navigation-logo-tag-height:
|
|
6
|
-
$navigation-logo-tag-height-desktop: 2.
|
|
7
|
-
$navigation-logo-height: 3rem;
|
|
4
|
+
$navigation-logo-tag-width: 1.313rem; // 21px when 1rem is 16px
|
|
5
|
+
$navigation-logo-tag-height: 2rem;
|
|
6
|
+
$navigation-logo-tag-height-desktop: 2.3rem;
|
|
8
7
|
$navigation-logo-height-desktop: 3.5rem;
|
|
9
|
-
$navigation-logo-
|
|
8
|
+
$navigation-logo-size: 1rem;
|
|
10
9
|
$sph-navigation-link: 0.3rem;
|
|
11
|
-
$spv-navigation-logo: 0.
|
|
10
|
+
$spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
|
|
12
11
|
|
|
13
12
|
@mixin vf-p-navigation {
|
|
14
13
|
// placeholders
|
|
@@ -200,7 +199,7 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
200
199
|
.p-navigation__logo {
|
|
201
200
|
display: flex;
|
|
202
201
|
flex: 0 0 auto;
|
|
203
|
-
height: $navigation-logo-
|
|
202
|
+
height: $navigation-logo-size;
|
|
204
203
|
margin: 0 $sph--large 0 0;
|
|
205
204
|
|
|
206
205
|
@media (min-width: $breakpoint-navigation-threshold) {
|
|
@@ -233,11 +232,12 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
233
232
|
}
|
|
234
233
|
|
|
235
234
|
.p-navigation__logo-icon {
|
|
236
|
-
bottom: $spv-navigation-logo;
|
|
235
|
+
bottom: $spv-navigation-logo-bottom-position;
|
|
236
|
+
height: $navigation-logo-size;
|
|
237
237
|
left: 50%;
|
|
238
238
|
position: absolute;
|
|
239
239
|
transform: translate(-50%, 0);
|
|
240
|
-
width: $navigation-logo-
|
|
240
|
+
width: $navigation-logo-size;
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
.p-navigation__logo-title {
|
|
@@ -249,7 +249,7 @@ $spv-navigation-logo: 0.3125rem;
|
|
|
249
249
|
.p-navigation__link {
|
|
250
250
|
@extend %navigation-link;
|
|
251
251
|
|
|
252
|
-
padding-left: $
|
|
252
|
+
padding-left: $sph--x-large;
|
|
253
253
|
|
|
254
254
|
&:hover {
|
|
255
255
|
background-color: transparent !important;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
Side navigation in default variant.
|
|
9
9
|
.p-side-navigation--icons:
|
|
10
10
|
Side navigation with item icons.
|
|
11
|
+
.p-side-navigation--accordion:
|
|
12
|
+
Side navigation with expanding accordion items.
|
|
11
13
|
.p-side-navigation--raw-html:
|
|
12
14
|
Raw HTML version of side navigation (used with links generated by an external service).
|
|
13
15
|
"&.is-drawer-expanded":
|
|
@@ -67,6 +69,10 @@
|
|
|
67
69
|
.p-side-navigation__text:
|
|
68
70
|
Single text item in side navigation (for items that are not linked).
|
|
69
71
|
|
|
72
|
+
Item accordion button:
|
|
73
|
+
.p-side-navigation__accordion-button:
|
|
74
|
+
Single accordion button item in side navigation with `.p-side-navigation--accordion` variant.
|
|
75
|
+
|
|
70
76
|
Item icon:
|
|
71
77
|
.p-side-navigation__icon:
|
|
72
78
|
An icon in side navigation item (used with `.p-side-navigation--icons` variant).
|
|
@@ -264,6 +270,10 @@
|
|
|
264
270
|
@include vf-side-navigation-spacing-left($prop: left, $multiplier: 2, $offset: $sp-sidenav--icon-width);
|
|
265
271
|
}
|
|
266
272
|
|
|
273
|
+
.p-side-navigation--accordion &::after {
|
|
274
|
+
@include vf-side-navigation-spacing-left($prop: left, $multiplier: 2);
|
|
275
|
+
}
|
|
276
|
+
|
|
267
277
|
&:last-of-type::after {
|
|
268
278
|
content: none;
|
|
269
279
|
}
|
|
@@ -271,6 +281,26 @@
|
|
|
271
281
|
|
|
272
282
|
.p-side-navigation__list {
|
|
273
283
|
@extend %side-navigation__list;
|
|
284
|
+
|
|
285
|
+
// accordion styles
|
|
286
|
+
&[aria-expanded] {
|
|
287
|
+
@include vf-transition(#{transform, opacity}, fast);
|
|
288
|
+
&.has-tick-elements {
|
|
289
|
+
padding-left: 1em;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
&[aria-expanded='false'] {
|
|
293
|
+
height: 0;
|
|
294
|
+
opacity: 0;
|
|
295
|
+
transform: translate3d(0, -0.5rem, 0);
|
|
296
|
+
visibility: hidden;
|
|
297
|
+
}
|
|
298
|
+
&[aria-expanded='true'] {
|
|
299
|
+
height: auto;
|
|
300
|
+
opacity: 1;
|
|
301
|
+
transform: translate3d(0, 0, 0);
|
|
302
|
+
visibility: visible;
|
|
303
|
+
}
|
|
274
304
|
}
|
|
275
305
|
|
|
276
306
|
%side-navigation__text {
|
|
@@ -322,17 +352,65 @@
|
|
|
322
352
|
@extend %side-navigation__link;
|
|
323
353
|
}
|
|
324
354
|
|
|
355
|
+
.p-side-navigation__accordion-button {
|
|
356
|
+
// reset default button styles
|
|
357
|
+
border: 0;
|
|
358
|
+
border-radius: 0;
|
|
359
|
+
font-size: inherit;
|
|
360
|
+
justify-content: flex-start;
|
|
361
|
+
margin-bottom: 0;
|
|
362
|
+
text-align: left;
|
|
363
|
+
width: 100%;
|
|
364
|
+
|
|
365
|
+
&::before {
|
|
366
|
+
@extend %icon;
|
|
367
|
+
@include vf-transition($property: transform, $duration: fast);
|
|
368
|
+
|
|
369
|
+
align-self: center;
|
|
370
|
+
content: '';
|
|
371
|
+
flex-shrink: 0;
|
|
372
|
+
margin-left: calc(-1 * ($sph--large + $sp-sidenav--icon-width));
|
|
373
|
+
margin-right: $sph--large;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// aria-selected controls the open and closed state for the accordion tab
|
|
377
|
+
&[aria-expanded='true'] {
|
|
378
|
+
// override base expanded button styles
|
|
379
|
+
background-color: inherit;
|
|
380
|
+
|
|
381
|
+
&:hover {
|
|
382
|
+
background-color: $colors--light-theme--background-hover;
|
|
383
|
+
}
|
|
384
|
+
@include vf-transition(#{background-color, border-color});
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&[aria-expanded='false'] {
|
|
388
|
+
&::before {
|
|
389
|
+
transform: rotate(-90deg);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
@include vf-transition(#{background-color, border-color});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
325
396
|
.p-side-navigation__heading,
|
|
326
397
|
.p-side-navigation__text,
|
|
327
|
-
.p-side-navigation__link
|
|
398
|
+
.p-side-navigation__link,
|
|
399
|
+
.p-side-navigation__accordion-button {
|
|
400
|
+
// offset for accordion chevrons is icon size + twice spacing around it
|
|
401
|
+
// we don't use grid width spacing for accordion (as we do in icon version)
|
|
402
|
+
$sp-sidenav--accordion-offset: $sp-sidenav--icon-width + 2 * $sph--large;
|
|
328
403
|
@extend %side-navigation__text;
|
|
329
404
|
|
|
330
405
|
.p-side-navigation--icons & {
|
|
331
406
|
@include vf-side-navigation-spacing-left($multiplier: 2, $offset: $sp-sidenav--icon-width);
|
|
332
|
-
|
|
333
407
|
position: relative;
|
|
334
408
|
}
|
|
335
409
|
|
|
410
|
+
.p-side-navigation--accordion & {
|
|
411
|
+
@include vf-side-navigation-spacing-left($multiplier: 0, $offset: $sp-sidenav--accordion-offset);
|
|
412
|
+
}
|
|
413
|
+
|
|
336
414
|
// nested 2nd level of navigation
|
|
337
415
|
.p-side-navigation__item--title .p-side-navigation__item &,
|
|
338
416
|
.p-side-navigation__item .p-side-navigation__item & {
|
|
@@ -342,6 +420,11 @@
|
|
|
342
420
|
.p-side-navigation--icons & {
|
|
343
421
|
@include vf-side-navigation-spacing-left($multiplier: 3, $offset: $sp-sidenav--icon-width);
|
|
344
422
|
}
|
|
423
|
+
|
|
424
|
+
// add spacing for variant with accordions
|
|
425
|
+
.p-side-navigation--accordion & {
|
|
426
|
+
@include vf-side-navigation-spacing-left($multiplier: 1, $offset: $sp-sidenav--accordion-offset);
|
|
427
|
+
}
|
|
345
428
|
}
|
|
346
429
|
|
|
347
430
|
// nested 3rd level of navigation
|
|
@@ -353,6 +436,11 @@
|
|
|
353
436
|
.p-side-navigation--icons & {
|
|
354
437
|
@include vf-side-navigation-spacing-left($multiplier: 4, $offset: $sp-sidenav--icon-width);
|
|
355
438
|
}
|
|
439
|
+
|
|
440
|
+
// add spacing for variant with accordions
|
|
441
|
+
.p-side-navigation--accordion & {
|
|
442
|
+
@include vf-side-navigation-spacing-left($multiplier: 2, $offset: $sp-sidenav--accordion-offset);
|
|
443
|
+
}
|
|
356
444
|
}
|
|
357
445
|
}
|
|
358
446
|
|
|
@@ -475,10 +563,6 @@
|
|
|
475
563
|
@media (min-width: $threshold-4-6-col) {
|
|
476
564
|
#{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
|
|
477
565
|
}
|
|
478
|
-
|
|
479
|
-
@media (min-width: $threshold-6-12-col) {
|
|
480
|
-
#{$prop}: $multiplier * map-get($grid-margin-widths, default) + $offset;
|
|
481
|
-
}
|
|
482
566
|
}
|
|
483
567
|
|
|
484
568
|
// theme
|
|
@@ -592,6 +676,19 @@
|
|
|
592
676
|
color: $color-sidenav-text-active;
|
|
593
677
|
}
|
|
594
678
|
|
|
679
|
+
.p-side-navigation__accordion-button {
|
|
680
|
+
background-color: inherit;
|
|
681
|
+
color: inherit;
|
|
682
|
+
&::before {
|
|
683
|
+
@include vf-icon-chevron($color-sidenav-toggle-icon);
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
&:hover {
|
|
687
|
+
background: $color-sidenav-item-background-hover;
|
|
688
|
+
color: $color-sidenav-text-active;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
595
692
|
// styles applied when side nav is used in application layout
|
|
596
693
|
@if mixin-exists(vf-application-layout--when-collapsed) {
|
|
597
694
|
.p-side-navigation__item.has-active-child {
|
|
@@ -109,14 +109,6 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
|
|
|
109
109
|
linear-gradient(to top right, #fff 0%, #fff 49%, transparent 50%, transparent 100%), linear-gradient(to top right, #fff 0%, #fff 100%),
|
|
110
110
|
linear-gradient(111deg, $color-suru-start 10%, $color-suru-middle 37%, $color-suru-end 100%);
|
|
111
111
|
|
|
112
|
-
@supports (background-blend-mode: multiply) {
|
|
113
|
-
background-blend-mode: multiply, multiply, normal, normal, normal;
|
|
114
|
-
background-image: linear-gradient(to bottom right, $color-suru-slant-left 0%, $color-suru-slant-left 49.8%, transparent 50%, transparent 100%),
|
|
115
|
-
linear-gradient(to bottom left, $color-suru-slant-right 0%, $color-suru-slant-right 49.8%, transparent 50%, transparent 100%),
|
|
116
|
-
linear-gradient(to top right, $color-suru-background 0%, $color-suru-background 49%, transparent 50%, transparent 100%),
|
|
117
|
-
linear-gradient($color-suru-background 0%, $color-suru-background 100%), linear-gradient(111deg, $color-suru-start 10%, $color-suru-middle 37%, $color-suru-end 100%);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
112
|
background-position: 0% 0%, top right, right 0 bottom 4rem, right bottom, 0% 0%;
|
|
121
113
|
background-repeat: no-repeat;
|
|
122
114
|
background-size: 100% calc(100% - 4rem), 50% 100%, 100% 4rem, 100% 4rem, auto;
|
|
@@ -126,6 +118,14 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
|
|
|
126
118
|
padding-bottom: 12rem;
|
|
127
119
|
position: relative;
|
|
128
120
|
|
|
121
|
+
@supports (background-blend-mode: multiply) {
|
|
122
|
+
background-blend-mode: multiply, multiply, normal, normal, normal;
|
|
123
|
+
background-image: linear-gradient(to bottom right, $color-suru-slant-left 0%, $color-suru-slant-left 49.8%, transparent 50%, transparent 100%),
|
|
124
|
+
linear-gradient(to bottom left, $color-suru-slant-right 0%, $color-suru-slant-right 49.8%, transparent 50%, transparent 100%),
|
|
125
|
+
linear-gradient(to top right, $color-suru-background 0%, $color-suru-background 49%, transparent 50%, transparent 100%),
|
|
126
|
+
linear-gradient($color-suru-background 0%, $color-suru-background 100%), linear-gradient(111deg, $color-suru-start 10%, $color-suru-middle 37%, $color-suru-end 100%);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
129
|
&.is-deep {
|
|
130
130
|
$padding: 3rem;
|
|
131
131
|
|
|
@@ -160,6 +160,12 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
|
|
|
160
160
|
linear-gradient(to bottom right, transparent 0%, transparent 49%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 1) 100%),
|
|
161
161
|
linear-gradient(90deg, $color-suru-start 4%, $color-suru-middle 50%, $color-suru-end 88%);
|
|
162
162
|
|
|
163
|
+
background-position: top right, top right, top left, top left;
|
|
164
|
+
background-repeat: no-repeat;
|
|
165
|
+
background-size: 39.4% 6rem, 54% 4rem, 63% 4rem, 62.6% 4rem;
|
|
166
|
+
padding-bottom: 4rem;
|
|
167
|
+
padding-top: 6rem;
|
|
168
|
+
|
|
163
169
|
@supports (background-blend-mode: multiply) {
|
|
164
170
|
background-blend-mode: multiply, multiply, normal, normal;
|
|
165
171
|
background-image: linear-gradient(to bottom left, rgba(229, 229, 229, 0.5) 0%, rgba(229, 229, 229, 0.5) 49%, transparent 50%, transparent 100%),
|
|
@@ -168,12 +174,6 @@ $color-suru-slant-left-fallback: rgba(205, 205, 205, 0.14) !default;
|
|
|
168
174
|
linear-gradient(90deg, $color-suru-start 4%, $color-suru-middle 50%, $color-suru-end 88%);
|
|
169
175
|
}
|
|
170
176
|
|
|
171
|
-
background-position: top right, top right, top left, top left;
|
|
172
|
-
background-repeat: no-repeat;
|
|
173
|
-
background-size: 39.4% 6rem, 54% 4rem, 63% 4rem, 62.6% 4rem;
|
|
174
|
-
padding-bottom: 4rem;
|
|
175
|
-
padding-top: 6rem;
|
|
176
|
-
|
|
177
177
|
&.is-shallow {
|
|
178
178
|
// Override is-shallow class with default padding, as Suru strips were not designed to be shallow
|
|
179
179
|
padding: 6rem 0 4rem 0;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
$breakpoint-x-small: 460px !default;
|
|
3
3
|
$breakpoint-small: 620px !default;
|
|
4
4
|
$breakpoint-large: 1036px !default;
|
|
5
|
-
$breakpoint-navigation-threshold: $breakpoint-
|
|
5
|
+
$breakpoint-navigation-threshold: $breakpoint-large !default;
|
|
6
6
|
$breakpoint-heading-threshold: $breakpoint-large !default;
|
|
7
7
|
$breakpoint-x-large: 1681px !default; // exclude most laptops
|