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,213 +1,193 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- // Active theme set and its token prefix, derived from $mw-theme-mode
4
- $_active-theme: $dark-theme-colors;
5
- $_active-prefix: 'dark';
3
+ @layer mw.base {
4
+ // Active theme set and its token prefix, derived from $mw-theme-mode
5
+ $_active-theme: $dark-theme-colors;
6
+ $_active-prefix: 'dark';
6
7
 
7
- @if $mw-theme-mode == 'light' {
8
- $_active-theme: $light-theme-colors;
9
- $_active-prefix: 'light';
10
- }
11
-
12
- // CSS Variables for theming and overriding
13
- :root {
14
- // Brand and neutral colors
15
- @each $name, $value in $base-colors {
16
- --mw-#{$name}: #{$value};
8
+ @if $mw-theme-mode == 'light' {
9
+ $_active-theme: $light-theme-colors;
10
+ $_active-prefix: 'light';
17
11
  }
18
12
 
19
- // Status colors
20
- @each $name, $value in $status-colors {
21
- --mw-#{$name}: #{$value};
22
- }
13
+ // CSS Variables for theming and overriding
14
+ :root {
15
+ // Brand and neutral colors
16
+ @each $name, $value in $base-colors {
17
+ --mw-#{$name}: #{$value};
18
+ }
23
19
 
24
- // Header/navbar colors (fixed across themes, but overridable on their own)
25
- @each $name, $value in $header-colors {
26
- --mw-header-#{$name}: #{$value};
27
- }
20
+ // Status colors
21
+ @each $name, $value in $status-colors {
22
+ --mw-#{$name}: #{$value};
23
+ }
28
24
 
29
- // Dark theme colors
30
- @each $name, $value in $dark-theme-colors {
31
- --mw-dark-#{$name}: #{$value};
32
- }
25
+ // Header/navbar colors (fixed across themes, but overridable on their own)
26
+ @each $name, $value in $header-colors {
27
+ --mw-header-#{$name}: #{$value};
28
+ }
33
29
 
34
- // Light theme colors
35
- @each $name, $value in $light-theme-colors {
36
- --mw-light-#{$name}: #{$value};
37
- }
30
+ // Dark theme colors
31
+ @each $name, $value in $dark-theme-colors {
32
+ --mw-dark-#{$name}: #{$value};
33
+ }
38
34
 
39
- // Motion. The scale itself lives in the variables file - these are the knobs
40
- // a project retunes without recompiling.
41
- --mw-duration-instant: #{$duration-instant};
42
- --mw-duration-fast: #{$duration-fast};
43
- --mw-duration-base: #{$duration-base};
44
- --mw-duration-slow: #{$duration-slow};
45
- --mw-duration-slower: #{$duration-slower};
46
- --mw-duration-zoom: #{$duration-zoom};
47
- --mw-ease-out: #{$ease-out};
48
- --mw-ease-in-out: #{$ease-in-out};
49
- --mw-ease-spring: #{$ease-spring};
50
-
51
- // The workhorse: every hover, focus and active state in the framework. An
52
- // explicit property list rather than `all` - see $transition-properties.
53
- // Built through transition-list(), which repeats the duration on every
54
- // property: a shorthand list only reads it on the entry it stands behind.
55
- --mw-transition: #{transition-list('--mw-duration-base')};
56
- // Same list, for a state change that should feel instant under the pointer
57
- // rather than animated - a button label, a tag, a table row.
58
- --mw-transition-fast: #{transition-list('--mw-duration-fast')};
59
-
60
- // Control sizes - see the note in the variables file. Custom properties
61
- // rather than compile-time only, so an application can tighten its forms
62
- // without recompiling the framework.
63
- --mw-control-height-sm: #{$control-height-sm};
64
- --mw-control-height: #{$control-height};
65
- --mw-control-height-lg: #{$control-height-lg};
66
- --mw-control-font-sm: #{$control-font-sm};
67
- --mw-control-font: #{$control-font};
68
- --mw-control-font-lg: #{$control-font-lg};
69
- --mw-control-line-height: #{$control-line-height};
70
-
71
- // Focus ring
72
- --mw-focus-ring-width: #{$focus-ring-width};
73
- --mw-focus-ring-offset: #{$focus-ring-offset};
74
- --mw-focus-ring-color: var(--mw-primary-text-color);
75
- --mw-focus-halo-size: #{$focus-halo-size};
76
- --mw-focus-halo-opacity: #{$focus-halo-opacity};
77
-
78
- // Tells the browser which way round the page is, which is the only way the
79
- // chrome it draws itself follows along: scrollbars, the popup a <select>
80
- // opens, the panel behind a date picker, the spinner on a number field.
81
- // Without it a dark page keeps light scrollbars and a white select popup.
82
- @if $mw-theme-mode == 'light' {
83
- color-scheme: light;
84
- } @else {
85
- color-scheme: dark;
86
- }
87
- // Native controls the framework does not paint over - <progress>, a file
88
- // input's button, a text selection handle - take the brand colour instead of
89
- // the OS blue.
90
- accent-color: var(--mw-primary-color);
91
-
92
- // theme for theme-toggle
93
- --mw-internal-theme-mode: #{$mw-theme-mode};
94
-
95
- // hero background image and the ink that sits on it
96
- --mw-hero-background: #{$mw-hero-image};
97
- --mw-hero-text-color: #{$mw-hero-text-color};
98
-
99
- // header height
100
- --mw-header-height: #{$header-height};
101
-
102
- // Height the announcement ribbon reserves - the anchor scroll offset is
103
- // calculated from it, so a project with a taller ribbon raises this token
104
- // rather than fighting the offset. Below `sm` the component itself steps it
105
- // up for the wrapped line.
106
- --mw-announcement-height: 2.7rem;
107
-
108
- // Layout knobs. A good default is not enough here: what reads as generous on
109
- // a landing page costs visible content in an application with a sticky
110
- // header. Same framework, two different right answers.
111
- //
112
- // The page gutter is fluid rather than stepped. A plain percentage keeps too
113
- // little on a phone and throws away too much on a desktop; a fixed gutter
114
- // does the reverse - Bootstrap ships 12px at every width, Bulma 32px, and
115
- // Material asks for 16dp on a phone and more as the screen grows. The ramp
116
- // below lands on ~24px at 375px, ~32px at 576px, ~40px on a tablet and tops
117
- // out at 64px, where the 1200px cap takes over. Stepping it at a breakpoint
118
- // instead would make the container jump *backwards* at the step, because the
119
- // gutter grows faster there than the viewport does.
120
- //
121
- // max() against the safe-area insets, so a notched phone in landscape pushes
122
- // the content clear of the cutout instead of running underneath it.
123
- --mw-container-gutter: max(
124
- clamp(1rem, 4.2vw + 0.5rem, 4rem),
125
- env(safe-area-inset-left, 0px),
126
- env(safe-area-inset-right, 0px)
127
- );
128
- --mw-container-width: min(
129
- 1200px,
130
- calc(100% - 2 * var(--mw-container-gutter))
131
- );
132
- --mw-section-padding-block: #{spacing('10')};
133
- --mw-section-title-gap: #{spacing('7')};
134
- --mw-scroll-hint-offset: #{spacing('9')};
135
- --mw-scroll-hint-inline: var(--mw-container-gutter);
136
- --mw-scroll-hint-reserve: #{spacing('10')};
137
-
138
- // Active theme - aliases onto the dark or light set above
139
- @each $name, $value in $_active-theme {
140
- --mw-#{$name}: var(--mw-#{$_active-prefix}-#{$name});
35
+ // Light theme colors
36
+ @each $name, $value in $light-theme-colors {
37
+ --mw-light-#{$name}: #{$value};
38
+ }
39
+
40
+ // The scale lives in the variables file - these are the runtime knobs
41
+ --mw-duration-instant: #{$duration-instant};
42
+ --mw-duration-fast: #{$duration-fast};
43
+ --mw-duration-base: #{$duration-base};
44
+ --mw-duration-slow: #{$duration-slow};
45
+ --mw-duration-slower: #{$duration-slower};
46
+ --mw-duration-zoom: #{$duration-zoom};
47
+ --mw-ease-out: #{$ease-out};
48
+ --mw-ease-in-out: #{$ease-in-out};
49
+ --mw-ease-spring: #{$ease-spring};
50
+
51
+ // Every hover, focus and active state. transition-list() repeats the duration
52
+ // on every property - a shorthand list only reads it on the entry behind it.
53
+ --mw-transition: #{transition-list('--mw-duration-base')};
54
+ // Same list, for a state that should feel instant rather than animated
55
+ --mw-transition-fast: #{transition-list('--mw-duration-fast')};
56
+
57
+ // Custom properties, so an application can tighten its forms without recompiling
58
+ --mw-control-height-sm: #{$control-height-sm};
59
+ --mw-control-height: #{$control-height};
60
+ --mw-control-height-lg: #{$control-height-lg};
61
+ --mw-control-font-sm: #{$control-font-sm};
62
+ --mw-control-font: #{$control-font};
63
+ --mw-control-font-lg: #{$control-font-lg};
64
+ --mw-control-line-height: #{$control-line-height};
65
+
66
+ // Focus ring
67
+ --mw-focus-ring-width: #{$focus-ring-width};
68
+ --mw-focus-ring-offset: #{$focus-ring-offset};
69
+ --mw-focus-ring-color: var(--mw-primary-text-color);
70
+ --mw-focus-halo-size: #{$focus-halo-size};
71
+ --mw-focus-halo-opacity: #{$focus-halo-opacity};
72
+
73
+ // The only way the chrome the browser draws itself follows the theme:
74
+ // scrollbars, the select popup, the date picker panel, number spinners
75
+ @if $mw-theme-mode == 'light' {
76
+ color-scheme: light;
77
+ } @else {
78
+ color-scheme: dark;
79
+ }
80
+ // Native controls the framework does not paint over take the brand, not OS blue
81
+ accent-color: var(--mw-primary-color);
82
+
83
+ // theme for theme-toggle
84
+ --mw-internal-theme-mode: #{$mw-theme-mode};
85
+
86
+ // hero background image and the ink that sits on it
87
+ --mw-hero-background: #{$mw-hero-image};
88
+ --mw-hero-text-color: #{$mw-hero-text-color};
89
+
90
+ // header height
91
+ --mw-header-height: #{$header-height};
92
+
93
+ // Read by the anchor offset of anything the sticky section nav can cover
94
+ --mw-section-nav-height: 3.7rem;
95
+
96
+ // The anchor scroll offset is calculated from it, so a taller ribbon raises
97
+ // this token rather than fighting the offset
98
+ --mw-announcement-height: 2.7rem;
99
+
100
+ // Fluid rather than stepped: ~24px at 375px up to 64px, where the 1200px cap
101
+ // takes over. Stepping at a breakpoint makes the container jump *backwards*
102
+ // there, because the gutter grows faster than the viewport does.
103
+ // max() against the safe-area insets keeps a notched phone clear of the cutout.
104
+ --mw-container-gutter: max(
105
+ clamp(1rem, 4.2vw + 0.5rem, 4rem),
106
+ env(safe-area-inset-left, 0px),
107
+ env(safe-area-inset-right, 0px)
108
+ );
109
+ --mw-container-width: min(
110
+ 1200px,
111
+ calc(100% - 2 * var(--mw-container-gutter))
112
+ );
113
+ --mw-section-padding-block: #{spacing('10')};
114
+ --mw-section-title-gap: #{spacing('7')};
115
+ --mw-scroll-hint-offset: #{spacing('9')};
116
+ --mw-scroll-hint-inline: var(--mw-container-gutter);
117
+ --mw-scroll-hint-reserve: #{spacing('10')};
118
+
119
+ // Active theme - aliases onto the dark or light set above
120
+ @each $name, $value in $_active-theme {
121
+ --mw-#{$name}: var(--mw-#{$_active-prefix}-#{$name});
122
+ }
141
123
  }
142
- }
143
124
 
144
- @if $mw-theme-mode == 'switchable' {
145
- .mw-theme-light {
146
- // Light theme variables for switching
147
- @each $name, $value in $light-theme-colors {
148
- --mw-#{$name}: var(--mw-light-#{$name});
125
+ @if $mw-theme-mode == 'switchable' {
126
+ .mw-theme-light {
127
+ // Light theme variables for switching
128
+ @each $name, $value in $light-theme-colors {
129
+ --mw-#{$name}: var(--mw-light-#{$name});
130
+ }
131
+
132
+ color-scheme: light;
149
133
  }
134
+ }
150
135
 
136
+ // Form controls are deliberately light in both themes - see
137
+ // $form-elements-background - so they opt back out of the page's colour scheme.
138
+ // Without this the browser draws their built-in parts for a dark surface and a
139
+ // date field ends up with a white calendar icon on a near-white background.
140
+ input,
141
+ select,
142
+ textarea,
143
+ .mw-input,
144
+ .mw-select,
145
+ .mw-textarea,
146
+ .mw-input-group {
151
147
  color-scheme: light;
152
148
  }
153
- }
154
149
 
155
- // Form controls are deliberately light in both themes - see
156
- // $form-elements-background - so they opt back out of the page's colour scheme.
157
- // Without this the browser draws their built-in parts for a dark surface and a
158
- // date field ends up with a white calendar icon on a near-white background.
159
- input,
160
- select,
161
- textarea,
162
- .mw-input,
163
- .mw-select,
164
- .mw-textarea,
165
- .mw-input-group {
166
- color-scheme: light;
167
- }
150
+ // A scroll hint inside a card has to fade into the card, not into the page
151
+ .mw-card,
152
+ .mw-panel,
153
+ .mw-modal,
154
+ .mw-tile,
155
+ .mw-calendar:not(.mw-calendar-plain) {
156
+ --mw-scroll-hint-cover: var(--mw-card-background);
157
+ }
168
158
 
169
- // Anything that draws its own surface re-points the cover colour of a scroll
170
- // hint, so a tab bar or a wide table inside a card fades into the card and not
171
- // into the page behind it. Inherited, so nesting keeps working.
172
- .mw-card,
173
- .mw-panel,
174
- .mw-modal,
175
- .mw-tile,
176
- .mw-calendar:not(.mw-calendar-plain) {
177
- --mw-scroll-hint-cover: var(--mw-card-background);
178
- }
159
+ // The duration tokens cover everything built on them, the blanket rule below
160
+ // the few animations that name their own timing. 1ms and not 0: a zero-length
161
+ // transition never fires transitionend, and a script waiting for it would hang.
162
+ @media (prefers-reduced-motion: reduce) {
163
+ :root {
164
+ --mw-duration-instant: 1ms;
165
+ --mw-duration-fast: 1ms;
166
+ --mw-duration-base: 1ms;
167
+ --mw-duration-slow: 1ms;
168
+ --mw-duration-slower: 1ms;
169
+ }
179
170
 
180
- // ---------------------------------------------------------------------------
181
- // Reduced motion
182
- //
183
- // One switch for the whole framework. Turning the duration tokens down covers
184
- // everything built on them; the blanket rule underneath covers the handful of
185
- // animations that name their own timing, plus anything a project wrote itself.
186
- //
187
- // 1ms and not 0: a zero-length transition never fires transitionend, and any
188
- // script waiting for it to clean up - a modal removing a class, a toast
189
- // removing itself - would wait forever.
190
- // ---------------------------------------------------------------------------
191
- @media (prefers-reduced-motion: reduce) {
192
- :root {
193
- --mw-duration-instant: 1ms;
194
- --mw-duration-fast: 1ms;
195
- --mw-duration-base: 1ms;
196
- --mw-duration-slow: 1ms;
197
- --mw-duration-slower: 1ms;
198
- }
171
+ *,
172
+ *::before,
173
+ *::after {
174
+ animation-duration: 1ms !important;
175
+ animation-delay: 0ms !important;
176
+ animation-iteration-count: 1 !important;
177
+ transition-duration: 1ms !important;
178
+ transition-delay: 0ms !important;
179
+ }
199
180
 
200
- *,
201
- *::before,
202
- *::after {
203
- animation-duration: 1ms !important;
204
- animation-delay: 0ms !important;
205
- animation-iteration-count: 1 !important;
206
- transition-duration: 1ms !important;
207
- transition-delay: 0ms !important;
181
+ html {
182
+ scroll-behavior: auto;
183
+ }
208
184
  }
209
185
 
210
- html {
211
- scroll-behavior: auto;
186
+ // Without this a theme flip starts ~5900 concurrent transitions at once
187
+ .mw-theme-switching,
188
+ .mw-theme-switching *,
189
+ .mw-theme-switching *::before,
190
+ .mw-theme-switching *::after {
191
+ transition: none !important;
212
192
  }
213
193
  }
@@ -1,125 +1,127 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- *,
4
- *::before,
5
- *::after {
6
- margin: 0;
7
- padding: 0;
8
- box-sizing: border-box;
9
- }
3
+ @layer mw.reset {
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ margin: 0;
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ }
10
11
 
11
- html {
12
- scroll-behavior: smooth;
13
- min-width: 320px;
14
- scroll-padding-top: var(--mw-header-height);
15
- -webkit-text-size-adjust: 100%;
16
- text-size-adjust: 100%;
17
- @include scrollbar(var(--mw-border), transparent);
18
- }
12
+ html {
13
+ scroll-behavior: smooth;
14
+ min-width: 320px;
15
+ scroll-padding-top: var(--mw-header-height);
16
+ -webkit-text-size-adjust: 100%;
17
+ text-size-adjust: 100%;
18
+ @include scrollbar(var(--mw-border), transparent);
19
+ }
19
20
 
20
- body {
21
- background: var(--mw-page-background);
22
- overflow-wrap: break-word;
23
- -webkit-font-smoothing: antialiased;
24
- -moz-osx-font-smoothing: grayscale;
21
+ body {
22
+ background: var(--mw-page-background);
23
+ overflow-wrap: break-word;
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
25
26
 
26
- &:has(.mw-modal-open) {
27
- overflow: hidden;
28
- height: 100vh;
27
+ &:has(.mw-modal-open) {
28
+ overflow: hidden;
29
+ height: 100vh;
30
+ }
29
31
  }
30
- }
31
32
 
32
- // The UA rule behind the `hidden` attribute is `[hidden] { display: none }`, and
33
- // every component in here that sets its own `display` beats it on specificity -
34
- // a hidden `mw-tag` or `mw-btn` stays on screen. `!important` is the only thing
35
- // that wins against a class, and it is also what Angular's `[hidden]` binding
36
- // and every `el.hidden = true` in an application expect to happen.
37
- [hidden] {
38
- display: none !important;
39
- }
33
+ // The UA rule behind the `hidden` attribute is `[hidden] { display: none }`, and
34
+ // every component in here that sets its own `display` beats it on specificity -
35
+ // a hidden `mw-tag` or `mw-btn` stays on screen. `!important` is the only thing
36
+ // that wins against a class, and it is also what Angular's `[hidden]` binding
37
+ // and every `el.hidden = true` in an application expect to happen.
38
+ [hidden] {
39
+ display: none !important;
40
+ }
40
41
 
41
- // A selection in the browser default blue on a deep blue page is the one bit of
42
- // chrome that gives away that nobody looked. Brand tint, kept translucent so it
43
- // works over a card, a code block and an image caption alike.
44
- ::selection {
45
- background: color-mix(in srgb, var(--mw-primary-color) 55%, transparent);
46
- color: var(--mw-text-color);
47
- }
42
+ // A selection in the browser default blue on a deep blue page is the one bit of
43
+ // chrome that gives away that nobody looked. Brand tint, kept translucent so it
44
+ // works over a card, a code block and an image caption alike.
45
+ ::selection {
46
+ background: color-mix(in srgb, var(--mw-primary-color) 55%, transparent);
47
+ color: var(--mw-text-color);
48
+ }
48
49
 
49
- a {
50
- text-decoration: none;
51
- color: var(--mw-text-muted-color);
52
- transition: var(--mw-transition);
53
- @include tappable;
54
- @include focus-ring(2px);
55
- }
50
+ a {
51
+ text-decoration: none;
52
+ color: var(--mw-text-muted-color);
53
+ transition: var(--mw-transition);
54
+ @include tappable;
55
+ @include focus-ring(2px);
56
+ }
56
57
 
57
- ul {
58
- list-style: none;
59
- }
58
+ ul {
59
+ list-style: none;
60
+ }
60
61
 
61
- hr {
62
- margin: spacing('3') 0;
63
- color: var(--mw-text-muted-color);
64
- border: 0;
65
- border-top: 1px solid currentcolor;
66
- opacity: 0.35;
67
- }
62
+ hr {
63
+ margin: spacing('3') 0;
64
+ color: var(--mw-text-muted-color);
65
+ border: 0;
66
+ border-top: 1px solid currentcolor;
67
+ opacity: 0.35;
68
+ }
68
69
 
69
- img {
70
- max-width: 100%;
71
- height: auto;
72
- display: block;
73
- }
70
+ img {
71
+ max-width: 100%;
72
+ height: auto;
73
+ display: block;
74
+ }
74
75
 
75
- button {
76
- background: none;
77
- border: none;
78
- cursor: pointer;
79
- font-family: inherit;
80
- color: inherit;
81
- @include tappable;
82
- }
76
+ button {
77
+ background: none;
78
+ border: none;
79
+ cursor: pointer;
80
+ font-family: inherit;
81
+ color: inherit;
82
+ @include tappable;
83
+ }
83
84
 
84
- input,
85
- textarea,
86
- select {
87
- font-family: inherit;
88
- }
85
+ input,
86
+ textarea,
87
+ select {
88
+ font-family: inherit;
89
+ }
89
90
 
90
- // A control the framework has no component for - a bare <summary>, a
91
- // contenteditable, an element carrying tabindex - still gets a ring.
92
- :focus-visible {
93
- outline: var(--mw-focus-ring-width) solid var(--mw-focus-ring-color);
94
- outline-offset: var(--mw-focus-ring-offset);
95
- }
91
+ // A control the framework has no component for - a bare <summary>, a
92
+ // contenteditable, an element carrying tabindex - still gets a ring.
93
+ :focus-visible {
94
+ outline: var(--mw-focus-ring-width) solid var(--mw-focus-ring-color);
95
+ outline-offset: var(--mw-focus-ring-offset);
96
+ }
96
97
 
97
- // Media that has to fit its box without distorting. `height: auto` alone keeps
98
- // the aspect ratio only while nothing else sets a height.
99
- img,
100
- svg,
101
- video,
102
- canvas {
103
- max-width: 100%;
104
- }
98
+ // Media that has to fit its box without distorting. `height: auto` alone keeps
99
+ // the aspect ratio only while nothing else sets a height.
100
+ img,
101
+ svg,
102
+ video,
103
+ canvas {
104
+ max-width: 100%;
105
+ }
105
106
 
106
- table {
107
- border-collapse: collapse;
108
- width: 100%;
109
- }
107
+ table {
108
+ border-collapse: collapse;
109
+ width: 100%;
110
+ }
110
111
 
111
- th,
112
- td {
113
- border: 1px solid var(--mw-border);
114
- padding: spacing('1') spacing('2');
115
- text-align: left;
116
- }
112
+ th,
113
+ td {
114
+ border: 1px solid var(--mw-border);
115
+ padding: spacing('1') spacing('2');
116
+ text-align: left;
117
+ }
117
118
 
118
- th {
119
- background: var(--mw-primary-color);
120
- color: var(--mw-primary-accent-text-color);
121
- }
119
+ th {
120
+ background: var(--mw-primary-color);
121
+ color: var(--mw-primary-accent-text-color);
122
+ }
122
123
 
123
- tbody tr:nth-child(even) {
124
- background: var(--mw-gray-background);
124
+ tbody tr:nth-child(even) {
125
+ background: var(--mw-gray-background);
126
+ }
125
127
  }