maverick-wave 5.31.0 → 5.33.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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "maverick-wave",
3
- "version": "5.31.0",
3
+ "version": "5.33.0",
4
4
  "config": {
5
- "version_short": "5.31"
5
+ "version_short": "5.33"
6
6
  },
7
7
  "description": "A lightweight, modern CSS framework for building responsive websites with elegance and speed.",
8
8
  "main": "src/js/main.js",
@@ -60,6 +60,8 @@ $hover-shift: 15% !default;
60
60
  // light one - and 0.58 is as low as that end goes without moving three colors.
61
61
  $ink-lightness-dark: 0.52 !default;
62
62
  $ink-lightness-light: 0.58 !default;
63
+ // On the hero photo 0.52 measured 1.2-2.7:1, 0.72 clears 3:1 and keeps the hue
64
+ $hero-ink-lightness: 0.72 !default;
63
65
  // How much primary the muted gray picks up, so it belongs to the palette. 0% is true gray.
64
66
  $muted-tint: 23% !default;
65
67
 
@@ -24,6 +24,8 @@
24
24
  // surface - inside it the quote keeps only the edge and the quotation marks
25
25
  // as its sign.
26
26
  blockquote {
27
+ // Grows with the card, or a short quote's tint stops halfway down it
28
+ flex-grow: 1;
27
29
  background: color-mix(in srgb, var(--mw-secondary-color) 6%, transparent);
28
30
  border-left-color: color-mix(
29
31
  in srgb,
@@ -31,6 +31,15 @@
31
31
  width: 85%;
32
32
  position: relative;
33
33
  margin: spacing('0') auto spacing('4');
34
+
35
+ // The hero is dark in both themes, the light theme's inks sink into it
36
+ @each $name, $value in $semantic-colors {
37
+ --mw-#{$name}-text-color: #{ink-on-dark(
38
+ '#{$name}-color',
39
+ $hero-ink-lightness
40
+ )};
41
+ }
42
+
34
43
  @include media-up('sm') {
35
44
  width: min(75%, 700px);
36
45
  }
@@ -45,9 +54,46 @@
45
54
  justify-items: start;
46
55
  text-align: left;
47
56
 
57
+ // 85% of a phone leaves a ragged strip right of left-aligned text
48
58
  .mw-home-text {
59
+ width: min(100%, 42rem);
49
60
  margin-inline: 0;
50
61
  }
62
+
63
+ .mw-home-actions {
64
+ margin-inline: 0;
65
+
66
+ @include media-up('sm') {
67
+ justify-content: flex-start;
68
+ }
69
+ }
70
+ }
71
+
72
+ // Two buttons that wrap onto two lines at their own widths read as a
73
+ // staircase, so a phone stacks them at one width instead
74
+ .mw-home-actions {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: spacing('4');
78
+ width: min(100%, 20rem);
79
+ margin-inline: auto;
80
+
81
+ @include media-up('sm') {
82
+ flex-direction: row;
83
+ flex-wrap: wrap;
84
+ justify-content: center;
85
+ gap: spacing('5');
86
+ width: auto;
87
+ }
88
+ }
89
+
90
+ // The rem floor matters: a pure vh band gives the least on a flat screen
91
+ .mw-home-bottom {
92
+ padding-block: spacing('6') spacing('4');
93
+
94
+ @include media-up('md') {
95
+ padding-block: spacing('9') clamp(5.5rem, 12vh, 9rem);
96
+ }
51
97
  }
52
98
 
53
99
  @keyframes mw-home-fade {
@@ -12,6 +12,24 @@
12
12
  counter-reset: mw-section-head;
13
13
  }
14
14
 
15
+ // The fixed header and the ribbon under it take no room in the flow. A page
16
+ // that opens with a hero lets them lie over the picture; every other page
17
+ // keeps the room free where it starts - a section or the content wrapper -
18
+ // on top of the space that one has anyway. The same tokens as
19
+ // scroll-padding-top, so a ribbon that is not there costs nothing.
20
+ body:has(.mw-header) .mw-main > .mw-section:first-child:not(:has(.mw-hero)) {
21
+ padding-top: calc(
22
+ var(--mw-header-height) + var(--mw-announcement-offset) +
23
+ var(--mw-section-padding-block)
24
+ );
25
+ }
26
+
27
+ body:has(.mw-header) .mw-main > .mw-content:first-child:not(:has(.mw-hero)) {
28
+ padding-top: calc(
29
+ var(--mw-header-height) + var(--mw-announcement-offset) + #{spacing('7')}
30
+ );
31
+ }
32
+
15
33
  // Takes the full container on a phone and steps inwards as the screen grows.
16
34
  // For a column of full-width cards, which at 1200px leaves more empty card
17
35
  // than content.
@@ -66,6 +84,11 @@
66
84
  z-index: z-index('card');
67
85
  }
68
86
 
87
+ // .mw-home sizes itself in % of this flex item, which must not shrink
88
+ > .mw-hero {
89
+ width: 100%;
90
+ }
91
+
69
92
  // Add `mw-parallax` here and a `.mw-parallax-media` child and the picture
70
93
  // becomes its own layer, free to drift or to stay pinned. It reads the
71
94
  // same token, so the image is still configured in one place - and a
@@ -159,6 +182,21 @@
159
182
  );
160
183
  }
161
184
  }
185
+
186
+ // Bottom text shares the lower edge with the cue below lg, phones too
187
+ &:has(.mw-home-bottom) {
188
+ align-items: flex-end;
189
+
190
+ @include media-down('lg') {
191
+ &:has(> .mw-scroll-hint) {
192
+ --mw-scroll-hint-reserve: #{spacing('10')};
193
+
194
+ padding-bottom: calc(
195
+ var(--mw-scroll-hint-offset) + var(--mw-scroll-hint-reserve)
196
+ );
197
+ }
198
+ }
199
+ }
162
200
  }
163
201
  }
164
202
 
@@ -158,8 +158,8 @@
158
158
  :is(.mw-parallax-sticky, .mw-parallax-slow) + *:not(.mw-parallax-sticky)
159
159
  ) {
160
160
  box-shadow:
161
- 0 -6px 12px rgb(0 0 0 / 45%),
162
- 0 -20px 44px rgb(0 0 0 / 26%);
161
+ 0 -8px 18px rgb(0 0 0 / 55%),
162
+ 0 -28px 60px rgb(0 0 0 / 38%);
163
163
  }
164
164
 
165
165
  // Ink on a photograph, the same pair the hero uses: the picture goes down, the
@@ -1,6 +1,7 @@
1
- // The same framework without the 48 components: tokens, reset, typography,
2
- // grid, container, section, header, footer and every utility. Add the
3
- // components the page actually uses next to it, each one its own file:
1
+ // The same framework without the components, bar the two at the end: tokens,
2
+ // reset, typography, grid, container, section, header, footer and every
3
+ // utility. Add the components the page actually uses next to it, each one its
4
+ // own file:
4
5
  //
5
6
  // @use 'maverick-wave/src/scss/main-lean' with ($primary-color: #1b1b1d);
6
7
  // @use 'maverick-wave/src/scss/components/buttons';
@@ -14,3 +15,7 @@
14
15
  @use 'base';
15
16
  @use 'layout';
16
17
  @use 'utilities';
18
+
19
+ // The layout uses these two: data-tooltip in the footer, the badge in the hero
20
+ @use 'components/tooltip';
21
+ @use 'components/hero-badge';