maverick-wave 4.28.0 → 5.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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +29 -1
  2. package/.claude/skills/mw-maverick-wave/SKILL.md +39 -24
  3. package/.claude/skills/mw-maverick-wave/examples/angular-services.md +16 -4
  4. package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +13 -4
  5. package/.claude/skills/mw-maverick-wave/references/components.md +42 -5
  6. package/.claude/skills/mw-maverick-wave/references/forms.md +14 -2
  7. package/.claude/skills/mw-maverick-wave/references/javascript.md +17 -4
  8. package/.claude/skills/mw-maverick-wave/references/layout.md +53 -19
  9. package/.claude/skills/mw-maverick-wave/references/theming.md +38 -1
  10. package/.impeccable/config.local.json +5 -0
  11. package/.impeccable/hook.cache.json +1 -0
  12. package/CHANGELOG.md +11 -0
  13. package/CLAUDE.md +5 -5
  14. package/README.md +48 -4
  15. package/index.html +19 -38
  16. package/maverick-wave.min.css +14 -12
  17. package/maverick-wave.min.js +1 -1
  18. package/package.json +2 -2
  19. package/scripts/verify.js +27 -2
  20. package/src/js/main.js +223 -83
  21. package/src/partials/accordions-container.html +6 -10
  22. package/src/partials/alerts-container.html +6 -6
  23. package/src/partials/announcement-container.html +5 -5
  24. package/src/partials/avatars-container.html +85 -17
  25. package/src/partials/badges-container.html +6 -6
  26. package/src/partials/blog-posts-container.html +11 -12
  27. package/src/partials/buttons-container.html +3 -3
  28. package/src/partials/cards-container.html +26 -9
  29. package/src/partials/code-container.html +5 -5
  30. package/src/partials/content-slider-container.html +5 -4
  31. package/src/partials/divider-container.html +7 -7
  32. package/src/partials/dropdown-container.html +2 -2
  33. package/src/partials/empty-state-container.html +5 -5
  34. package/src/partials/footer-container.html +21 -18
  35. package/src/partials/form-elements-container.html +14 -14
  36. package/src/partials/gallery-container.html +16 -8
  37. package/src/partials/get-started-container.html +4 -8
  38. package/src/partials/header-container.html +18 -7
  39. package/src/partials/home-container.html +10 -20
  40. package/src/partials/input-group-container.html +11 -2
  41. package/src/partials/kbd-container.html +1 -1
  42. package/src/partials/login-container.html +5 -1
  43. package/src/partials/media-container.html +2 -2
  44. package/src/partials/modals-container.html +22 -32
  45. package/src/partials/pricing-container.html +9 -9
  46. package/src/partials/skeleton-container.html +6 -6
  47. package/src/partials/stepper-container.html +2 -2
  48. package/src/partials/tables-container.html +12 -12
  49. package/src/partials/tabs-container.html +17 -27
  50. package/src/partials/tags-container.html +23 -17
  51. package/src/partials/techstack-bucket-container.html +13 -0
  52. package/src/partials/tiles-container.html +26 -9
  53. package/src/partials/typography-container.html +7 -6
  54. package/src/partials/utilities-container.html +35 -15
  55. package/src/scss/_layers.scss +10 -0
  56. package/src/scss/abstracts/_index.scss +6 -0
  57. package/src/scss/abstracts/_mixins.scss +61 -153
  58. package/src/scss/abstracts/_variables.scss +123 -319
  59. package/src/scss/base/_base.scss +170 -190
  60. package/src/scss/base/_reset.scss +106 -104
  61. package/src/scss/base/_typography.scss +153 -151
  62. package/src/scss/components/_accordions.scss +97 -97
  63. package/src/scss/components/_alerts.scss +71 -70
  64. package/src/scss/components/_announcement.scss +71 -70
  65. package/src/scss/components/_avatars.scss +130 -142
  66. package/src/scss/components/_badge.scss +131 -132
  67. package/src/scss/components/_blog-post.scss +223 -220
  68. package/src/scss/components/_breadcrumbs.scss +93 -92
  69. package/src/scss/components/_button-bar.scss +102 -110
  70. package/src/scss/components/_buttons.scss +319 -324
  71. package/src/scss/components/_calendar.scss +251 -252
  72. package/src/scss/components/_cards.scss +359 -386
  73. package/src/scss/components/_code.scss +190 -194
  74. package/src/scss/components/_coming-soon.scss +77 -75
  75. package/src/scss/components/_content-slider.scss +90 -89
  76. package/src/scss/components/_divider.scss +55 -53
  77. package/src/scss/components/_dropdown.scss +179 -185
  78. package/src/scss/components/_empty-state.scss +57 -57
  79. package/src/scss/components/_flag.scss +294 -278
  80. package/src/scss/components/_gallery.scss +131 -133
  81. package/src/scss/components/_info.scss +151 -167
  82. package/src/scss/components/_kanban.scss +332 -341
  83. package/src/scss/components/_kbd.scss +40 -38
  84. package/src/scss/components/_lang-switch.scss +89 -97
  85. package/src/scss/components/_links.scss +21 -28
  86. package/src/scss/components/_lists.scss +510 -514
  87. package/src/scss/components/_localhost-indicator.scss +26 -24
  88. package/src/scss/components/_media.scss +22 -20
  89. package/src/scss/components/_meta-info.scss +35 -33
  90. package/src/scss/components/_modals.scss +277 -186
  91. package/src/scss/components/_pagination.scss +81 -87
  92. package/src/scss/components/_panels.scss +99 -97
  93. package/src/scss/components/_pricing.scss +183 -241
  94. package/src/scss/components/_progress.scss +112 -89
  95. package/src/scss/components/_prose.scss +35 -33
  96. package/src/scss/components/_ratings.scss +40 -38
  97. package/src/scss/components/_segmented.scss +82 -84
  98. package/src/scss/components/_skeleton.scss +66 -72
  99. package/src/scss/components/_spinners.scss +155 -159
  100. package/src/scss/components/_stepper.scss +116 -116
  101. package/src/scss/components/_tables.scss +155 -148
  102. package/src/scss/components/_tabs.scss +232 -141
  103. package/src/scss/components/_tags.scss +109 -107
  104. package/src/scss/components/_techstack-bucket.scss +123 -122
  105. package/src/scss/components/_testimonial.scss +72 -70
  106. package/src/scss/components/_theme-toggle.scss +53 -51
  107. package/src/scss/components/_tiles.scss +174 -174
  108. package/src/scss/components/_timelines.scss +282 -280
  109. package/src/scss/components/_toasts.scss +66 -72
  110. package/src/scss/form-elements/_checkbox.scss +117 -132
  111. package/src/scss/form-elements/_form.scss +149 -115
  112. package/src/scss/form-elements/_input-group.scss +99 -103
  113. package/src/scss/form-elements/_input.scss +74 -74
  114. package/src/scss/form-elements/_login.scss +48 -48
  115. package/src/scss/form-elements/_prefilled.scss +53 -51
  116. package/src/scss/form-elements/_radio.scss +95 -107
  117. package/src/scss/form-elements/_select.scss +42 -42
  118. package/src/scss/form-elements/_slider.scss +117 -132
  119. package/src/scss/form-elements/_textarea.scss +68 -54
  120. package/src/scss/form-elements/_toggle.scss +127 -140
  121. package/src/scss/layout/_footer.scss +172 -171
  122. package/src/scss/layout/_grid.scss +268 -302
  123. package/src/scss/layout/_header.scss +426 -427
  124. package/src/scss/layout/_home.scss +28 -27
  125. package/src/scss/layout/_main.scss +275 -238
  126. package/src/scss/layout/_page-header.scss +38 -36
  127. package/src/scss/layout/_section.scss +150 -124
  128. package/src/scss/main.scss +1 -1
  129. package/src/scss/utilities/_accessibility.scss +46 -45
  130. package/src/scss/utilities/_aspect.scss +22 -20
  131. package/src/scss/utilities/_corner.scss +23 -5
  132. package/src/scss/utilities/_display.scss +76 -70
  133. package/src/scss/utilities/_elevation.scss +13 -11
  134. package/src/scss/utilities/_flex.scss +83 -85
  135. package/src/scss/utilities/_reveal.scss +40 -63
  136. package/src/scss/utilities/_spacing.scss +63 -64
  137. package/src/scss/utilities/_text.scss +139 -141
  138. package/src/scss/utilities/_touch-targets.scss +130 -147
@@ -1,114 +1,137 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- $_mw-progress-colors: (
4
- primary: var(--mw-primary-color),
5
- secondary: var(--mw-secondary-color),
6
- info: var(--mw-info-color),
7
- success: var(--mw-success-color),
8
- warning: var(--mw-warning-color),
9
- danger: var(--mw-danger-color),
10
- );
11
-
12
- .mw-progress {
13
- &-container {
14
- margin: spacing('1');
15
- }
3
+ @layer mw.components {
4
+ .mw-progress {
5
+ &-container {
6
+ margin: spacing('1');
7
+ }
16
8
 
17
- &-barinfo {
18
- display: flex;
19
- justify-content: space-between;
20
- margin: spacing('3') spacing('2') spacing('1');
21
- font-size: font-size('sm');
9
+ &-barinfo {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ margin: spacing('3') spacing('2') spacing('1');
13
+ font-size: font-size('sm');
22
14
 
23
- // hide info, if this class is available
24
- &.mw-progress-hide-info {
25
- display: none;
15
+ &.mw-progress-hide-info {
16
+ display: none;
17
+ }
26
18
  }
27
- }
28
19
 
29
- &-label {
30
- font-weight: font-weight('medium');
31
- }
20
+ &-label {
21
+ font-weight: font-weight('medium');
22
+ }
32
23
 
33
- &-value {
34
- color: var(--mw-text-muted-color);
35
- pointer-events: none;
36
- align-content: end;
24
+ &-value {
25
+ color: var(--mw-text-muted-color);
26
+ pointer-events: none;
27
+ align-content: end;
37
28
 
38
- @include media-down('sm') {
39
- font-size: font-size('xs');
40
- }
29
+ @include media-down('sm') {
30
+ font-size: font-size('xs');
31
+ }
41
32
 
42
- // numeric values from 1-10
43
- &.mw-progress-numeric {
44
- &::after {
45
- content: '/10';
33
+ &.mw-progress-numeric {
34
+ &::after {
35
+ content: '/10';
36
+ }
46
37
  }
47
- }
48
38
 
49
- // for percentage values
50
- &.mw-progress-percent {
51
- &::after {
52
- content: '%';
39
+ &.mw-progress-percent {
40
+ &::after {
41
+ content: '%';
42
+ }
53
43
  }
54
44
  }
55
- }
56
45
 
57
- &-bar {
58
- width: 100%;
59
- height: 10px;
60
- background: var(--mw-gray-background);
61
- opacity: 0.9;
62
- border-radius: radius('sm');
63
- overflow: hidden;
64
- position: relative;
65
- }
46
+ &-bar {
47
+ width: 100%;
48
+ height: 10px;
49
+ background: var(--mw-gray-background);
50
+ opacity: 0.9;
51
+ border-radius: radius('sm');
52
+ overflow: hidden;
53
+ position: relative;
54
+ }
66
55
 
67
- &-fill {
68
- // The label sits *inside* the fill, so its ink follows whichever color
69
- // variant is on the element - preset to the default fill, re-pointed by
70
- // the variants at the bottom of the file
71
- --mw-progress-ink: var(--mw-secondary-accent-text-color);
72
-
73
- height: 100%;
74
- background: var(--mw-secondary-color);
75
- border-radius: radius('sm');
76
- width: 0;
77
- transition: width var(--mw-duration-slower) var(--mw-ease-in-out);
78
- }
56
+ &-fill {
57
+ // The label sits *inside* the fill, so its ink follows whichever color
58
+ // variant is on the element - preset to the default fill, re-pointed by
59
+ // the variants at the bottom of the file
60
+ --mw-progress-ink: var(--mw-secondary-accent-text-color);
61
+
62
+ // How far the bar is filled. Written by the script from data-value or from
63
+ // an inline width, and read by the keyframe below. Declared here so it has
64
+ // a definition rather than only a fallback - an unset bar is an empty one.
65
+ --mw-progress-value: 0;
66
+
67
+ height: 100%;
68
+ background: var(--mw-secondary-color);
69
+ border-radius: radius('sm');
70
+ width: 0;
71
+ transition: width var(--mw-duration-slower) var(--mw-ease-in-out);
72
+
73
+ // The bar fills as it is scrolled into view, tied to the scroll position
74
+ // rather than to a one-shot transition: scroll back up and it empties
75
+ // again.
76
+ //
77
+ // Gated on a class the script adds, and only once it knows the target
78
+ // width - an animation outranks an inline style, so a bar written as
79
+ // `style="width: 70%"` would be animated to nothing by a keyframe that
80
+ // reads an unset --mw-progress-value. With the gate, a page whose script
81
+ // never runs keeps whatever width its markup set.
82
+ &.mw-progress-driven {
83
+ @supports (animation-timeline: view()) {
84
+ @media (prefers-reduced-motion: no-preference) {
85
+ animation: mw-progress-fill linear both;
86
+ animation-timeline: view();
87
+ // Starts once the bar is properly on screen and finishes well
88
+ // before it reaches the middle, so it is full when it is read.
89
+ animation-range: entry 60% cover 40%;
90
+ }
91
+ }
92
+ }
93
+ }
79
94
 
80
- // Sizes
81
- &-sm .mw-progress-bar {
82
- height: 6px;
83
- border-radius: radius('sm');
84
- }
95
+ &-sm .mw-progress-bar {
96
+ height: 6px;
97
+ border-radius: radius('sm');
98
+ }
85
99
 
86
- &-lg .mw-progress-bar {
87
- height: 15px;
88
- border-radius: radius('lg');
89
- }
100
+ &-lg .mw-progress-bar {
101
+ height: 15px;
102
+ border-radius: radius('lg');
103
+ }
104
+
105
+ &-inline-label {
106
+ .mw-progress-bar {
107
+ height: 22px;
108
+ user-select: none;
109
+ }
90
110
 
91
- // With inner label
92
- &-inline-label {
93
- .mw-progress-bar {
94
- height: 22px;
95
- user-select: none;
111
+ .mw-progress-fill {
112
+ display: flex;
113
+ align-items: center;
114
+ padding-left: spacing('6');
115
+ font-size: font-size('xs');
116
+ font-weight: font-weight('medium');
117
+ color: var(--mw-progress-ink);
118
+ }
96
119
  }
120
+ }
97
121
 
98
- .mw-progress-fill {
99
- display: flex;
100
- align-items: center;
101
- padding-left: spacing('6');
102
- font-size: font-size('xs');
103
- font-weight: font-weight('medium');
104
- color: var(--mw-progress-ink);
122
+ @each $name, $col in $semantic-colors {
123
+ .mw-progress-#{$name} {
124
+ background: #{$col};
125
+ --mw-progress-ink: var(--mw-#{$name}-accent-text-color);
105
126
  }
106
127
  }
107
- }
108
128
 
109
- @each $name, $col in $_mw-progress-colors {
110
- .mw-progress-#{$name} {
111
- background: #{$col};
112
- --mw-progress-ink: var(--mw-#{$name}-accent-text-color);
129
+ @keyframes mw-progress-fill {
130
+ from {
131
+ width: 0;
132
+ }
133
+ to {
134
+ width: var(--mw-progress-value);
135
+ }
113
136
  }
114
137
  }
@@ -1,42 +1,44 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- // Long-form running text - a legal page, terms, a plain article. One class on
4
- // the container instead of a utility chain on every heading: the markup inside
5
- // stays bare h2/h3/p/ul, which is exactly what a CMS or a JSON-driven page
6
- // produces anyway.
7
- //
8
- // Headings are deliberately small: in a document they structure the reading,
9
- // they do not compete with the page title.
10
- .mw-prose {
11
- h2 {
12
- font-size: font-size('lg');
13
- color: var(--mw-primary-text-color);
14
- margin: spacing('8') 0 spacing('3');
15
- }
3
+ @layer mw.components {
4
+ // Long-form running text - a legal page, terms, a plain article. One class on
5
+ // the container instead of a utility chain on every heading: the markup inside
6
+ // stays bare h2/h3/p/ul, which is exactly what a CMS or a JSON-driven page
7
+ // produces anyway.
8
+ //
9
+ // Headings are deliberately small: in a document they structure the reading,
10
+ // they do not compete with the page title.
11
+ .mw-prose {
12
+ h2 {
13
+ font-size: font-size('lg');
14
+ color: var(--mw-primary-text-color);
15
+ margin: spacing('8') 0 spacing('3');
16
+ }
16
17
 
17
- h3 {
18
- font-size: font-size('md');
19
- color: var(--mw-primary-text-color);
20
- margin: spacing('6') 0 spacing('2');
21
- }
18
+ h3 {
19
+ font-size: font-size('md');
20
+ color: var(--mw-primary-text-color);
21
+ margin: spacing('6') 0 spacing('2');
22
+ }
22
23
 
23
- ul,
24
- ol {
25
- margin: 0 0 spacing('3') spacing('7');
26
- }
24
+ ul,
25
+ ol {
26
+ margin: 0 0 spacing('3') spacing('7');
27
+ }
27
28
 
28
- li {
29
- margin-bottom: spacing('1');
30
- }
29
+ li {
30
+ margin-bottom: spacing('1');
31
+ }
31
32
 
32
- // The first heading in a card already sits on the card's padding, the last
33
- // paragraph on its bottom edge - without these the container carries double
34
- // spacing at both ends.
35
- > :first-child {
36
- margin-top: 0;
37
- }
33
+ // The first heading in a card already sits on the card's padding, the last
34
+ // paragraph on its bottom edge - without these the container carries double
35
+ // spacing at both ends.
36
+ > :first-child {
37
+ margin-top: 0;
38
+ }
38
39
 
39
- > :last-child {
40
- margin-bottom: 0;
40
+ > :last-child {
41
+ margin-bottom: 0;
42
+ }
41
43
  }
42
44
  }
@@ -1,49 +1,51 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- .mw-rating {
4
- display: inline-flex;
5
- flex-wrap: wrap;
6
- max-width: 100%;
7
- gap: spacing('3');
8
- font-size: font-size('2xl');
9
- padding: spacing('2') spacing('4');
10
-
11
- border: 1px solid var(--mw-border);
12
- border-radius: radius('md');
13
-
14
- &-container {
15
- margin: spacing('1');
16
- }
3
+ @layer mw.components {
4
+ .mw-rating {
5
+ display: inline-flex;
6
+ flex-wrap: wrap;
7
+ max-width: 100%;
8
+ gap: spacing('3');
9
+ font-size: font-size('2xl');
10
+ padding: spacing('2') spacing('4');
11
+
12
+ border: 1px solid var(--mw-border);
13
+ border-radius: radius('md');
14
+
15
+ &-container {
16
+ margin: spacing('1');
17
+ }
17
18
 
18
- &-info {
19
- display: flex;
20
- justify-content: space-between;
21
- margin: spacing('1');
22
- font-size: font-size('md');
23
- }
19
+ &-info {
20
+ display: flex;
21
+ justify-content: space-between;
22
+ margin: spacing('1');
23
+ font-size: font-size('md');
24
+ }
24
25
 
25
- &-sm {
26
- font-size: font-size('lg');
27
- padding: spacing('2') spacing('3');
28
- }
26
+ &-sm {
27
+ font-size: font-size('lg');
28
+ padding: spacing('2') spacing('3');
29
+ }
29
30
 
30
- &-lg {
31
- font-size: font-size('4xl');
32
- padding: spacing('3') spacing('5');
33
- }
31
+ &-lg {
32
+ font-size: font-size('4xl');
33
+ padding: spacing('3') spacing('5');
34
+ }
34
35
 
35
- &-icon {
36
- color: var(--mw-gray-color);
37
- transition: var(--mw-transition);
38
- pointer-events: none;
36
+ &-icon {
37
+ color: var(--mw-gray-color);
38
+ transition: var(--mw-transition);
39
+ pointer-events: none;
40
+ }
39
41
  }
40
- }
41
42
 
42
- // fill first N icons based on data-rating
43
- @for $i from 1 through 5 {
44
- .mw-rating[data-rating='#{$i}'] {
45
- & .mw-rating-icon:nth-child(-n + #{$i}) {
46
- color: var(--mw-primary-text-color);
43
+ // fill first N icons based on data-rating
44
+ @for $i from 1 through 5 {
45
+ .mw-rating[data-rating='#{$i}'] {
46
+ & .mw-rating-icon:nth-child(-n + #{$i}) {
47
+ color: var(--mw-primary-text-color);
48
+ }
47
49
  }
48
50
  }
49
51
  }
@@ -1,102 +1,100 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- // Two or three positions of *one* switch - income/expense on a booking form,
4
- // offer/quote on a document form.
5
- //
6
- // Deliberately not a `.mw-button-bar`: that one stacks below 576px and gives
7
- // every button 96% width, which is right for a row of independent actions and
8
- // wrong here. Stacked, two positions of a switch look like two buttons you
9
- // could press both of. This one stays horizontal at every width.
10
- .mw-segmented {
11
- display: inline-flex;
12
- width: 100%;
13
- gap: spacing('1');
14
- padding: spacing('1');
15
- background: var(--mw-surface-muted);
16
- border: 1px solid var(--mw-border);
17
- border-radius: radius('sm');
18
- }
3
+ @layer mw.components {
4
+ // Two or three positions of *one* switch - income/expense on a booking form,
5
+ // offer/quote on a document form.
6
+ //
7
+ // Deliberately not a `.mw-button-bar`: that one stacks below 576px and gives
8
+ // every button 96% width, which is right for a row of independent actions and
9
+ // wrong here. Stacked, two positions of a switch look like two buttons you
10
+ // could press both of. This one stays horizontal at every width.
11
+ .mw-segmented {
12
+ display: inline-flex;
13
+ width: 100%;
14
+ gap: spacing('1');
15
+ padding: spacing('1');
16
+ background: var(--mw-surface-muted);
17
+ border: 1px solid var(--mw-border);
18
+ border-radius: radius('sm');
19
+ }
19
20
 
20
- // Equal shares, so the switch reads as one control and not as a row of labels
21
- .mw-segmented-item {
22
- flex: 1 1 0;
23
- min-width: 0;
24
- display: inline-flex;
25
- align-items: center;
26
- justify-content: center;
27
- gap: spacing('2');
28
- padding: spacing('2') spacing('3');
29
- border: 1px solid transparent;
30
- border-radius: radius('xs');
31
- background: transparent;
32
- color: var(--mw-text-muted-color);
33
- font-family: inherit;
34
- font-size: font-size('sm');
35
- font-weight: font-weight('medium');
36
- line-height: 1.2;
37
- text-align: center;
38
- white-space: nowrap;
39
- overflow: hidden;
40
- text-overflow: ellipsis;
41
- cursor: pointer;
42
- transition: var(--mw-transition);
21
+ // Equal shares, so the switch reads as one control and not as a row of labels
22
+ .mw-segmented-item {
23
+ flex: 1 1 0;
24
+ min-width: 0;
25
+ display: inline-flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ gap: spacing('2');
29
+ padding: spacing('2') spacing('3');
30
+ border: 1px solid transparent;
31
+ border-radius: radius('xs');
32
+ background: transparent;
33
+ color: var(--mw-text-muted-color);
34
+ font-family: inherit;
35
+ font-size: font-size('sm');
36
+ font-weight: font-weight('medium');
37
+ line-height: 1.2;
38
+ text-align: center;
39
+ @include truncate;
40
+ cursor: pointer;
41
+ transition: var(--mw-transition);
43
42
 
44
- &:hover:not(:disabled):not(.mw-active):not(.active) {
45
- color: var(--mw-text-color);
46
- }
43
+ &:hover:not(:disabled):not(.mw-active):not(.active) {
44
+ color: var(--mw-text-color);
45
+ }
47
46
 
48
- @include tappable;
47
+ @include tappable;
49
48
 
50
- &:active {
51
- transform: scale(0.97);
52
- transition-duration: var(--mw-duration-instant);
53
- }
49
+ &:active {
50
+ transform: scale(0.97);
51
+ transition-duration: var(--mw-duration-instant);
52
+ }
54
53
 
55
- // Inset, because an outline outside the item would be clipped by the frame
56
- @include focus-ring-inset;
54
+ // Inset, because an outline outside the item would be clipped by the frame
55
+ @include focus-ring-inset;
57
56
 
58
- &:disabled {
59
- cursor: not-allowed;
60
- opacity: 0.6;
61
- }
57
+ &:disabled {
58
+ cursor: not-allowed;
59
+ opacity: 0.6;
60
+ }
62
61
 
63
- &.mw-active,
64
- &.active {
65
- background: var(--mw-primary-color);
66
- border-color: var(--mw-primary-text-color);
67
- color: var(--mw-primary-accent-text-color);
62
+ @include active() {
63
+ background: var(--mw-primary-color);
64
+ border-color: var(--mw-primary-text-color);
65
+ color: var(--mw-primary-accent-text-color);
68
66
 
69
- // A tag inside an item - the saving on a billing cycle, a count on a
70
- // filter. Its colour variants mix their background from the *page*, so on
71
- // the active item's fill they come out muddy: an orange pill on blue turns
72
- // purple. On that one the tag borrows the item's own ink; on the others it
73
- // keeps its colour, which is what makes a visitor click it in the first
74
- // place.
75
- .mw-tag {
76
- background: transparent;
77
- border-color: currentColor;
78
- color: inherit;
67
+ // A tag inside an item - the saving on a billing cycle, a count on a
68
+ // filter. Its colour variants mix their background from the *page*, so on
69
+ // the active item's fill they come out muddy: an orange pill on blue turns
70
+ // purple. On that one the tag borrows the item's own ink; on the others it
71
+ // keeps its colour, which is what makes a visitor click it in the first
72
+ // place.
73
+ .mw-tag {
74
+ background: transparent;
75
+ border-color: currentColor;
76
+ color: inherit;
77
+ }
79
78
  }
80
79
  }
81
- }
82
80
 
83
- // Secondary tone for a switch that is not the primary decision on the form
84
- .mw-segmented-secondary .mw-segmented-item {
85
- &.mw-active,
86
- &.active {
87
- background: var(--mw-secondary-color);
88
- border-color: var(--mw-secondary-text-color);
89
- color: var(--mw-secondary-accent-text-color);
81
+ // Secondary tone for a switch that is not the primary decision on the form
82
+ .mw-segmented-secondary .mw-segmented-item {
83
+ @include active() {
84
+ background: var(--mw-secondary-color);
85
+ border-color: var(--mw-secondary-text-color);
86
+ color: var(--mw-secondary-accent-text-color);
87
+ }
90
88
  }
91
- }
92
89
 
93
- // Sits inline next to a label instead of filling the row. Equal shares are the
94
- // point of the full-width control; here they would clip the longest label to
95
- // the width of the shortest, so the items follow their own content instead.
96
- .mw-segmented-auto {
97
- width: auto;
90
+ // Sits inline next to a label instead of filling the row. Equal shares are the
91
+ // point of the full-width control; here they would clip the longest label to
92
+ // the width of the shortest, so the items follow their own content instead.
93
+ .mw-segmented-auto {
94
+ width: auto;
98
95
 
99
- .mw-segmented-item {
100
- flex: 0 1 auto;
96
+ .mw-segmented-item {
97
+ flex: 0 1 auto;
98
+ }
101
99
  }
102
100
  }