vanilla-framework 4.15.0 → 4.17.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.
Files changed (47) hide show
  1. package/package.json +17 -13
  2. package/scss/_base_button.scss +1 -1
  3. package/scss/_base_details.scss +1 -1
  4. package/scss/_base_forms.scss +8 -2
  5. package/scss/_base_hr.scss +2 -3
  6. package/scss/_base_icon-definitions.scss +629 -0
  7. package/scss/_base_links.scss +1 -1
  8. package/scss/_base_placeholders.scss +2 -0
  9. package/scss/_base_typography-definitions.scss +1 -1
  10. package/scss/_global_functions.scss +21 -8
  11. package/scss/_layouts_fluid-breakout.scss +2 -2
  12. package/scss/_patterns_accordion.scss +1 -1
  13. package/scss/_patterns_article-pagination.scss +2 -2
  14. package/scss/_patterns_buttons.scss +1 -1
  15. package/scss/_patterns_chip.scss +68 -68
  16. package/scss/_patterns_code-snippet.scss +1 -1
  17. package/scss/_patterns_contextual-menu.scss +1 -1
  18. package/scss/_patterns_cta.scss +7 -0
  19. package/scss/_patterns_equal-height-row.scss +87 -43
  20. package/scss/_patterns_icons.scss +340 -0
  21. package/scss/_patterns_image.scss +53 -16
  22. package/scss/_patterns_links.scss +6 -5
  23. package/scss/_patterns_list-tree.scss +49 -43
  24. package/scss/_patterns_lists.scss +58 -17
  25. package/scss/_patterns_matrix.scss +2 -2
  26. package/scss/_patterns_navigation.scss +4 -4
  27. package/scss/_patterns_pull-quotes.scss +1 -1
  28. package/scss/_patterns_rule.scss +6 -2
  29. package/scss/_patterns_search-and-filter.scss +11 -12
  30. package/scss/_patterns_separator.scss +1 -0
  31. package/scss/_patterns_side-navigation.scss +1 -1
  32. package/scss/_patterns_status-label.scss +5 -0
  33. package/scss/_patterns_strip.scss +3 -2
  34. package/scss/_patterns_switch.scss +2 -1
  35. package/scss/_patterns_table-mobile-card.scss +1 -1
  36. package/scss/_patterns_tooltips.scss +26 -8
  37. package/scss/_settings_breakpoints.scss +16 -0
  38. package/scss/_settings_colors.scss +20 -15
  39. package/scss/_settings_placeholders.scss +4 -3
  40. package/scss/_utilities_baseline-grid.scss +3 -2
  41. package/scss/_utilities_content-align.scss +9 -0
  42. package/scss/_utilities_floats.scss +6 -6
  43. package/scss/_utilities_font-metrics.scss +4 -3
  44. package/scss/_utilities_hide.scss +9 -9
  45. package/scss/_utilities_show.scss +3 -3
  46. package/templates/_macros/vf_hero.jinja +186 -0
  47. package/templates/_macros/vf_tiered-list.jinja +115 -0
@@ -3,24 +3,24 @@ $list-status-icon-height: $default-icon-size;
3
3
  $list-step-bullet-margin: $sph--x-large;
4
4
 
5
5
  @mixin vf-p-list-placeholders {
6
- // container for stepped lists (`ol`)
7
- // defines the layout and resets the native browser counter
6
+ // Container for .p-stepped-list and .p-stepped-list--detailed ordered lists;
7
+ // Defines the layout and resets a custom counter
8
8
  %numbered-step-container {
9
- counter-reset: list-item;
9
+ counter-reset: p-stepped-list-counter;
10
10
  display: flex;
11
11
  flex-direction: column;
12
12
  list-style: none;
13
13
  padding-left: 0;
14
14
  }
15
15
 
16
- // list item for stepped lists (`li`)
17
- // increments the default browser counter
16
+ // List item for .p-stepped-list and .p-stepped-list--detailed ordered lists;
17
+ // Increments the custom counter
18
18
  %numbered-step-item {
19
- counter-increment: list-item;
19
+ counter-increment: p-stepped-list-counter;
20
20
  }
21
21
 
22
- // title for stepped lists
23
- // displays the title and step counter
22
+ // Title for .p-stepped-list and .p-stepped-list--detailed ordered lists;
23
+ // Displays the title and step counter
24
24
  %numbered-step-title {
25
25
  list-style: none;
26
26
  margin-left: 0;
@@ -28,7 +28,7 @@ $list-step-bullet-margin: $sph--x-large;
28
28
  position: relative;
29
29
 
30
30
  &::before {
31
- content: counter(list-item) '.';
31
+ content: counter(p-stepped-list-counter) '.';
32
32
  display: block;
33
33
  height: map-get($line-heights, default-text);
34
34
  left: 0;
@@ -39,16 +39,30 @@ $list-step-bullet-margin: $sph--x-large;
39
39
  }
40
40
  }
41
41
 
42
- // used with .p-list--nested-counter
42
+ // Styles for .p-list--nested-counter
43
43
  %nested-counter {
44
44
  // Counter is named and it will be reset for each "ol" element.
45
- counter-reset: list-item;
45
+ counter-reset: p-list-nested-counter-top;
46
+
47
+ li {
48
+ counter-increment: p-list-nested-counter-top;
49
+ }
50
+
46
51
  li::marker {
47
- // "counters" function returns a string representing the current value of the named counter ("list-item").
48
- // It is used to insert a string between different levels of nested counters.
49
- // Source: https://www.w3schools.com/css/css_counters.asp
50
- content: counters(list-item, '.') '. ';
51
- counter-increment: list-item;
52
+ content: counter(p-list-nested-counter-top) '. ';
53
+ }
54
+
55
+ // Counter is named and it will be reset for each nested "ol" element.
56
+ li ol {
57
+ counter-reset: p-list-nested-counter-nested;
58
+ }
59
+
60
+ li ol li {
61
+ counter-increment: p-list-nested-counter-nested;
62
+ }
63
+
64
+ li ol li::marker {
65
+ content: counter(p-list-nested-counter-top) '.' counter(p-list-nested-counter-nested) '. ';
52
66
  }
53
67
  }
54
68
 
@@ -80,7 +94,10 @@ $list-step-bullet-margin: $sph--x-large;
80
94
  top: $spv--small;
81
95
  }
82
96
 
97
+ // Styles for .p-list--divided ordered lists
83
98
  %vf-list-item-ordered {
99
+ counter-increment: p-list-divided-counter;
100
+
84
101
  &::marker {
85
102
  content: none;
86
103
  display: none;
@@ -88,9 +105,32 @@ $list-step-bullet-margin: $sph--x-large;
88
105
 
89
106
  &::before {
90
107
  color: $colors--theme--text-default;
91
- content: counters(list-item, '.') '. ';
108
+ // If .p-list--divided ordered list is not within stepped list, display
109
+ // counter as unique whole number
110
+ content: counter(p-list-divided-counter) '.';
92
111
  display: inline-block;
93
112
  text-align: right;
113
+
114
+ // If .p-list--divided ordered list is within a stepped list, display
115
+ // counter as decimal nested under parent number
116
+ .p-stepped-list &,
117
+ .p-stepped-list--detailed & {
118
+ content: counter(p-stepped-list-counter) '.' counter(p-list-divided-counter) '.';
119
+ }
120
+ }
121
+
122
+ // If .p-list--divided is within another .p-list--divided, display counter
123
+ // as decimal nested under parent number
124
+ ol.p-list--divided {
125
+ counter-reset: p-list-divided-nested-counter;
126
+
127
+ .p-list__item {
128
+ counter-increment: p-list-divided-nested-counter;
129
+
130
+ &::before {
131
+ content: counter(p-list-divided-counter) '.' counter(p-list-divided-nested-counter) '.';
132
+ }
133
+ }
94
134
  }
95
135
  }
96
136
 
@@ -187,6 +227,7 @@ $list-step-bullet-margin: $sph--x-large;
187
227
 
188
228
  // stylelint-disable selector-max-type -- we want to target ordered lists
189
229
  ol.p-list--divided {
230
+ counter-reset: p-list-divided-counter;
190
231
  list-style: none;
191
232
 
192
233
  .p-list__item {
@@ -31,7 +31,7 @@
31
31
  width: 33.333%;
32
32
  }
33
33
 
34
- @media (min-width: $threshold-4-6-col) and (max-width: $threshold-6-12-col - 1) {
34
+ @media ($threshold-4-6-col <= width < $threshold-6-12-col) {
35
35
  flex-direction: column;
36
36
 
37
37
  &:nth-child(2),
@@ -142,7 +142,7 @@
142
142
  .p-matrix__desc {
143
143
  margin-bottom: $spv-nudge-compensation;
144
144
 
145
- @media (max-width: $breakpoint-heading-threshold - 1) {
145
+ @media (width < $breakpoint-heading-threshold) {
146
146
  margin-top: -#{$sp-unit};
147
147
  }
148
148
 
@@ -85,7 +85,7 @@ $navigation-height: calc(map-get($line-heights, default-text) + 2 * $spv--large)
85
85
  @extend %navigation-link-text;
86
86
  @extend %vf-navigation-separator;
87
87
  @include vf-transition($properties, snap);
88
- @include vf-focus;
88
+ @include vf-focus-themed;
89
89
 
90
90
  // override button styles
91
91
  background-color: transparent;
@@ -327,7 +327,7 @@ $navigation-height: calc(map-get($line-heights, default-text) + 2 * $spv--large)
327
327
  margin: 0 $sph--large 0 0;
328
328
 
329
329
  .p-navigation__item {
330
- @include vf-focus;
330
+ @include vf-focus-themed;
331
331
 
332
332
  display: flex;
333
333
  }
@@ -478,7 +478,7 @@ $navigation-height: calc(map-get($line-heights, default-text) + 2 * $spv--large)
478
478
  @extend %navigation-link-responsive-padding-horizontal;
479
479
  @extend %navigation-link-responsive-padding-vertical;
480
480
  @extend %navigation-link-text;
481
- @include vf-focus;
481
+ @include vf-focus-themed;
482
482
 
483
483
  margin: 0 0 auto 0;
484
484
  }
@@ -688,7 +688,7 @@ $navigation-height: calc(map-get($line-heights, default-text) + 2 * $spv--large)
688
688
  top: $spv--large * 2 + map-get($line-heights, default-text);
689
689
  }
690
690
 
691
- @media (max-width: ($breakpoint-navigation-threshold - 1)) {
691
+ @media (width < $breakpoint-navigation-threshold) {
692
692
  box-shadow: none;
693
693
  }
694
694
  }
@@ -109,7 +109,7 @@
109
109
  .p-pull-quote--large {
110
110
  .p-pull-quote__quote {
111
111
  &:first-of-type::before {
112
- @media (max-width: $breakpoint-heading-threshold - 1) {
112
+ @media (width < $breakpoint-heading-threshold) {
113
113
  top: 0.75rem;
114
114
  }
115
115
  }
@@ -4,7 +4,11 @@
4
4
  .p-rule,
5
5
  .p-rule--muted,
6
6
  .p-rule--highlight {
7
- @extend %u-no-margin--bottom--hr;
7
+ @extend %hr;
8
+
9
+ &.is-fixed-width {
10
+ @extend %fixed-width-hr;
11
+ }
8
12
  }
9
13
 
10
14
  .p-rule--muted {
@@ -15,7 +19,7 @@
15
19
  @include vf-highlight-bar($colors--theme--text-default);
16
20
 
17
21
  &.is-accent {
18
- @include vf-highlight-bar($color-accent);
22
+ @include vf-highlight-bar($colors--theme--accent);
19
23
  }
20
24
  }
21
25
  }
@@ -22,12 +22,12 @@
22
22
  $input-height: calc(map-get($line-heights, default-text) + $input-vertical-padding + $spv-nudge - $input-border-thickness);
23
23
 
24
24
  .p-search-and-filter {
25
- border-bottom: $input-border-thickness solid $colors--light-theme--border-high-contrast;
25
+ border-bottom: $input-border-thickness solid $colors--theme--border-high-contrast;
26
26
  position: relative;
27
27
 
28
28
  .p-search-and-filter__search-container {
29
29
  align-items: center;
30
- background-color: $colors--light-theme--background-inputs;
30
+ background-color: $colors--theme--background-inputs;
31
31
  display: flex;
32
32
  flex-wrap: wrap;
33
33
  height: auto;
@@ -52,11 +52,11 @@
52
52
  }
53
53
 
54
54
  .p-search-and-filter__selected-count {
55
- color: $color-information;
55
+ color: $colors--theme--link-default;
56
56
  cursor: pointer;
57
57
  position: absolute;
58
58
  right: 0.5rem;
59
- top: $focus-outline-offset;
59
+ top: 0.3rem;
60
60
  }
61
61
 
62
62
  &[aria-expanded='true'] {
@@ -72,7 +72,7 @@
72
72
  .p-search-and-filter__panel {
73
73
  @include vf-transition(opacity, fast);
74
74
 
75
- background-color: $color-x-light;
75
+ background-color: $colors--theme--background-inputs;
76
76
  box-shadow: $box-shadow;
77
77
  opacity: 1;
78
78
  padding: $input-vertical-padding $sph--large 0;
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  .p-search-and-filter__search-prompt {
90
- background: $color-light;
90
+ background: $colors--theme--background-inputs;
91
91
  cursor: pointer;
92
92
  margin-left: -1rem;
93
93
  margin-right: -1rem;
@@ -99,7 +99,7 @@
99
99
 
100
100
  .p-search-and-filter__clear {
101
101
  @extend %vf-button-has-icon;
102
- background-color: $colors--light-theme--background-inputs;
102
+ background-color: $colors--theme--background-inputs;
103
103
 
104
104
  border: none;
105
105
  bottom: $focus-outline-offset;
@@ -145,7 +145,7 @@
145
145
 
146
146
  @mixin vf-filter-panel-section {
147
147
  .p-filter-panel-section {
148
- border-bottom: 1px solid $color-mid-x-light;
148
+ border-bottom: 1px solid $colors--theme--border-low-contrast;
149
149
  margin: 0;
150
150
  padding-bottom: $spv--large;
151
151
 
@@ -168,9 +168,8 @@
168
168
  }
169
169
 
170
170
  .p-filter-panel-section__heading {
171
- color: $color-mid-dark;
172
- font-size: 1rem;
173
- margin-bottom: 0;
171
+ @extend %vf-heading-5;
172
+ color: $colors--theme--text-muted;
174
173
  }
175
174
 
176
175
  .p-filter-panel-section__chips {
@@ -185,7 +184,7 @@
185
184
 
186
185
  .p-filter-panel-section__counter {
187
186
  bottom: 0;
188
- color: $color-information;
187
+ color: $colors--theme--link-default;
189
188
  cursor: pointer;
190
189
  position: absolute;
191
190
  right: 0.25rem;
@@ -1,3 +1,4 @@
1
+ // DEPRECATED: use rule component for the separator and strips or sections for spacing
1
2
  @mixin vf-p-separator {
2
3
  .p-separator {
3
4
  // spacing based on %section-padding--default, but using margins on <hr>
@@ -354,7 +354,7 @@
354
354
  }
355
355
 
356
356
  %side-navigation__link {
357
- @include vf-focus;
357
+ @include vf-focus-themed;
358
358
 
359
359
  &,
360
360
  &:visited {
@@ -1,5 +1,10 @@
1
1
  @import 'settings';
2
2
 
3
+ /**
4
+ TODO this component uses hard-coded colors that don't respond to theming, which is not ideal.
5
+ However, it looks fine on all themes, and re-working it to support theming is a larger undertaking.
6
+ So, it is being left as-is until it can be revisited as part of the tokens effort in the future.
7
+ */
3
8
  // Default status label styling
4
9
  @mixin vf-p-status-label {
5
10
  %vf-status-label {
@@ -1,3 +1,4 @@
1
+ @use 'sass:color';
1
2
  @import 'settings';
2
3
 
3
4
  @mixin vf-p-strip {
@@ -118,9 +119,9 @@
118
119
 
119
120
  // DEPRECATED:
120
121
  // gradient of the main suru slant
121
- $color-suru-start: lighten($color-brand, 10%) !default;
122
+ $color-suru-start: color.adjust($color-brand, $lightness: 10%) !default;
122
123
  $color-suru-middle: $color-brand !default;
123
- $color-suru-end: darken($color-brand, 10%) !default;
124
+ $color-suru-end: color.adjust($color-brand, $lightness: -10%) !default;
124
125
 
125
126
  // page background
126
127
  $color-suru-background: $color-x-light !default;
@@ -1,3 +1,4 @@
1
+ @use 'sass:color';
1
2
  @import 'settings';
2
3
  $knob-size: $sp-unit * 2;
3
4
 
@@ -37,7 +38,7 @@ $knob-size: $sp-unit * 2;
37
38
  .p-switch__slider {
38
39
  background: $colors--theme--background-neutral-default;
39
40
  border-radius: $knob-size;
40
- box-shadow: inset 0 2px 5px 0 transparentize($color-x-dark, 0.8);
41
+ box-shadow: inset 0 2px 5px 0 color.scale($color-x-dark, $alpha: -80%);
41
42
  display: inline-block;
42
43
  height: $knob-size;
43
44
  margin: 0;
@@ -10,7 +10,7 @@
10
10
  text-align: left;
11
11
  }
12
12
 
13
- @media (max-width: $threshold-6-12-col - 1) {
13
+ @media (width < $threshold-6-12-col) {
14
14
  @supports (display: grid) {
15
15
  thead {
16
16
  display: none;
@@ -34,9 +34,9 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
34
34
  .p-tooltip__message {
35
35
  @extend %small-text;
36
36
 
37
- background-color: $color-dark;
37
+ background-color: $colors--theme--background-alt;
38
38
  border: 0;
39
- color: $color-x-light;
39
+ color: $colors--theme--text-default;
40
40
  display: none;
41
41
  left: -2 * $triangle-height;
42
42
  margin-bottom: 0;
@@ -50,6 +50,24 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
50
50
  white-space: pre;
51
51
  z-index: 11; // one step above p-navigation's z-index
52
52
 
53
+ @include vf-theme-dark; // Default to dark theme
54
+
55
+ // stylelint-disable selector-max-type -- Tooltip theming is based on theming of the document body.
56
+ // Apply light theme if the page or the tooltip component is dark
57
+ body.is-dark &,
58
+ .p-tooltip.is-dark & {
59
+ @include vf-theme-light;
60
+ }
61
+
62
+ // Override to dark theme if the page or the tooltip component is light or paper
63
+ body.is-light &,
64
+ body.is-paper &,
65
+ .p-tooltip.is-light &,
66
+ .p-tooltip.is-paper & {
67
+ @include vf-theme-dark;
68
+ }
69
+ // stylelint-enable selector-max-type
70
+
53
71
  .is-detached & {
54
72
  display: block;
55
73
  }
@@ -57,7 +75,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
57
75
  // tooltip
58
76
  &::before {
59
77
  border: {
60
- bottom: $triangle-height solid $color-dark;
78
+ bottom: $triangle-height solid $colors--theme--background-alt;
61
79
  left: $triangle-height solid transparent;
62
80
  right: $triangle-height solid transparent;
63
81
  }
@@ -152,7 +170,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
152
170
  bottom: $triangle-height solid transparent;
153
171
  left: $triangle-height solid transparent;
154
172
  right: $triangle-height solid transparent;
155
- top: $triangle-height solid $color-dark;
173
+ top: $triangle-height solid $colors--theme--background-alt;
156
174
  }
157
175
 
158
176
  bottom: -2 * $triangle-height;
@@ -186,7 +204,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
186
204
  bottom: $triangle-height solid transparent;
187
205
  left: $triangle-height solid transparent;
188
206
  right: $triangle-height solid transparent;
189
- top: $triangle-height solid $color-dark;
207
+ top: $triangle-height solid $colors--theme--background-alt;
190
208
  }
191
209
 
192
210
  bottom: -2 * $triangle-height;
@@ -223,7 +241,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
223
241
  bottom: $triangle-height solid transparent;
224
242
  left: $triangle-height solid transparent;
225
243
  right: $triangle-height solid transparent;
226
- top: $triangle-height solid $color-dark;
244
+ top: $triangle-height solid $colors--theme--background-alt;
227
245
  }
228
246
 
229
247
  bottom: -2 * $triangle-height;
@@ -257,7 +275,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
257
275
  border: {
258
276
  bottom: $triangle-height solid transparent;
259
277
  left: $triangle-height solid transparent;
260
- right: $triangle-height solid $color-dark;
278
+ right: $triangle-height solid $colors--theme--background-alt;
261
279
  top: $triangle-height solid transparent;
262
280
  }
263
281
 
@@ -296,7 +314,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
296
314
  &::before {
297
315
  border: {
298
316
  bottom: $triangle-height solid transparent;
299
- left: $triangle-height solid $color-dark;
317
+ left: $triangle-height solid $colors--theme--background-alt;
300
318
  right: $triangle-height solid transparent;
301
319
  top: $triangle-height solid transparent;
302
320
  }
@@ -5,3 +5,19 @@ $breakpoint-large: 1036px !default;
5
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
8
+
9
+ // Mapping of breakpoint names to the min and max widths at which they apply.
10
+ $breakpoint-bounds: (
11
+ small: (
12
+ min: null,
13
+ max: $breakpoint-small,
14
+ ),
15
+ medium: (
16
+ min: $breakpoint-small,
17
+ max: $breakpoint-large,
18
+ ),
19
+ large: (
20
+ min: $breakpoint-large,
21
+ max: null,
22
+ ),
23
+ );
@@ -1,3 +1,5 @@
1
+ @use 'sass:color';
2
+
1
3
  // Global color settings
2
4
  $color-transparent: transparent !default;
3
5
 
@@ -41,7 +43,6 @@ $color-focus-dark: #9cf !default;
41
43
  // Focus modifications to meet AA 3:1 contrast ratio against
42
44
  // button background for positive buttons
43
45
  $color-focus-positive: #003008 !default;
44
- $color-focus-positive-dark: #9cf !default;
45
46
 
46
47
  // Button background color changes
47
48
  $input-background-opacity-amount: 0.04;
@@ -93,7 +94,6 @@ $states: (
93
94
  // --link-default - default link color
94
95
  // --link-visited - visited link color
95
96
  // --focus - focus highlight/outline color
96
- // --positive-focus - focus highlight/outline color for positive buttons
97
97
  //
98
98
  // Background colors:
99
99
  // --background - default background color
@@ -106,6 +106,9 @@ $states: (
106
106
  // --border-default - default border color
107
107
  // --border-high-contrast - high contrast version of border color, to be used when border needs more visibility (form inputs, etc)
108
108
  // --border-low-contrast - low contrast version of border color, to be used when border needs more visibility (separators)
109
+ //
110
+ // Highlight colors:
111
+ // --accent - default accent color
109
112
 
110
113
  // Light theme
111
114
  $colors--light-theme--text-default: #000 !default;
@@ -115,7 +118,6 @@ $colors--light-theme--text-inactive: rgba($color-x-dark, $inactive-text-opacity-
115
118
  $colors--light-theme--link-default: $color-link !default;
116
119
  $colors--light-theme--link-visited: $color-link-visited !default;
117
120
  $colors--light-theme--focus: $color-focus !default;
118
- $colors--light-theme--positive-focus: $color-focus-positive !default;
119
121
 
120
122
  $colors--light-theme--background-default: #fff !default;
121
123
  $colors--light-theme--background-alt: #f7f7f7 !default;
@@ -123,7 +125,7 @@ $colors--light-theme--background-code: $color-code-background !default;
123
125
  $colors--light-theme--background-inputs: adjust-color($color-x-dark, $lightness: 100% * (1 - $input-background-opacity-amount)) !default;
124
126
  $colors--light-theme--background-active: adjust-color($color-x-dark, $lightness: 100% * (1 - $active-background-opacity-amount)) !default;
125
127
  $colors--light-theme--background-hover: adjust-color($color-x-dark, $lightness: 100% * (1 - $hover-background-opacity-amount)) !default;
126
- $colors--light-theme--background-overlay: transparentize($color-dark, 0.15) !default;
128
+ $colors--light-theme--background-overlay: color.scale($color-dark, $alpha: -15%) !default;
127
129
 
128
130
  $colors--light-theme--border-default: rgba($color-x-dark, 0.2) !default;
129
131
  $colors--light-theme--border-high-contrast: rgba($color-x-dark, 0.56) !default;
@@ -176,15 +178,14 @@ $colors--dark-theme--text-inactive: rgba($colors--dark-theme--text-default, $ina
176
178
  $colors--dark-theme--link-default: $color-link-dark !default;
177
179
  $colors--dark-theme--link-visited: $color-link-visited-dark !default;
178
180
  $colors--dark-theme--focus: $color-focus-dark !default;
179
- $colors--dark-theme--positive-focus: $color-focus-positive-dark !default;
180
181
 
181
182
  $colors--dark-theme--background-default: #262626 !default;
182
183
  $colors--dark-theme--background-alt: #202020 !default;
183
184
  $colors--dark-theme--background-code: $color-code-background-dark !default;
184
- $colors--dark-theme--background-inputs: rgba($colors--dark-theme--text-default, $input-background-opacity-amount) !default;
185
- $colors--dark-theme--background-active: rgba($colors--dark-theme--text-default, $active-background-opacity-amount) !default;
186
- $colors--dark-theme--background-hover: rgba($colors--dark-theme--text-default, $hover-background-opacity-amount) !default;
187
- $colors--dark-theme--background-overlay: transparentize($color-dark, 0.15) !default;
185
+ $colors--dark-theme--background-inputs: #2f2f2f !default;
186
+ $colors--dark-theme--background-active: #373737 !default;
187
+ $colors--dark-theme--background-hover: #313131 !default;
188
+ $colors--dark-theme--background-overlay: color.scale($color-dark, $alpha: -15%) !default;
188
189
 
189
190
  $colors--dark-theme--border-default: rgba($colors--dark-theme--text-default, 0.2) !default;
190
191
  $colors--dark-theme--border-high-contrast: rgba($colors--dark-theme--text-default, 0.5) !default;
@@ -229,9 +230,9 @@ $colors-dark-theme--tinted-borders: (
229
230
  );
230
231
 
231
232
  // Paper theme (work in progress)
232
- $colors--paper-theme--background-inputs: rgba($color-x-dark, $input-background-opacity-amount) !default;
233
- $colors--paper-theme--background-active: rgba($color-x-dark, $active-background-opacity-amount) !default;
234
- $colors--paper-theme--background-hover: rgba($color-x-dark, $hover-background-opacity-amount) !default;
233
+ $colors--paper-theme--background-inputs: #eaeaea !default;
234
+ $colors--paper-theme--background-active: #e0e0e0 !default;
235
+ $colors--paper-theme--background-hover: #e7e7e7 !default;
235
236
 
236
237
  // Current theme (based on CSS variables)
237
238
  // This is a mapping between SCSS variable and it's CSS property equivalent.
@@ -244,7 +245,6 @@ $colors--theme--text-inactive: var(--vf-color-text-inactive);
244
245
  $colors--theme--link-default: var(--vf-color-link-default);
245
246
  $colors--theme--link-visited: var(--vf-color-link-visited);
246
247
  $colors--theme--focus: var(--vf-color-focus);
247
- $colors--theme--positive-focus: var(--vf-color-positive-focus);
248
248
 
249
249
  $colors--theme--background-default: var(--vf-color-background-default);
250
250
  $colors--theme--background-alt: var(--vf-color-background-alt);
@@ -290,6 +290,8 @@ $colors--theme--button-negative-hover: var(--vf-color-button-negative-hover);
290
290
  $colors--theme--button-negative-active: var(--vf-color-button-negative-active);
291
291
  $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
292
292
 
293
+ $colors--theme--accent: var(--vf-color-accent);
294
+
293
295
  // Theme colors exposed as CSS custom properties
294
296
  @mixin vf-theme-light--colors {
295
297
  // SCSS variables need to be interpolated to work in CSS custom properties
@@ -300,7 +302,6 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
300
302
  --vf-color-link-default: #{$colors--light-theme--link-default};
301
303
  --vf-color-link-visited: #{$colors--light-theme--link-visited};
302
304
  --vf-color-focus: #{$colors--light-theme--focus};
303
- --vf-color-positive-focus: #{$colors--light-theme--positive-focus};
304
305
 
305
306
  --vf-color-background-default: #{$colors--light-theme--background-default};
306
307
  --vf-color-background-alt: #{$colors--light-theme--background-alt};
@@ -345,6 +346,8 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
345
346
  --vf-color-button-negative-hover: #{adjust-color($color-negative, $lightness: -$hover-background-opacity-percentage)};
346
347
  --vf-color-button-negative-active: #{adjust-color($color-negative, $lightness: -$active-background-opacity-percentage)};
347
348
  --vf-color-button-negative-text: #{vf-contrast-text-color($color-negative)};
349
+
350
+ --vf-color-accent: #{$color-accent};
348
351
  }
349
352
 
350
353
  @mixin vf-theme-dark--colors {
@@ -356,7 +359,6 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
356
359
  --vf-color-link-default: #{$colors--dark-theme--link-default};
357
360
  --vf-color-link-visited: #{$colors--dark-theme--link-visited};
358
361
  --vf-color-focus: #{$colors--dark-theme--focus};
359
- --vf-color-positive-focus: #{$colors--dark-theme--positive-focus};
360
362
 
361
363
  --vf-color-background-default: #{$colors--dark-theme--background-default};
362
364
  --vf-color-background-alt: #{$colors--dark-theme--background-alt};
@@ -401,6 +403,8 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
401
403
  --vf-color-button-negative-hover: #{adjust-color($color-negative-dark, $lightness: -$hover-background-opacity-percentage)};
402
404
  --vf-color-button-negative-active: #{adjust-color($color-negative-dark, $lightness: -$active-background-opacity-percentage)};
403
405
  --vf-color-button-negative-text: #{vf-contrast-text-color($color-negative-dark)};
406
+
407
+ --vf-color-accent: #{$color-accent-dark};
404
408
  }
405
409
 
406
410
  @mixin vf-theme-paper--colors {
@@ -421,4 +425,5 @@ $color-ubuntu: #e95420; // Ubuntu orange, should not be overridden
421
425
  $color-brand: $color-ubuntu !default;
422
426
  $color-brand-dark: $color-brand !default;
423
427
  $color-accent: #0f95a1 !default;
428
+ $color-accent-dark: #70bbc2 !default;
424
429
  $color-accent-background: $colors--dark-theme--background-default !default; // changed from "brand" colour to dark theme background
@@ -1,3 +1,4 @@
1
+ @use 'sass:color';
1
2
  @import 'settings_spacing';
2
3
  @import 'settings_colors';
3
4
 
@@ -7,7 +8,7 @@ $bar-thickness: 0.1875rem !default; // 3px at 16px fontsize, expressed in rems s
7
8
  $border-radius: 0; // deprecated, will be removed in future version of Vanilla
8
9
  $border: $input-border-thickness solid $colors--theme--border-default !default;
9
10
  $box-shadow:
10
- 0 1px 1px 0 transparentize($color-x-dark, 0.85),
11
- 0 2px 2px -1px transparentize($color-x-dark, 0.85),
12
- 0 0 3px 0 transparentize($color-x-dark, 0.8) !default;
11
+ 0 1px 1px 0 color.scale($color-x-dark, $alpha: -85%),
12
+ 0 2px 2px -1px color.scale($color-x-dark, $alpha: -85%),
13
+ 0 0 3px 0 color.scale($color-x-dark, $alpha: -80%) !default;
13
14
  $box-shadow--deep: 0 0 2rem 0 rgba($color-x-dark, $shadow-opacity) !default;
@@ -1,3 +1,4 @@
1
+ @use 'sass:color';
1
2
  @import 'settings';
2
3
 
3
4
  @mixin vf-u-baseline-grid {
@@ -9,7 +10,7 @@
9
10
  position: relative;
10
11
 
11
12
  &::after {
12
- background: linear-gradient(to top, transparentize($baseline-color, 0.85), transparentize($baseline-color, 0.85) 1px, transparent 1px, transparent);
13
+ background: linear-gradient(to top, color.scale($baseline-color, $alpha: -85%), color.scale($baseline-color, $alpha: -85%) 1px, transparent 1px, transparent);
13
14
  background-size: 100% $baseline-size;
14
15
  bottom: 0;
15
16
  content: '';
@@ -26,7 +27,7 @@
26
27
  // baseline grid on document should be in the background
27
28
  // stylelint-disable selector-max-type -- needed for examples
28
29
  html.u-baseline-grid {
29
- background-color: transparentize($baseline-color, 0.95);
30
+ background-color: color.scale($baseline-color, $alpha: -95%);
30
31
  position: static;
31
32
 
32
33
  &::after {