maverick-wave 5.4.0 → 5.5.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.
@@ -83,27 +83,51 @@
83
83
  }
84
84
  }
85
85
 
86
+ // A grid row from `0fr` to `1fr`, and not `height: 0` to `auto`: `auto` is
87
+ // not an animatable value, and `interpolate-size`, which would make it one,
88
+ // is Chrome's alone - Firefox and Safari jumped the panel open instead of
89
+ // running the 900ms. A fraction interpolates in all three.
86
90
  &-content {
87
- height: spacing('0');
91
+ display: grid;
92
+ grid-template-rows: 0fr;
88
93
  overflow: hidden;
89
- transition: height var(--mw-duration-slower) var(--mw-ease-out);
94
+ transition: grid-template-rows var(--mw-duration-slower)
95
+ var(--mw-ease-out);
90
96
  background: var(--mw-card-background);
91
- interpolate-size: allow-keywords;
92
97
 
93
98
  &-inner {
94
- padding: spacing('4');
95
- border-top: 1px solid var(--mw-border-accent);
99
+ // The row is never shorter than what the item contributes, and padding
100
+ // and a border do not collapse with it - so both travel along, or the
101
+ // shut panel keeps a 25px strip of itself on screen. No `overflow` here
102
+ // on purpose: the panel above already clips, and clipping twice would
103
+ // hide the overflow that makes a long panel scrollable.
104
+ min-height: 0;
105
+ padding: spacing('0') spacing('4');
106
+ border-top: 0 solid var(--mw-border-accent);
107
+ transition:
108
+ padding-block var(--mw-duration-slower) var(--mw-ease-out),
109
+ border-top-width var(--mw-duration-slower) var(--mw-ease-out);
110
+
96
111
  @include media-down('sm') {
97
112
  font-size: font-size('sm');
98
113
  }
99
114
  }
100
115
 
101
116
  @include active() {
102
- height: auto;
117
+ grid-template-rows: 1fr;
103
118
  max-height: 500px;
104
119
  overflow-y: auto;
105
120
 
106
- // Scrollbar styling
121
+ > .mw-accordion-content-inner {
122
+ padding-block: spacing('4');
123
+ border-top-width: 1px;
124
+ }
125
+
126
+ // Both spellings: the standard pair is what Firefox reads, the webkit
127
+ // pseudos are for Safari below 18.2.
128
+ scrollbar-width: thin;
129
+ scrollbar-color: var(--mw-primary-color-hover) var(--mw-card-background);
130
+
107
131
  &::-webkit-scrollbar {
108
132
  width: 6px;
109
133
  }
@@ -9,7 +9,7 @@
9
9
  flex-direction: column;
10
10
  gap: spacing('3');
11
11
  width: min(380px, calc(100vw - #{2 * spacing('5')}));
12
- max-height: calc(100vh - #{2 * spacing('5')});
12
+ max-height: calc(100dvh - #{2 * spacing('5')});
13
13
  overflow-y: auto;
14
14
  pointer-events: none;
15
15
 
@@ -38,10 +38,14 @@
38
38
  transform: scale(1.1);
39
39
  }
40
40
 
41
+ // Same fill and ring as the webkit thumb above - Firefox paints its own
42
+ // grey thumb unless `background` is set, so leaving it out is not the same
43
+ // declaration set, it is a different slider.
41
44
  &::-moz-range-thumb {
42
45
  width: spacing('5');
43
46
  height: spacing('5');
44
- border: 2px solid var(--fill);
47
+ background: var(--fill);
48
+ border: 2px solid var(--mw-border);
45
49
  border-radius: radius('full');
46
50
  transition:
47
51
  transform var(--mw-duration-fast) var(--mw-ease-out),
@@ -55,20 +59,6 @@
55
59
  background: transparent;
56
60
  }
57
61
 
58
- // IE
59
- &::-ms-fill-lower {
60
- background: var(--fill);
61
- }
62
- &::-ms-fill-upper {
63
- background: var(--track);
64
- }
65
- &::-ms-thumb {
66
- width: spacing('5');
67
- height: spacing('5');
68
- border: 2px solid var(--fill);
69
- border-radius: radius('full');
70
- }
71
-
72
62
  &-sm {
73
63
  height: 6px;
74
64
  &::-webkit-slider-thumb {
@@ -79,10 +69,6 @@
79
69
  width: spacing('4');
80
70
  height: spacing('4');
81
71
  }
82
- &::-ms-thumb {
83
- width: spacing('4');
84
- height: spacing('4');
85
- }
86
72
  }
87
73
  &-lg {
88
74
  height: 16px;
@@ -95,10 +81,6 @@
95
81
  width: spacing('6');
96
82
  height: spacing('6');
97
83
  }
98
- &::-ms-thumb {
99
- width: spacing('6');
100
- height: spacing('6');
101
- }
102
84
  }
103
85
  &:disabled {
104
86
  opacity: 0.3;
@@ -63,6 +63,39 @@
63
63
  }
64
64
  }
65
65
 
66
+ // Firefox ships no scroll timelines, so there the script toggles these
67
+ // classes instead (main.js) - the same two positions, triggered instead of
68
+ // scrubbed. State and transition are separate because the script sets the
69
+ // state a frame earlier: together they would send the bar sliding away in
70
+ // front of the reader instead of having it gone already.
71
+ @media (prefers-reduced-motion: no-preference) {
72
+ .mw-header-reveal.mw-header-away {
73
+ top: calc(-1 * var(--mw-header-reveal-offset));
74
+ opacity: 0;
75
+ }
76
+
77
+ .mw-header-driven {
78
+ // The shared list plus `top`, which is not in it - writing only `top`
79
+ // here would drop the header's own colour and shadow transitions.
80
+ transition:
81
+ var(--mw-transition),
82
+ top var(--mw-duration-slow) var(--mw-ease-out);
83
+ }
84
+
85
+ .mw-announcement.mw-announcement-away {
86
+ transform: translateY(
87
+ calc(-1 * (var(--mw-header-height) + var(--mw-announcement-height)))
88
+ );
89
+ opacity: 0;
90
+ }
91
+
92
+ .mw-announcement-driven {
93
+ transition:
94
+ transform var(--mw-duration-slow) var(--mw-ease-out),
95
+ opacity var(--mw-duration-slow) var(--mw-ease-out);
96
+ }
97
+ }
98
+
66
99
  // `top` and not a transform: the off-canvas drawer inside the bar is
67
100
  // position: fixed, and a transform on the header would make it the drawer's
68
101
  // containing block - at every value, the resting one included.
@@ -146,6 +146,26 @@
146
146
  }
147
147
  }
148
148
 
149
+ // Firefox ships no scroll timelines, so there the script writes the progress
150
+ // and the travel is worked out here (main.js). Keeping the transform in CSS
151
+ // is what lets every depth variant above - and an inline
152
+ // `--mw-parallax-depth` - go on working untouched.
153
+ //
154
+ // 0 puts the layer at +depth and 1 at -depth, the two ends of the keyframes
155
+ // below. Declared and not only used, so the frame before the script has
156
+ // written anything sits at rest instead of nowhere.
157
+ @media (prefers-reduced-motion: no-preference) {
158
+ .mw-parallax-driven {
159
+ --mw-parallax-progress: 0.5;
160
+
161
+ transform: translate3d(
162
+ 0,
163
+ calc(var(--mw-parallax-depth) * (1 - 2 * var(--mw-parallax-progress))),
164
+ 0
165
+ );
166
+ }
167
+ }
168
+
149
169
  @keyframes mw-parallax {
150
170
  from {
151
171
  transform: translate3d(0, var(--mw-parallax-depth), 0);
@@ -36,6 +36,28 @@
36
36
  }
37
37
  }
38
38
 
39
+ // Firefox ships no scroll timelines at all, so there the script drives the
40
+ // same movement (main.js): `mw-reveal-hidden` while the element waits below
41
+ // the fold, `mw-reveal-run` once it enters. Both classes are added by the
42
+ // script and never by the markup - a page without JS keeps everything
43
+ // visible, which is what the guard above is for.
44
+ @media (prefers-reduced-motion: no-preference) {
45
+ .mw-reveal-hidden {
46
+ opacity: 0;
47
+ transform: translateY(40px);
48
+ }
49
+
50
+ .mw-reveal-run {
51
+ // `backwards` for the reason above - a forwards fill would pin the
52
+ // transform and cost the card its hover lift. The delay comes inline,
53
+ // from the element's column.
54
+ animation-name: mw-reveal;
55
+ animation-duration: var(--mw-duration-slower);
56
+ animation-timing-function: var(--mw-ease-out);
57
+ animation-fill-mode: backwards;
58
+ }
59
+ }
60
+
39
61
  @keyframes mw-reveal {
40
62
  from {
41
63
  opacity: 0;
@@ -1,5 +0,0 @@
1
- {
2
- "hook": {
3
- "consent": "accepted"
4
- }
5
- }
@@ -1,75 +0,0 @@
1
- {
2
- "version": 1,
3
- "sessions": {
4
- "5682ec58-6688-479f-994f-990ff918c05d": {
5
- "updatedAt": 1789084033412,
6
- "files": {
7
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/layout/_header.scss": {
8
- "editCount": 3,
9
- "findings": [],
10
- "stopBaseline": { "version": 1, "engine": "0.1.5", "counts": {} },
11
- "cleanAcked": true
12
- },
13
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/form-elements/_slider.scss": {
14
- "editCount": 1,
15
- "findings": [],
16
- "stopBaseline": { "version": 1, "engine": "0.1.5", "counts": {} },
17
- "cleanAcked": true
18
- },
19
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/js/main.js": {
20
- "editCount": 7,
21
- "findings": []
22
- },
23
- "/Users/m1well/Dev/workspace/css/maverick-wave/index.html": {
24
- "editCount": 2,
25
- "findings": [
26
- "low-contrast:0:3.3:1 (need 4.5:1) — text #7d85a5 on #313746",
27
- "pulsing-dot:0:.mw-spinner-dots>div — 16x16px dot with infinite \"mw-bounce\" animation",
28
- "dark-glow:0:Colored box-shadow glow (#d1bb21) on dark page"
29
- ]
30
- },
31
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/partials/typography-container.html": {
32
- "editCount": 2,
33
- "findings": [],
34
- "cleanAcked": true
35
- },
36
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/base/_base.scss": {
37
- "editCount": 2,
38
- "findings": [],
39
- "stopBaseline": { "version": 1, "engine": "0.1.5", "counts": {} },
40
- "cleanAcked": true
41
- },
42
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/layout/_section.scss": {
43
- "editCount": 7,
44
- "findings": [],
45
- "cleanAcked": true
46
- },
47
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/form-elements/_form.scss": {
48
- "editCount": 1,
49
- "findings": [],
50
- "stopBaseline": { "version": 1, "engine": "0.1.5", "counts": {} },
51
- "cleanAcked": true
52
- },
53
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/components/_alerts.scss": {
54
- "editCount": 1,
55
- "findings": ["side-tab:83"],
56
- "stopBaseline": {
57
- "version": 1,
58
- "engine": "0.1.5",
59
- "counts": {
60
- "62d926b4b80efa38e6fbf0fe65f45cf171d9b8a80be0b2ee47ac4cbb6c9498d0": 1
61
- }
62
- },
63
- "cleanAcked": true
64
- },
65
- "/Users/m1well/Dev/workspace/css/maverick-wave/src/scss/layout/_main.scss": {
66
- "editCount": 1,
67
- "findings": [],
68
- "stopBaseline": { "version": 1, "engine": "0.1.5", "counts": {} },
69
- "cleanAcked": true
70
- }
71
- },
72
- "footerShown": true
73
- }
74
- }
75
- }