@ons/design-system 57.0.1 → 58.0.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.
Files changed (76) hide show
  1. package/components/autosuggest/_autosuggest.scss +16 -16
  2. package/components/breadcrumbs/_breadcrumbs.scss +2 -2
  3. package/components/browser-banner/_browser-banner.scss +5 -5
  4. package/components/button/_button.scss +62 -62
  5. package/components/call-to-action/_call-to-action.scss +1 -1
  6. package/components/checkboxes/_checkbox.scss +16 -16
  7. package/components/collapsible/_collapsible.scss +8 -8
  8. package/components/content-pagination/_content-pagination.scss +1 -1
  9. package/components/cookies-banner/_cookies-banner.scss +3 -3
  10. package/components/document-list/document-list.scss +10 -10
  11. package/components/download-resources/_download-resources.scss +5 -5
  12. package/components/external-link/_external-link.scss +4 -4
  13. package/components/feedback/_feedback.scss +3 -3
  14. package/components/field/_field.scss +1 -1
  15. package/components/find-a-support-centre/_find-a-support-centre.scss +1 -1
  16. package/components/footer/_footer.scss +7 -7
  17. package/components/header/_header.scss +26 -26
  18. package/components/hero/_hero.scss +4 -4
  19. package/components/input/_input-type.scss +5 -5
  20. package/components/input/_input.scss +13 -13
  21. package/components/label/_label.scss +1 -1
  22. package/components/lists/_list.scss +1 -1
  23. package/components/message/_message.scss +3 -3
  24. package/components/message-list/_message-list.scss +1 -1
  25. package/components/modal/_modal.scss +1 -1
  26. package/components/navigation/_macro.njk +1 -1
  27. package/components/navigation/_macro.spec.js +20 -2
  28. package/components/navigation/_navigation.scss +14 -14
  29. package/components/pagination/_pagination.scss +2 -2
  30. package/components/panel/_panel.scss +22 -22
  31. package/components/phase-banner/_phase-banner.scss +3 -3
  32. package/components/promotional-banner/_promo-banner.scss +5 -5
  33. package/components/question/_question.scss +4 -4
  34. package/components/quote/_quote.scss +2 -2
  35. package/components/radios/_radio.scss +6 -4
  36. package/components/related-content/_related-content.scss +2 -2
  37. package/components/relationships/_relationships.scss +2 -2
  38. package/components/section-navigation/_macro.njk +1 -1
  39. package/components/section-navigation/_section-navigation.scss +8 -8
  40. package/components/skip-to-content/_skip.scss +3 -3
  41. package/components/status/_status.scss +5 -5
  42. package/components/summary/_summary.scss +6 -6
  43. package/components/table/_table.scss +18 -18
  44. package/components/table-of-contents/_toc.scss +3 -3
  45. package/components/table-of-contents/toc.dom.js +2 -4
  46. package/components/tabs/_macro.njk +18 -5
  47. package/components/tabs/_macro.spec.js +54 -0
  48. package/components/tabs/_tabs.scss +57 -25
  49. package/components/tabs/tabs.js +35 -12
  50. package/components/tabs/tabs.spec.js +104 -10
  51. package/components/text-indent/_text-indent.scss +1 -1
  52. package/components/timeline/_timeline.scss +2 -2
  53. package/components/upload/_upload.scss +6 -6
  54. package/css/census.css +3 -3
  55. package/css/ids.css +3 -3
  56. package/css/main.css +3 -3
  57. package/css/print.css +1 -1
  58. package/package.json +1 -1
  59. package/scripts/main.es5.js +1 -1
  60. package/scripts/main.js +2 -2
  61. package/scss/base/_global.scss +7 -7
  62. package/scss/base/_typography.scss +2 -2
  63. package/scss/census.scss +1 -1
  64. package/scss/helpers/_functions.scss +0 -8
  65. package/scss/ids.scss +1 -1
  66. package/scss/overrides/hcm.scss +1 -1
  67. package/scss/overrides/rtl.scss +1 -1
  68. package/scss/patternlib.scss +10 -9
  69. package/scss/print.scss +7 -5
  70. package/scss/settings/_census.scss +24 -19
  71. package/scss/settings/_ids.scss +12 -8
  72. package/scss/utilities/_border.scss +1 -1
  73. package/scss/utilities/_colors.scss +1 -10
  74. package/scss/utilities/_grid.scss +3 -3
  75. package/scss/utilities/_typography.scss +1 -1
  76. package/scss/vars/_colors.scss +112 -99
@@ -4,7 +4,7 @@
4
4
  margin-bottom: 0;
5
5
 
6
6
  &__item {
7
- border-bottom: 1px solid $color-borders-list;
7
+ border-bottom: 1px solid var(--ons-color-borders-list);
8
8
  margin: 0 0 1.5rem;
9
9
  padding: 0 0 1.5rem;
10
10
 
@@ -47,7 +47,7 @@
47
47
 
48
48
  &__item-image--file & {
49
49
  &__image-link {
50
- border-color: $color-borders-document-image;
50
+ border-color: var(--ons-color-borders-document-image);
51
51
 
52
52
  &--placeholder {
53
53
  height: 136px;
@@ -62,16 +62,16 @@
62
62
  width: 100%;
63
63
 
64
64
  &:focus {
65
- background-color: $color-placeholder !important;
66
- border: 2px solid $color-borders-document-image-focus;
65
+ background-color: var(--ons-color-placeholder) !important;
66
+ border: 2px solid var(--ons-color-borders-document-image-focus);
67
67
  box-shadow: none;
68
- outline: 4px solid $color-focus !important;
68
+ outline: 4px solid var(--ons-color-focus) !important;
69
69
  outline-offset: 0;
70
70
  }
71
71
 
72
72
  &--placeholder {
73
73
  background-clip: padding-box;
74
- background-color: $color-borders-document-image;
74
+ background-color: var(--ons-color-borders-document-image);
75
75
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3e%3cpath fill='%23fff' d='M0 19.39c.49-1 1-2 1.55-2.93A31.59 31.59 0 0 1 0 11.72v7.67ZM3 0S0 0 0 3.7v2a34.85 34.85 0 0 0 2.17 9.76A31.2 31.2 0 0 1 8.3 8.3c4.84-4.16 11.36-7 20.21-8.29Zm28.84 2c-10.11 1-17 3.86-22 8.1a29.78 29.78 0 0 0-6.49 8C7.26 25.65 14.66 31.19 27 32h1.21A3.71 3.71 0 0 0 32 27.91V2a.41.41 0 0 1-.16 0Zm-26 21.49a25.94 25.94 0 0 1-3-4.4A48 48 0 0 0 0 25.71V32h20.23a26.41 26.41 0 0 1-14.39-8.49Z'/%3e%3c/svg%3e");
76
76
  background-position: center;
77
77
  background-repeat: no-repeat;
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  &__item-attribute {
90
- color: $color-text-metadata;
90
+ color: var(--ons-color-text-metadata);
91
91
  display: inline-block;
92
92
  margin: 0 1rem 0 0;
93
93
 
@@ -98,8 +98,8 @@
98
98
  color: inherit;
99
99
 
100
100
  &:hover {
101
- color: $color-text-metadata;
102
- text-decoration: underline solid $color-text-metadata 2px;
101
+ color: var(--ons-color-text-metadata);
102
+ text-decoration: underline solid var(--ons-color-text-metadata) 2px;
103
103
  }
104
104
  }
105
105
 
@@ -117,7 +117,7 @@
117
117
  .ons-document-list {
118
118
  &__item {
119
119
  &--featured {
120
- background-color: $color-banner-bg;
120
+ background-color: var(--ons-color-banner-bg);
121
121
  border-bottom: none;
122
122
  display: block;
123
123
  outline: 2px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
@@ -1,6 +1,6 @@
1
1
  .ons-adv-filter {
2
2
  &__gallery {
3
- border-top: 1px solid $color-borders-list;
3
+ border-top: 1px solid var(--ons-color-borders-list);
4
4
  margin-left: 0;
5
5
  padding-left: 0;
6
6
  padding-top: 1.5rem;
@@ -19,7 +19,7 @@
19
19
  }
20
20
 
21
21
  &__selection {
22
- color: $color-grey-100;
22
+ color: var(--ons-color-grey-100);
23
23
  margin-bottom: 0.5rem;
24
24
  }
25
25
 
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  &__panel--is-visible {
51
- background-color: $color-white;
51
+ background-color: var(--ons-color-white);
52
52
  bottom: 0;
53
53
  display: block;
54
54
  height: calc(100% - 76px); // Height of action buttons
@@ -62,9 +62,9 @@
62
62
  }
63
63
 
64
64
  &__actions {
65
- background-color: $color-white;
65
+ background-color: var(--ons-color-white);
66
66
  bottom: 0;
67
- box-shadow: 0 0 5px 0 rgba($color-black, 0.5), 0 -1px 0 0 rgba($color-grey-100, 0.5);
67
+ box-shadow: 0 0 5px 0 rgba(34, 34, 34, 0.5), 0 -1px 0 0 rgba(65, 64, 66, 0.5);
68
68
  display: flex;
69
69
  left: 0;
70
70
  padding: 1rem;
@@ -4,21 +4,21 @@
4
4
  white-space: nowrap;
5
5
  }
6
6
  .ons-svg-icon {
7
- fill: $color-grey-100;
7
+ fill: var(--ons-color-grey-100);
8
8
  margin: 0 0 0 0.25rem;
9
9
  padding-bottom: 0.1rem;
10
10
  visibility: visible;
11
11
  }
12
12
  &:focus {
13
13
  .ons-svg-icon {
14
- fill: $color-black;
14
+ fill: var(--ons-color-black);
15
15
  }
16
16
  }
17
17
  &:hover {
18
18
  .ons-svg-icon {
19
- fill: $color-text-link-hover;
19
+ fill: var(--ons-color-text-link-hover);
20
20
  .ons-footer & {
21
- fill: $color-black;
21
+ fill: var(--ons-color-black);
22
22
  }
23
23
  }
24
24
  }
@@ -1,5 +1,5 @@
1
1
  .ons-feedback {
2
- border: 3px solid $color-branded;
2
+ border: 3px solid var(--ons-color-branded);
3
3
  margin-bottom: 2rem;
4
4
  padding: 1rem;
5
5
  position: relative;
@@ -8,9 +8,9 @@
8
8
  }
9
9
  &::before {
10
10
  border-bottom: 15px solid transparent;
11
- border-left: 15px solid $color-branded;
11
+ border-left: 15px solid var(--ons-color-branded);
12
12
  border-right: 15px solid transparent;
13
- border-top: 15px solid $color-branded;
13
+ border-top: 15px solid var(--ons-color-branded);
14
14
  bottom: -30px;
15
15
  content: '';
16
16
  height: 0;
@@ -2,7 +2,7 @@
2
2
  position: relative;
3
3
 
4
4
  &__other {
5
- background-color: $color-grey-5;
5
+ background-color: var(--ons-color-grey-5);
6
6
  clear: both;
7
7
  display: none;
8
8
  padding: 0 0.5rem 0.5rem;
@@ -1,7 +1,7 @@
1
1
  .ons-distance {
2
2
  @extend .ons-u-fs-r;
3
3
 
4
- background-color: $color-tag-bg;
4
+ background-color: var(--ons-color-tag-bg);
5
5
  border: 1px solid transparent; // high contrast mode
6
6
  display: inline-block;
7
7
  padding: 0.3rem 0.5rem;
@@ -1,22 +1,22 @@
1
1
  .ons-footer {
2
2
  a {
3
- color: $color-text-banner-link;
3
+ color: var(--ons-color-text-banner-link);
4
4
  text-decoration: underline;
5
5
 
6
6
  &:hover {
7
- color: $color-text-banner-link-hover;
8
- text-decoration: underline solid $color-text-banner-link-hover 2px;
7
+ color: var(--ons-color-text-banner-link-hover);
8
+ text-decoration: underline solid var(--ons-color-text-banner-link-hover) 2px;
9
9
  }
10
10
  }
11
11
 
12
12
  &__button-container {
13
13
  background-clip: border-box;
14
- background-color: $color-header;
14
+ background-color: var(--ons-color-header);
15
15
  padding: 1rem;
16
16
  }
17
17
 
18
18
  &__warning {
19
- background-color: $color-banner-bg-dark;
19
+ background-color: var(--ons-color-banner-bg-dark);
20
20
  outline: 2px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
21
21
  }
22
22
 
@@ -32,11 +32,11 @@
32
32
 
33
33
  .ons-svg-logo,
34
34
  .ons-svg-logo__group {
35
- fill: $color-black !important;
35
+ fill: var(--ons-color-black) !important;
36
36
  }
37
37
 
38
38
  &__body {
39
- background-color: $color-banner-bg;
39
+ background-color: var(--ons-color-banner-bg);
40
40
  padding: 2rem 0 4rem;
41
41
 
42
42
  .ons-list__link {
@@ -8,7 +8,7 @@
8
8
 
9
9
  // Elements
10
10
  &__top {
11
- background: $color-header-masthead;
11
+ background: var(--ons-color-header-masthead);
12
12
  width: 100%;
13
13
  }
14
14
  &__grid-top {
@@ -24,12 +24,12 @@
24
24
  }
25
25
  }
26
26
  &__main {
27
- background: $color-header;
27
+ background: var(--ons-color-header);
28
28
  padding: 0.56rem 0;
29
29
 
30
30
  &--border {
31
- border-bottom: 3px solid $color-header;
32
- border-top: 3px solid $color-header;
31
+ border-bottom: 3px solid var(--ons-color-header);
32
+ border-top: 3px solid var(--ons-color-header);
33
33
  padding: 0.934rem 0;
34
34
  }
35
35
  }
@@ -37,7 +37,7 @@
37
37
  @extend .ons-u-fs-r--b;
38
38
  @extend .ons-u-fs-xl\@xxs;
39
39
 
40
- color: $color-white;
40
+ color: var(--ons-color-white);
41
41
 
42
42
  @include mq(m) {
43
43
  margin-bottom: 1rem;
@@ -49,11 +49,11 @@
49
49
  text-decoration: none;
50
50
  &:focus {
51
51
  .ons-header__title {
52
- color: $color-text-link-focus;
52
+ color: var(--ons-color-text-link-focus);
53
53
  }
54
54
  }
55
55
  &:hover {
56
- text-decoration: underline solid $color-text-inverse-link 2px;
56
+ text-decoration: underline solid var(--ons-color-text-inverse-link) 2px;
57
57
  }
58
58
  }
59
59
  }
@@ -61,7 +61,7 @@
61
61
  @extend .ons-u-fs-s;
62
62
  @extend .ons-u-fs-r\@s;
63
63
 
64
- color: $color-white;
64
+ color: var(--ons-color-white);
65
65
  margin: 0;
66
66
 
67
67
  @include mq(m) {
@@ -83,30 +83,30 @@
83
83
  &--internal &,
84
84
  &--neutral & {
85
85
  &__top {
86
- background: $color-header-masthead-internal;
86
+ background: var(--ons-color-header-masthead-internal);
87
87
  .ons-svg-logo {
88
88
  display: block;
89
89
  .ons-svg-logo__group--text,
90
90
  .ons-svg-logo__group--primary {
91
- fill: $color-white;
91
+ fill: var(--ons-color-white);
92
92
  }
93
93
  }
94
94
  }
95
95
  &__org-logo-link:focus {
96
96
  background-color: transparent;
97
97
  box-shadow: none;
98
- outline: 3px solid $color-focus;
98
+ outline: 3px solid var(--ons-color-focus);
99
99
  .ons-svg-logo {
100
- fill: $color-text-link-focus;
100
+ fill: var(--ons-color-text-link-focus);
101
101
  }
102
102
  }
103
103
  &__grid-top {
104
- color: $color-text-inverse;
104
+ color: var(--ons-color-text-inverse);
105
105
  min-height: 36px;
106
106
  a {
107
- color: $color-text-inverse;
107
+ color: var(--ons-color-text-inverse);
108
108
  &:hover {
109
- text-decoration: underline solid $color-text-inverse-link-hover 3px;
109
+ text-decoration: underline solid var(--ons-color-text-inverse-link-hover) 3px;
110
110
  }
111
111
  }
112
112
  }
@@ -114,23 +114,23 @@
114
114
 
115
115
  &--neutral & {
116
116
  &__top {
117
- background: $color-header-masthead-dark;
117
+ background: var(--ons-color-header-masthead-dark);
118
118
  }
119
119
 
120
120
  &__main {
121
- background: $color-header-light;
121
+ background: var(--ons-color-header-light);
122
122
 
123
123
  &--border {
124
- border-bottom: 3px solid $color-header-light;
125
- border-top: 3px solid $color-header-light;
124
+ border-bottom: 3px solid var(--ons-color-header-light);
125
+ border-top: 3px solid var(--ons-color-header-light);
126
126
  }
127
127
  }
128
128
 
129
129
  &__title {
130
- color: $color-branded-text;
130
+ color: var(--ons-color-branded-text);
131
131
  &-link {
132
132
  &:hover {
133
- text-decoration: underline solid $color-branded-text 2px;
133
+ text-decoration: underline solid var(--ons-color-branded-text) 2px;
134
134
  }
135
135
  }
136
136
  }
@@ -145,9 +145,9 @@
145
145
  display: block;
146
146
  &:focus {
147
147
  .ons-svg-logo {
148
- fill: $color-black !important;
148
+ fill: var(--ons-color-black) !important;
149
149
  .ons-svg-logo__group {
150
- fill: $color-black !important;
150
+ fill: var(--ons-color-black) !important;
151
151
  }
152
152
  }
153
153
  }
@@ -182,14 +182,14 @@
182
182
  display: inline-block;
183
183
 
184
184
  &--mobile {
185
- background: $color-branded-tint;
185
+ background: var(--ons-color-branded-tint);
186
186
  padding: 1rem;
187
187
  width: 100%;
188
188
  }
189
189
 
190
190
  .ons-header--neutral & {
191
191
  &--mobile {
192
- background: $color-grey-5;
192
+ background: var(--ons-color-grey-5);
193
193
  }
194
194
  }
195
195
 
@@ -216,7 +216,7 @@
216
216
  }
217
217
 
218
218
  .ons-language-links {
219
- border-top: 1px solid $color-branded;
219
+ border-top: 1px solid var(--ons-color-branded);
220
220
  margin: 1.5rem 0 0;
221
221
  padding: 1rem 0 0;
222
222
 
@@ -1,6 +1,6 @@
1
1
  // Default
2
2
  .ons-hero {
3
- background-color: $color-banner-bg;
3
+ background-color: var(--ons-color-banner-bg);
4
4
  display: flex;
5
5
  overflow: hidden;
6
6
  padding: 0;
@@ -43,15 +43,15 @@
43
43
 
44
44
  &--dark & {
45
45
  &__details {
46
- color: $color-text-inverse !important;
46
+ color: var(--ons-color-text-inverse) !important;
47
47
 
48
48
  a {
49
49
  color: inherit;
50
- text-decoration: underline solid $color-text-inverse-link 1px;
50
+ text-decoration: underline solid var(--ons-color-text-inverse-link) 1px;
51
51
  }
52
52
 
53
53
  a:hover {
54
- color: $color-text-inverse-link-hover;
54
+ color: var(--ons-color-text-inverse-link-hover);
55
55
  text-decoration-thickness: 2px;
56
56
  }
57
57
 
@@ -21,14 +21,14 @@
21
21
 
22
22
  // Overide default input error style so it can wrap prefix/suffix too
23
23
  &.ons-input--error:not(:focus) {
24
- border-right: $input-border-width solid $color-input-border;
24
+ border-right: $input-border-width solid var(--ons-color-input-border);
25
25
  box-shadow: none;
26
26
  outline: none;
27
27
  }
28
28
  }
29
29
 
30
30
  &__type {
31
- background-color: $color-button-secondary;
31
+ background-color: var(--ons-color-button-secondary);
32
32
  display: block;
33
33
  flex: 0 0 auto;
34
34
  font-size: 1rem;
@@ -45,7 +45,7 @@
45
45
 
46
46
  &__type,
47
47
  &__type[title] {
48
- border: 1px solid $color-input-border;
48
+ border: 1px solid var(--ons-color-input-border);
49
49
  }
50
50
 
51
51
  &__type[title] {
@@ -95,7 +95,7 @@
95
95
  .ons-input--error:not(:focus) {
96
96
  & + .ons-input-type__type,
97
97
  & + .ons-input-type__type[title] {
98
- border-color: $color-errors;
98
+ border-color: var(--ons-color-errors);
99
99
  }
100
100
 
101
101
  & + .ons-input-type__type::after {
@@ -103,7 +103,7 @@
103
103
  bottom: 0;
104
104
 
105
105
  // Style input + prefix/suffix for errors
106
- box-shadow: 0 0 0 1px $color-errors;
106
+ box-shadow: 0 0 0 1px var(--ons-color-errors);
107
107
  content: '';
108
108
  display: block;
109
109
  left: 0;
@@ -1,5 +1,5 @@
1
1
  %ons-input-focus {
2
- box-shadow: 0 0 0 $input-border-width $color-input-border, 0 0 0 4px $color-focus;
2
+ box-shadow: 0 0 0 $input-border-width var(--ons-color-input-border), 0 0 0 4px var(--ons-color-focus);
3
3
 
4
4
  // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
5
5
  outline: 3px solid transparent;
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  .ons-input {
15
- border: $input-border-width solid $color-input-border;
15
+ border: $input-border-width solid var(--ons-color-input-border);
16
16
  border-radius: $input-radius;
17
17
  color: inherit;
18
18
  display: block;
@@ -48,13 +48,13 @@
48
48
  }
49
49
 
50
50
  &:disabled {
51
- border-color: $color-grey-75;
51
+ border-color: var(--ons-color-grey-75);
52
52
  cursor: not-allowed;
53
53
  }
54
54
 
55
55
  &--error:not(:focus) {
56
- border: $input-border-width solid $color-errors;
57
- box-shadow: 0 0 0 $input-border-width $color-errors;
56
+ border: $input-border-width solid var(--ons-color-errors);
57
+ box-shadow: 0 0 0 $input-border-width var(--ons-color-errors);
58
58
  outline: 1px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show box-shadows
59
59
  }
60
60
 
@@ -82,7 +82,7 @@
82
82
 
83
83
  .ons-input--select {
84
84
  appearance: none;
85
- background: $color-input-bg
85
+ background: var(--ons-color-input-bg)
86
86
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11.75 7.7'%3E%3Cpath fill='currentColor' d='m1.37.15 4.5 5.1 4.5-5.1a.37.37 0 0 1 .6 0l.7.7a.45.45 0 0 1 0 .5l-5.5 6.2a.37.37 0 0 1-.6 0l-5.5-6.1a.64.64 0 0 1 0-.6l.7-.7a.64.64 0 0 1 .6 0Z'/%3E%3C/svg%3E")
87
87
  no-repeat center right 10px;
88
88
  background-size: 1rem;
@@ -111,29 +111,29 @@
111
111
  color: transparent;
112
112
  }
113
113
  &:valid:not(:placeholder-shown) {
114
- background-color: $color-input-bg;
114
+ background-color: var(--ons-color-input-bg);
115
115
  }
116
116
  &:focus {
117
- background-color: $color-input-bg;
117
+ background-color: var(--ons-color-input-bg);
118
118
  }
119
119
  }
120
120
 
121
121
  .ons-input--limit-reached:not(:focus) {
122
- border: $input-border-width solid $color-ruby-red;
122
+ border: $input-border-width solid var(--ons-color-ruby-red);
123
123
  }
124
124
 
125
125
  .ons-input__limit {
126
126
  display: block;
127
127
 
128
128
  &--reached {
129
- color: $color-ruby-red;
129
+ color: var(--ons-color-ruby-red);
130
130
  }
131
131
  }
132
132
 
133
133
  .ons-input--ghost {
134
134
  border: 2px solid rgba(255, 255, 255, 0.6);
135
135
  &:focus {
136
- border: 2px solid $color-input-border;
136
+ border: 2px solid var(--ons-color-input-border);
137
137
  }
138
138
  }
139
139
 
@@ -156,12 +156,12 @@
156
156
  &:focus,
157
157
  &:active {
158
158
  background-position: 12px 10px;
159
- box-shadow: 0 0 0 3px $color-focus;
159
+ box-shadow: 0 0 0 3px var(--ons-color-focus);
160
160
  }
161
161
  }
162
162
 
163
163
  &--dark {
164
- border: 2px solid $color-black;
164
+ border: 2px solid var(--ons-color-black);
165
165
  &.ons-input-search--icon {
166
166
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M11.86 10.23 8.62 6.99a4.63 4.63 0 1 0-6.34 1.64 4.55 4.55 0 0 0 2.36.64 4.65 4.65 0 0 0 2.33-.65l3.24 3.23a.46.46 0 0 0 .65 0l1-1a.48.48 0 0 0 0-.62Zm-5-3.32a3.28 3.28 0 0 1-2.31.93 3.22 3.22 0 1 1 2.35-.93Z'/%3E%3C/svg%3E");
167
167
  }
@@ -25,6 +25,6 @@
25
25
  }
26
26
 
27
27
  &--white {
28
- color: $color-white;
28
+ color: var(--ons-color-white);
29
29
  }
30
30
  }
@@ -25,7 +25,7 @@
25
25
  margin-left: 25px;
26
26
  position: relative;
27
27
  &::before {
28
- border-top: 1px solid $color-black;
28
+ border-top: 1px solid var(--ons-color-black);
29
29
  content: '';
30
30
  left: 0;
31
31
  margin-left: -25px;
@@ -6,7 +6,7 @@
6
6
  outline: 1px solid transparent; // Add transparent outline because Windows High Contrast Mode doesn't show background
7
7
 
8
8
  &--sent {
9
- background: $color-info-tint;
9
+ background: var(--ons-color-info-tint);
10
10
 
11
11
  @include mq(m) {
12
12
  margin-left: 4rem;
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  &--received {
17
- background: $color-success-tint;
17
+ background: var(--ons-color-success-tint);
18
18
 
19
19
  @include mq(m) {
20
20
  margin-right: 4rem;
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  &__head {
25
- border-bottom: 1px solid $color-borders;
25
+ border-bottom: 1px solid var(--ons-color-borders);
26
26
  padding: $grid-gutters;
27
27
  position: relative;
28
28
  }
@@ -8,7 +8,7 @@
8
8
  padding-bottom: 1.5rem;
9
9
 
10
10
  &:not(:last-child) {
11
- border-bottom: 1px solid $color-borders;
11
+ border-bottom: 1px solid var(--ons-color-borders);
12
12
  }
13
13
 
14
14
  &__subject {
@@ -20,7 +20,7 @@ $backdrop-colour: rgba(0, 0, 0, 0.8);
20
20
  }
21
21
 
22
22
  &-ie11 & {
23
- background: $color-white;
23
+ background: var(--ons-color-white);
24
24
  bottom: 0;
25
25
  height: 350px;
26
26
  left: 0;
@@ -51,7 +51,7 @@
51
51
  </div>
52
52
  {% if params.navigation.subNavigation %}
53
53
  <nav class="ons-navigation ons-navigation--sub ons-u-d-no@xxs@l{{ ' ' + params.navigation.subNavigation.classes if params.navigation.subNavigation.classes }}" id="{{ params.navigation.subNavigation.id }}" aria-label="{{ params.navigation.subNavigation.ariaLabel | default("Section menu") }}" data-analytics="header-section-navigation">
54
- <div class="ons-container ons-container--gutterless@xxs@l{{ ' ons-container--full-width' if params.navigation.fullWidth }}{{ ' ons-container--wide' if params.navigation.wide }}">
54
+ <div class="ons-container ons-container--gutterless@xxs@l{{ ' ons-container--full-width' if params.navigation.fullWidth }}{{ ' ons-container--wide' if params.wide or params.navigation.wide }}">
55
55
  <ul class="ons-navigation__list ons-navigation__list">
56
56
  {% for item in (params.navigation.subNavigation.itemsList if params.navigation.subNavigation.itemsList is iterable else params.navigation.subNavigation.itemsList.items()) %}
57
57
  <li class="ons-navigation__item {{ item.classes }}{{ ' ons-navigation__item--active' if (item.url == params.navigation.currentPath) or (params.navigation.currentPath is not string and item.url in params.navigation.currentPath) }}">
@@ -102,10 +102,16 @@ describe('macro: navigation', () => {
102
102
  expect($('.ons-container').hasClass('ons-container--full-width')).toBe(true);
103
103
  });
104
104
 
105
- it('has the correct container if `wide`', () => {
105
+ it('has the correct container if `params.wide` is provided', () => {
106
+ const $ = cheerio.load(renderComponent('navigation', { wide: true, navigation: PARAMS }));
107
+
108
+ expect($('.ons-navigation-wrapper .ons-container').hasClass('ons-container--wide')).toBe(true);
109
+ });
110
+
111
+ it('has the correct container if `params.navigation.wide` is provided', () => {
106
112
  const $ = cheerio.load(renderComponent('navigation', { navigation: { ...PARAMS, wide: true } }));
107
113
 
108
- expect($('.ons-container').hasClass('ons-container--wide')).toBe(true);
114
+ expect($('.ons-navigation-wrapper .ons-container').hasClass('ons-container--wide')).toBe(true);
109
115
  });
110
116
 
111
117
  it('has the search autosuggest with correct output', () => {
@@ -218,6 +224,18 @@ describe('macro: navigation', () => {
218
224
  });
219
225
  });
220
226
 
227
+ it('has the correct container if `params.wide` is provided', () => {
228
+ const $ = cheerio.load(renderComponent('navigation', { wide: true, navigation: PARAMS }));
229
+
230
+ expect($('.ons-navigation--sub .ons-container').hasClass('ons-container--wide')).toBe(true);
231
+ });
232
+
233
+ it('has the correct container if `params.navigation.wide` is provided', () => {
234
+ const $ = cheerio.load(renderComponent('navigation', { navigation: { ...PARAMS, wide: true } }));
235
+
236
+ expect($('.ons-navigation--sub .ons-container').hasClass('ons-container--wide')).toBe(true);
237
+ });
238
+
221
239
  it('has the provided `id` attribute', () => {
222
240
  const $ = cheerio.load(renderComponent('navigation', { navigation: PARAMS }));
223
241