vanilla-framework 3.10.0 → 3.11.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 CHANGED
@@ -47,7 +47,7 @@
47
47
  "percy": "percy exec -- node snapshots.js",
48
48
  "icon-svgs-to-mixins": "node scripts/convert-svgs-to-icon-mixins.js icons"
49
49
  },
50
- "version": "3.10.0",
50
+ "version": "3.11.1",
51
51
  "files": [
52
52
  "_index.scss",
53
53
  "/scss",
@@ -61,17 +61,17 @@
61
61
  "postcss": "8.4.21",
62
62
  "postcss-cli": "9.1.0",
63
63
  "postcss-scss": "4.0.6",
64
- "sass": "1.57.1",
64
+ "sass": "1.58.0",
65
65
  "yaml": "1.10.2"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@percy/script": "1.1.0",
69
- "@testing-library/cypress": "8.0.7",
70
- "cypress": "10.11.0",
69
+ "@testing-library/cypress": "9.0.0",
70
+ "cypress": "12.5.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.2",
74
+ "prettier": "2.8.3",
75
75
  "stylelint": "14.16.1",
76
76
  "stylelint-config-prettier": "9.0.4",
77
77
  "stylelint-config-recommended-scss": "5.0.2",
@@ -7,7 +7,7 @@
7
7
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
8
8
  font-style: normal;
9
9
  font-weight: 100 800; /* min and max value for the weight axis */
10
- src: url('#{$assets-path}f3b9cc97-Ubuntu[wdth,wght]-latin.woff2') format('woff2-variations');
10
+ src: url('#{$assets-path}15be2ffe-UbuntuBeta0.865[wdth,wght]-latin.woff2') format('woff2-variations');
11
11
  }
12
12
 
13
13
  @font-face {
@@ -15,14 +15,14 @@
15
15
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
16
16
  font-style: italic;
17
17
  font-weight: 100 800; /* min and max value for the weight axis */
18
- src: url('#{$assets-path}c1b12cdf-Ubuntu-Italic[wdth,wght]-latin.woff2') format('woff2-variations');
18
+ src: url('#{$assets-path}a84821f4-UbuntuBeta0.865-Italic[wdth,wght]-latin.woff2') format('woff2-variations');
19
19
  }
20
20
 
21
21
  @font-face {
22
22
  font-family: 'Ubuntu Mono variable';
23
23
  font-style: normal;
24
24
  font-weight: 100 800; /* min and max value for the weight axis */
25
- src: url('#{$assets-path}0bd4277a-UbuntuMono[wght]-latin.woff2') format('woff2-variations');
25
+ src: url('#{$assets-path}ec568c8f-UbuntuMonoBeta0.865[wght]-latin.woff2') format('woff2-variations');
26
26
  }
27
27
 
28
28
  @if $font-allow-cyrillic-greek-latin {
@@ -32,7 +32,7 @@
32
32
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
33
33
  font-style: normal;
34
34
  font-weight: 100 800; /* min and max value for the weight axis */
35
- src: url('#{$assets-path}7d55b1fc-Ubuntu[wdth,wght]-cyrillic-extended.woff2') format('woff2-variations');
35
+ src: url('#{$assets-path}929e5b64-UbuntuBeta0.865[wdth,wght]-cyrillic-extended.woff2') format('woff2-variations');
36
36
  unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
37
37
  }
38
38
 
@@ -42,7 +42,7 @@
42
42
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
43
43
  font-style: normal;
44
44
  font-weight: 100 800; /* min and max value for the weight axis */
45
- src: url('#{$assets-path}086e42aa-Ubuntu[wdth,wght]-cyrillic.woff2') format('woff2-variations');
45
+ src: url('#{$assets-path}ec29c093-UbuntuBeta0.865[wdth,wght]-cyrillic.woff2') format('woff2-variations');
46
46
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
47
47
  }
48
48
 
@@ -52,7 +52,7 @@
52
52
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
53
53
  font-style: normal;
54
54
  font-weight: 100 800; /* min and max value for the weight axis */
55
- src: url('#{$assets-path}77e5f6a2-Ubuntu[wdth,wght]-greek-extended.woff2') format('woff2-variations');
55
+ src: url('#{$assets-path}0a8276a6-UbuntuBeta0.865[wdth,wght]-greek-extended.woff2') format('woff2-variations');
56
56
  unicode-range: U+1F00-1FFF;
57
57
  }
58
58
 
@@ -62,7 +62,7 @@
62
62
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
63
63
  font-style: normal;
64
64
  font-weight: 100 800; /* min and max value for the weight axis */
65
- src: url('#{$assets-path}57fdffc1-Ubuntu[wdth,wght]-greek.woff2') format('woff2-variations');
65
+ src: url('#{$assets-path}16acdbb4-UbuntuBeta0.865[wdth,wght]-greek.woff2') format('woff2-variations');
66
66
  unicode-range: U+0370-03FF;
67
67
  }
68
68
 
@@ -72,7 +72,7 @@
72
72
  font-stretch: 100%; /* min and max value for the width axis, expressed as percentage */
73
73
  font-style: normal;
74
74
  font-weight: 100 800; /* min and max value for the weight axis */
75
- src: url('#{$assets-path}a312a7ed-Ubuntu[wdth,wght]-latin-extended.woff2') format('woff2-variations');
75
+ src: url('#{$assets-path}c81d0142-UbuntuBeta0.865[wdth,wght]-latin-extended.woff2') format('woff2-variations');
76
76
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
77
77
  }
78
78
  }
@@ -6,7 +6,7 @@
6
6
  hr {
7
7
  @extend %hr;
8
8
 
9
- margin-bottom: calc($spv--small - $input-border-thickness);
9
+ margin-bottom: calc($spv--small - 1px);
10
10
 
11
11
  &.u-no-margin--bottom {
12
12
  // compensate for hr thickness, to make sure it doesn't drift from baseline grid
@@ -76,7 +76,7 @@
76
76
  %vf-heading-4 {
77
77
  font-size: #{map-get($font-sizes, h4-mobile)}rem;
78
78
  font-style: normal;
79
- font-weight: $font-weight-regular-text;
79
+ font-weight: $font-weight-thin;
80
80
  line-height: map-get($line-heights, h4-mobile);
81
81
  margin-bottom: map-get($sp-after, h4-mobile) - map-get($nudges, h4-mobile);
82
82
  margin-top: 0;
@@ -203,7 +203,16 @@
203
203
  color: $colors--light-theme--text-muted;
204
204
  }
205
205
 
206
+ %small-caps-text {
207
+ @extend %common-default-text-properties;
208
+ font-variant-caps: all-small-caps;
209
+ letter-spacing: 0.05em;
210
+ margin-bottom: map-get($sp-after, default-text) - map-get($nudges, p);
211
+ }
212
+
206
213
  %table-header-label {
214
+ // TODO: table header should use %small-caps-text,
215
+ // but we need to test it in the context of MAAS dense tables first
207
216
  @extend %x-small-text;
208
217
 
209
218
  text-transform: uppercase;
@@ -79,10 +79,7 @@
79
79
  }
80
80
 
81
81
  .p-text--x-small-capitalised {
82
- @extend %x-small-text;
83
-
84
- font-weight: $font-weight-bold;
85
- text-transform: uppercase;
82
+ @extend %small-caps-text;
86
83
  }
87
84
 
88
85
  //@section Adjusted spacing for headings (or a p) following a paragraph
@@ -223,19 +223,19 @@ $application-layout--side-nav-width-expanded: 15rem !default;
223
223
 
224
224
  // Other panels
225
225
  // --------------
226
- .l-main {
226
+ .l-application .l-main {
227
227
  grid-area: main;
228
228
  overflow-y: auto;
229
229
  }
230
230
 
231
- .l-status {
231
+ .l-application .l-status {
232
232
  border-top: 1px solid $colors--light-theme--border-low-contrast;
233
233
  grid-area: status;
234
234
  z-index: 102;
235
235
  }
236
236
 
237
- .l-aside {
238
- @include vf-transition($property: #{transform, box-shadow}, $duration: snap);
237
+ .l-application .l-aside {
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,91 @@
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
+ // stylelint-disable-next-line selector-max-type
15
+ body {
16
+ position: relative;
17
+ }
18
+
19
+ .l-full-width__sidebar {
20
+ background: $color-light;
21
+
22
+ // height of top navigation, as padding applied to .p-navigation__link + line-heigh of the anchor text inside
23
+ $navigation-top-height: $spv--large * 2 + map-get($line-heights, default-text);
24
+
25
+ height: calc(100% - $navigation-top-height); // height of document reduced by height of top nav
26
+ min-height: calc(100vh - $navigation-top-height);
27
+ position: absolute;
28
+ width: $l-full-screen-aside-width;
29
+ z-index: 1;
30
+
31
+ &::after {
32
+ background: linear-gradient(90deg, transparent, rgba($color-x-dark, 0.05));
33
+ bottom: 0;
34
+ content: '';
35
+ position: absolute;
36
+ right: 0;
37
+ top: 0;
38
+ width: 8px;
39
+ }
40
+
41
+ // side navigation component drawer needs background only when it's fixed on smaller screens
42
+ // keep it transparent when it's visible as part of full width layout
43
+ .p-side-navigation__drawer {
44
+ background: transparent;
45
+ }
46
+ }
47
+
48
+ .l-full-width {
49
+ display: grid;
50
+ grid-template-areas: 'start main end';
51
+ grid-template-columns: $l-full-screen-aside-width minmax(0, 1fr) min-content;
52
+ width: 100%;
53
+
54
+ // left side container
55
+ .l-start {
56
+ grid-area: start;
57
+ }
58
+
59
+ // main container
60
+ .l-main {
61
+ grid-area: main;
62
+
63
+ // grid should align to the left (no left margin)
64
+ // TODO: ideally this should be applied to %fixed-width-container
65
+ .row,
66
+ .u-fixed-width {
67
+ margin-left: 0;
68
+ }
69
+ }
70
+
71
+ // right side container
72
+ .l-end {
73
+ grid-area: end;
74
+ }
75
+ }
76
+ }
77
+
78
+ // full width layout
79
+ @media (min-width: $breakpoint-full-screen-layout) {
80
+ .l-full-width {
81
+ grid-template-columns: $l-full-screen-aside-width minmax(0, 1fr) $l-full-screen-aside-width;
82
+
83
+ .l-main {
84
+ .row,
85
+ .u-fixed-width {
86
+ margin-left: auto;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
@@ -66,7 +66,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
66
66
  border-radius: 0;
67
67
 
68
68
  display: block;
69
- font-weight: $font-weight-bold;
69
+ font-weight: $font-weight-regular-text;
70
70
  line-height: map-get($line-heights, default-text);
71
71
  margin: 0;
72
72
  overflow: hidden;
@@ -12,6 +12,7 @@ $base-font-sizes: (
12
12
  large: $font-size-largescreen,
13
13
  ) !default;
14
14
  $font-weight-display-heading: 100 !default;
15
+ $font-weight-thin: 300 !default;
15
16
  $font-weight-regular-text: 400 !default;
16
17
  $font-weight-bold: 550 !default;
17
18
 
@@ -18,7 +18,7 @@ $font-sizes: (
18
18
  h4-mobile: 1.22176,
19
19
  small: pow($ms-ratio, -1),
20
20
  x-small: pow($ms-ratio, -2),
21
- );
21
+ ) !default;
22
22
 
23
23
  $line-heights: (
24
24
  h1: 7 * $sp-unit,
@@ -3,7 +3,8 @@
3
3
  @extend %fixed-width-container;
4
4
 
5
5
  & &,
6
- .row & {
6
+ .row &,
7
+ & .row {
7
8
  @include vf-b-row-reset;
8
9
  }
9
10
  }
@@ -2,12 +2,12 @@
2
2
 
3
3
  // Positions element out of flow & off screen for screen readers
4
4
  @mixin vf-u-off-screen {
5
- .u-off-screen {
6
- height: 0 !important;
7
- left: -10000px !important;
8
- overflow: hidden !important;
9
- position: absolute !important;
10
- top: auto !important;
11
- width: 1px !important;
5
+ .u-off-screen:not(:focus):not(:active) {
6
+ clip-path: inset(50%);
7
+ height: 1px;
8
+ overflow: hidden;
9
+ position: absolute;
10
+ white-space: nowrap;
11
+ width: 1px;
12
12
  }
13
13
  }
@@ -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