vanilla-framework 4.0.0-alpha.3 → 4.0.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-framework",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0",
4
4
  "author": {
5
5
  "email": "webteam@canonical.com",
6
6
  "name": "Canonical Webteam"
@@ -46,8 +46,7 @@
46
46
  @include vf-hr-dark-theme;
47
47
  }
48
48
 
49
- hr.is-light, // deprecated, use on-light instead
50
- hr.on-light {
49
+ hr.is-light {
51
50
  @include vf-hr-light-theme;
52
51
  }
53
52
  } @else {
@@ -55,8 +54,7 @@
55
54
  @include vf-hr-light-theme;
56
55
  }
57
56
 
58
- hr.is-dark, // deprecated, use on-dark instead
59
- hr.on-dark {
57
+ hr.is-dark {
60
58
  @include vf-hr-dark-theme;
61
59
  }
62
60
  }
@@ -418,6 +418,10 @@
418
418
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0a8 8 0 110 16A8 8 0 018 0zm0 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zm2.814 2.45l1.203.897-5.537 7.43-3.485-3.694 1.09-1.03 2.259 2.394 4.47-5.997z' fill='#{vf-url-friendly-color($color)}' fill-rule='nonzero'/%3E%3C/svg%3E");
419
419
  }
420
420
 
421
+ @mixin vf-icon-error-grey($color) {
422
+ background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 1.52588e-05C12.4183 1.52588e-05 16 3.58174 16 8.00002C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8.00002C0 3.58174 3.58172 1.52588e-05 8 1.52588e-05ZM10.2821 4.63808L11.3427 5.69874L9.05007 7.99008L11.3427 10.2821L10.2821 11.3427L7.99007 9.05008L5.69873 11.3427L4.63807 10.2821L6.92907 7.99008L4.63807 5.69874L5.69873 4.63808L7.99007 6.92908L10.2821 4.63808ZM1.5 8.00002C1.5 4.41016 4.41015 1.50002 8 1.50002C11.5899 1.50002 14.5 4.41016 14.5 8.00002C14.5 11.5899 11.5899 14.5 8 14.5C4.41015 14.5 1.5 11.5899 1.5 8.00002Z' fill='#{vf-url-friendly-color($color)}' fill-rule='evenodd'/%3E%3C/svg%3E");
423
+ }
424
+
421
425
  @mixin vf-icon-switcher-dashboard($color) {
422
426
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.25 9a.75.75 0 01.75.75v3.5a.75.75 0 01-.75.75h-3.5a.75.75 0 01-.75-.75v-3.5A.75.75 0 012.75 9h3.5zm7 0a.75.75 0 01.75.75v3.5a.75.75 0 01-.75.75h-3.5a.75.75 0 01-.75-.75v-3.5A.75.75 0 019.75 9h3.5zM5.5 10.5h-2v2h2v-2zm7 0h-2v2h2v-2zM6.25 2a.75.75 0 01.75.75v3.5a.75.75 0 01-.75.75h-3.5A.75.75 0 012 6.25v-3.5A.75.75 0 012.75 2h3.5zm7 0a.75.75 0 01.75.75v3.5a.75.75 0 01-.75.75h-3.5A.75.75 0 019 6.25v-3.5A.75.75 0 019.75 2h3.5zM5.5 3.5h-2v2h2v-2zm7 0h-2v2h2v-2z' fill='#{vf-url-friendly-color($color)}' fill-rule='nonzero'/%3E%3C/svg%3E");
423
427
  }
@@ -28,7 +28,7 @@
28
28
  color: $color-link-visited;
29
29
  }
30
30
 
31
- &.on-dark {
31
+ &.is-dark {
32
32
  color: $color-link-dark;
33
33
 
34
34
  &:visited {
@@ -198,10 +198,10 @@
198
198
  font-variant-caps: all-small-caps;
199
199
  font-variant-numeric: oldstyle-nums;
200
200
  letter-spacing: 0.05em;
201
- margin-bottom: map-get($sp-after, default-text) - map-get($nudges, p);
201
+ margin-bottom: map-get($sp-after, p-small-caps) - map-get($nudges, p);
202
202
 
203
203
  &.u-no-margin--bottom {
204
- @extend %u-no-margin--bottom--small;
204
+ @extend %u-no-margin--bottom--default-text;
205
205
  }
206
206
 
207
207
  // deprecated: the use of .u-align-text--x-small-to-default on small caps text is deprecated
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  &:not(:first-of-type)::before {
28
- content: '\203A';
28
+ content: '/';
29
29
  margin-left: -0.75rem;
30
30
  margin-right: 0.5rem;
31
31
  }
@@ -21,6 +21,8 @@
21
21
  @include vf-p-icon-copy;
22
22
  @include vf-p-icon-search;
23
23
  @include vf-p-icon-success;
24
+ @include vf-p-icon-success-grey;
25
+ @include vf-p-icon-error-grey;
24
26
  @include vf-p-icon-share;
25
27
  @include vf-p-icon-user;
26
28
  @include vf-p-icon-spinner;
@@ -1359,6 +1361,18 @@
1359
1361
  }
1360
1362
  }
1361
1363
 
1364
+ @mixin vf-p-icon-error-grey {
1365
+ .p-icon--error-grey {
1366
+ @extend %icon;
1367
+ @include vf-icon-error-grey($color-mid-dark);
1368
+
1369
+ [class*='--dark'] &,
1370
+ &.is-light {
1371
+ @include vf-icon-error-grey($color-x-light);
1372
+ }
1373
+ }
1374
+ }
1375
+
1362
1376
  @mixin vf-p-icon-switcher-dashboard {
1363
1377
  .p-icon--switcher-dashboard {
1364
1378
  @extend %icon;
@@ -198,7 +198,7 @@ $list-step-bullet-margin: $sph--x-large;
198
198
 
199
199
  &::before {
200
200
  @extend %vf-list-item-state-base;
201
- @include vf-icon-success;
201
+ @include vf-icon-success-grey($color-mid-dark);
202
202
  }
203
203
  }
204
204
 
@@ -207,7 +207,7 @@ $list-step-bullet-margin: $sph--x-large;
207
207
 
208
208
  &::before {
209
209
  @extend %vf-list-item-state-base;
210
- @include vf-icon-error;
210
+ @include vf-icon-error-grey($color-mid-dark);
211
211
  }
212
212
  }
213
213
 
@@ -251,7 +251,7 @@ $spv-navigation-logo-bottom-position: 0.125rem; // 2px when 1rem is 16px
251
251
  }
252
252
 
253
253
  .p-navigation__logo-tag {
254
- background-color: $color-brand;
254
+ background-color: $color-ubuntu;
255
255
  height: $navigation-logo-tag-height;
256
256
  left: 0;
257
257
  position: absolute;
@@ -10,7 +10,7 @@
10
10
  .p-rule--muted {
11
11
  background-color: $colors--light-theme--border-low-contrast;
12
12
 
13
- &.on-dark {
13
+ &.is-dark {
14
14
  background-color: $colors--dark-theme--border-low-contrast;
15
15
  }
16
16
  }
@@ -18,7 +18,7 @@
18
18
  .p-rule--highlight {
19
19
  @include vf-highlight-bar($colors--light-theme--text-default);
20
20
 
21
- &.on-dark {
21
+ &.is-dark {
22
22
  @include vf-highlight-bar($colors--dark-theme--text-default);
23
23
  }
24
24
 
@@ -8,7 +8,17 @@
8
8
  }
9
9
  }
10
10
 
11
- .p-block {
11
+ .p-section--deep {
12
+ // same as %section-padding--default
13
+ padding-bottom: $spv--strip-deep * 0.5;
14
+
15
+ @media (min-width: $breakpoint-large) {
16
+ padding-bottom: $spv--strip-deep;
17
+ }
18
+ }
19
+
20
+ .p-block, // deprecated, use .p-section--shallow
21
+ .p-section--shallow {
12
22
  // same as %section-padding--shallow
13
23
  padding-bottom: $spv--x-large;
14
24
  }
@@ -207,7 +207,8 @@ $colors--paper-theme--background-active: rgba($color-x-dark, $active-background-
207
207
  $colors--paper-theme--background-hover: rgba($color-x-dark, $hover-background-opacity-amount) !default;
208
208
 
209
209
  // Branding colors
210
- $color-brand: #e95420 !default;
210
+ $color-ubuntu: #e95420; // Ubuntu orange, should not be overridden
211
+ $color-brand: $color-ubuntu !default;
211
212
  $color-brand-dark: $color-brand !default;
212
213
  $color-accent: #0f95a1 !default;
213
214
  $color-accent-background: $colors--dark-theme--background-default !default; // changed from "brand" colour to dark theme background
@@ -97,6 +97,7 @@ $sp-after: (
97
97
  h4: $spv--x-large,
98
98
  h4-mobile: $spv--x-large,
99
99
  p: $spv--x-large,
100
+ p-small-caps: $spv--large,
100
101
  p-dense: $spv--large,
101
102
  default-text: $sp-unit,
102
103
  small: $spv--large,
@@ -1,4 +1,8 @@
1
1
  @mixin vf-u-vertical-spacing($start: -3, $end: 3) {
2
+ // FIXME
3
+ // this utility works only on elements that don't have borders or backgrounds
4
+ // by adding an ::after pseudo-element it extends the inside of the element
5
+ // rather than modyfing the space after it
2
6
  %u-vertical-spacer {
3
7
  content: '';
4
8
  display: block;