maverick-wave 4.13.0 → 4.14.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": "4.13.0",
3
+ "version": "4.14.0",
4
4
  "config": {
5
- "version_short": "4.13"
5
+ "version_short": "4.14"
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",
@@ -10,37 +10,37 @@
10
10
 
11
11
  <h3 class="mw-mb-4">Grid with 1 Column</h3>
12
12
  <div class="mw-grid-1 mw-mb-6">
13
- <div class="mw-card mw-card-simple">Column 1</div>
13
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
14
14
  </div>
15
15
 
16
16
  <h3 class="mw-mb-4">Grid with 2 Columns</h3>
17
17
  <div class="mw-grid-2 mw-mb-6">
18
- <div class="mw-card mw-card-simple">Column 1</div>
19
- <div class="mw-card mw-card-simple">Column 2</div>
18
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
19
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
20
20
  </div>
21
21
 
22
22
  <h3 class="mw-mb-4">Grid with 3 Columns</h3>
23
23
  <div class="mw-grid-3 mw-mb-6">
24
- <div class="mw-card mw-card-simple">Column 1</div>
25
- <div class="mw-card mw-card-simple">Column 2</div>
26
- <div class="mw-card mw-card-simple">Column 3</div>
24
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
25
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
26
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 3</div>
27
27
  </div>
28
28
 
29
29
  <h3 class="mw-mb-4">Grid with 4 Columns</h3>
30
30
  <div class="mw-grid-4 mw-mb-6">
31
- <div class="mw-card mw-card-simple">Column 1</div>
32
- <div class="mw-card mw-card-simple">Column 2</div>
33
- <div class="mw-card mw-card-simple">Column 3</div>
34
- <div class="mw-card mw-card-simple">Column 4</div>
31
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
32
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
33
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 3</div>
34
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 4</div>
35
35
  </div>
36
36
 
37
37
  <h3 class="mw-mb-4">Grid with 5 Columns</h3>
38
38
  <div class="mw-grid-5 mw-mb-6">
39
- <div class="mw-card mw-card-simple">Column 1</div>
40
- <div class="mw-card mw-card-simple">Column 2</div>
41
- <div class="mw-card mw-card-simple">Column 3</div>
42
- <div class="mw-card mw-card-simple">Column 4</div>
43
- <div class="mw-card mw-card-simple">Column 5</div>
39
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
40
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
41
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 3</div>
42
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 4</div>
43
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 5</div>
44
44
  </div>
45
45
 
46
46
  <h3 class="mw-mb-3">Flexible Grid with Column Spans</h3>
@@ -48,9 +48,13 @@
48
48
  12-column grid with custom spans: 2 columns + 4 columns + 1 column
49
49
  </p>
50
50
  <div class="mw-grid-flex mw-mb-6">
51
- <div class="mw-col-span-2 mw-card mw-card-simple">Span 2 Columns</div>
52
- <div class="mw-col-span-4 mw-card mw-card-simple">Span 4 Columns</div>
53
- <div class="mw-col-span-1 mw-card mw-card-simple">1 col</div>
51
+ <div class="mw-col-span-2 mw-card mw-card-simple mw-corner-plain">
52
+ Span 2 Columns
53
+ </div>
54
+ <div class="mw-col-span-4 mw-card mw-card-simple mw-corner-plain">
55
+ Span 4 Columns
56
+ </div>
57
+ <div class="mw-col-span-1 mw-card mw-card-simple mw-corner-plain">1 col</div>
54
58
  </div>
55
59
 
56
60
  <h3 class="mw-mb-3">Mixed Column Spans</h3>
@@ -58,11 +62,15 @@
58
62
  Various column combinations: 3 + 6 + 3 columns
59
63
  </p>
60
64
  <div class="mw-grid-flex mw-mb-6">
61
- <div class="mw-col-span-3 mw-card mw-card-simple">Span 3 Columns</div>
62
- <div class="mw-col-span-6 mw-card mw-card-simple">
65
+ <div class="mw-col-span-3 mw-card mw-card-simple mw-corner-plain">
66
+ Span 3 Columns
67
+ </div>
68
+ <div class="mw-col-span-6 mw-card mw-card-simple mw-corner-plain">
63
69
  Span 6 Columns (Main Content)
64
70
  </div>
65
- <div class="mw-col-span-3 mw-card mw-card-simple">Span 3 Columns</div>
71
+ <div class="mw-col-span-3 mw-card mw-card-simple mw-corner-plain">
72
+ Span 3 Columns
73
+ </div>
66
74
  </div>
67
75
 
68
76
  <h3 class="mw-mb-3">Asymmetric Layout</h3>
@@ -70,8 +78,10 @@
70
78
  Sidebar + content layout: 4 + 8 columns
71
79
  </p>
72
80
  <div class="mw-grid-flex mw-mb-6">
73
- <div class="mw-col-span-4 mw-card mw-card-simple">Sidebar (4 cols)</div>
74
- <div class="mw-col-span-8 mw-card mw-card-simple">
81
+ <div class="mw-col-span-4 mw-card mw-card-simple mw-corner-plain">
82
+ Sidebar (4 cols)
83
+ </div>
84
+ <div class="mw-col-span-8 mw-card mw-card-simple mw-corner-plain">
75
85
  Main Content Area (8 cols)
76
86
  </div>
77
87
  </div>
@@ -83,46 +93,54 @@
83
93
  dynamic content.
84
94
  </p>
85
95
  <div class="mw-grid-auto-sm mw-mb-6">
86
- <div class="mw-card mw-card-simple">Product Card</div>
87
- <div class="mw-card mw-card-simple">Service Card</div>
88
- <div class="mw-card mw-card-simple">Team Member</div>
89
- <div class="mw-card mw-card-simple">Portfolio Item</div>
90
- <div class="mw-card mw-card-simple">Blog Post</div>
91
- <div class="mw-card mw-card-simple">Feature</div>
96
+ <div class="mw-card mw-card-simple mw-corner-plain">Product Card</div>
97
+ <div class="mw-card mw-card-simple mw-corner-plain">Service Card</div>
98
+ <div class="mw-card mw-card-simple mw-corner-plain">Team Member</div>
99
+ <div class="mw-card mw-card-simple mw-corner-plain">Portfolio Item</div>
100
+ <div class="mw-card mw-card-simple mw-corner-plain">Blog Post</div>
101
+ <div class="mw-card mw-card-simple mw-corner-plain">Feature</div>
92
102
  </div>
93
103
 
94
104
  <h3 class="mw-mb-4">Grid with 3 Columns - Default Spacing</h3>
95
105
  <div class="mw-grid-3 mw-mb-6">
96
- <div class="mw-card mw-card-simple">Column 1</div>
97
- <div class="mw-card mw-card-simple">Column 2</div>
98
- <div class="mw-card mw-card-simple">Column 3</div>
106
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
107
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
108
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 3</div>
99
109
  </div>
100
110
 
101
111
  <h3 class="mw-mb-4">Grid with 3 Columns - Large Spacing</h3>
102
112
  <div class="mw-grid-3-lg mw-mb-6">
103
- <div class="mw-card mw-card-simple">Column 1</div>
104
- <div class="mw-card mw-card-simple">Column 2</div>
105
- <div class="mw-card mw-card-simple">Column 3</div>
113
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 1</div>
114
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 2</div>
115
+ <div class="mw-card mw-card-simple mw-corner-plain">Column 3</div>
106
116
  </div>
107
117
 
108
118
  <h3 class="mw-mb-4">Flexible Grid - Default Spacing</h3>
109
119
  <div class="mw-grid-flex mw-mb-6">
110
- <div class="mw-col-span-4 mw-card mw-card-simple">4 Columns</div>
111
- <div class="mw-col-span-8 mw-card mw-card-simple">8 Columns</div>
120
+ <div class="mw-col-span-4 mw-card mw-card-simple mw-corner-plain">
121
+ 4 Columns
122
+ </div>
123
+ <div class="mw-col-span-8 mw-card mw-card-simple mw-corner-plain">
124
+ 8 Columns
125
+ </div>
112
126
  </div>
113
127
 
114
128
  <h3 class="mw-mb-4">Flexible Grid - Large Spacing</h3>
115
129
  <div class="mw-grid-flex-lg mw-mb-6">
116
- <div class="mw-col-span-4 mw-card mw-card-simple">4 Columns</div>
117
- <div class="mw-col-span-8 mw-card mw-card-simple">8 Columns</div>
130
+ <div class="mw-col-span-4 mw-card mw-card-simple mw-corner-plain">
131
+ 4 Columns
132
+ </div>
133
+ <div class="mw-col-span-8 mw-card mw-card-simple mw-corner-plain">
134
+ 8 Columns
135
+ </div>
118
136
  </div>
119
137
 
120
138
  <h3 class="mw-mb-4">Auto Grid - Large Spacing</h3>
121
139
  <div class="mw-grid-auto-lg mw-mb-6">
122
- <div class="mw-card mw-card-simple">Auto 1</div>
123
- <div class="mw-card mw-card-simple">Auto 2</div>
124
- <div class="mw-card mw-card-simple">Auto 3</div>
125
- <div class="mw-card mw-card-simple">Auto 4</div>
140
+ <div class="mw-card mw-card-simple mw-corner-plain">Auto 1</div>
141
+ <div class="mw-card mw-card-simple mw-corner-plain">Auto 2</div>
142
+ <div class="mw-card mw-card-simple mw-corner-plain">Auto 3</div>
143
+ <div class="mw-card mw-card-simple mw-corner-plain">Auto 4</div>
126
144
  </div>
127
145
 
128
146
  <h3 class="mw-mb-4">Grid Stack - Natural Width (Left Aligned)</h3>
@@ -130,7 +148,7 @@
130
148
  <button class="mw-btn mw-btn-primary">Small Button</button>
131
149
  <button class="mw-btn mw-btn-secondary">Medium Length Button</button>
132
150
  <button class="mw-btn mw-btn-outline">Very Long Button Text Here</button>
133
- <div class="mw-card mw-card-simple" style="width: 200px">
151
+ <div class="mw-card mw-card-simple mw-corner-plain" style="width: 200px">
134
152
  Fixed Width Card
135
153
  </div>
136
154
  </div>
@@ -140,7 +158,7 @@
140
158
  <button class="mw-btn mw-btn-primary">Small Button</button>
141
159
  <button class="mw-btn mw-btn-secondary">Medium Length Button</button>
142
160
  <button class="mw-btn mw-btn-outline">Very Long Button Text Here</button>
143
- <div class="mw-card mw-card-simple" style="width: 200px">
161
+ <div class="mw-card mw-card-simple mw-corner-plain" style="width: 200px">
144
162
  Fixed Width Card
145
163
  </div>
146
164
  </div>
@@ -150,7 +168,7 @@
150
168
  <button class="mw-btn mw-btn-primary">Small Button</button>
151
169
  <button class="mw-btn mw-btn-secondary">Medium Length Button</button>
152
170
  <button class="mw-btn mw-btn-outline">Very Long Button Text Here</button>
153
- <div class="mw-card mw-card-simple" style="width: 200px">
171
+ <div class="mw-card mw-card-simple mw-corner-plain" style="width: 200px">
154
172
  Fixed Width Card
155
173
  </div>
156
174
  </div>
@@ -160,12 +178,14 @@
160
178
  <button class="mw-btn mw-btn-primary">Small Button</button>
161
179
  <button class="mw-btn mw-btn-secondary">Medium Length Button</button>
162
180
  <button class="mw-btn mw-btn-outline">Very Long Button Text Here</button>
163
- <div class="mw-card mw-card-simple">Full Width Card</div>
181
+ <div class="mw-card mw-card-simple mw-corner-plain">Full Width Card</div>
164
182
  </div>
165
183
 
166
184
  <h3 class="mw-mb-4">Grid Stack - Large Spacing & Centered</h3>
167
185
  <div class="mw-grid-stack-center-lg mw-mb-6">
168
186
  <button class="mw-btn mw-btn-primary">Button 1</button>
169
187
  <button class="mw-btn mw-btn-secondary">Button 2</button>
170
- <div class="mw-card mw-card-simple" style="width: 300px">Centered Card</div>
188
+ <div class="mw-card mw-card-simple mw-corner-plain" style="width: 300px">
189
+ Centered Card
190
+ </div>
171
191
  </div>
@@ -26,12 +26,17 @@
26
26
  </p>
27
27
 
28
28
  <div class="mw-card mw-card-simple mw-mb-4">
29
- <div class="mw-card mw-card-simple mw-mx-auto" style="width: 60%">
29
+ <div
30
+ class="mw-card mw-card-simple mw-corner-plain mw-mx-auto"
31
+ style="width: 60%"
32
+ >
30
33
  mw-mx-auto
31
34
  </div>
32
35
  </div>
33
36
 
34
- <div class="mw-card mw-card-simple mw-d-flex mw-items-center mw-gap-3">
37
+ <div
38
+ class="mw-card mw-card-simple mw-corner-plain mw-d-flex mw-items-center mw-gap-3"
39
+ >
35
40
  <span>Left</span>
36
41
  <span class="mw-tag mw-tag-primary mw-ml-auto">mw-ml-auto</span>
37
42
  </div>
@@ -43,18 +48,18 @@
43
48
  <div class="mw-card mw-card-simple mw-mb-4">
44
49
  <h4 class="mw-mb-2">Flex Row</h4>
45
50
  <div class="mw-d-flex mw-justify-between mw-gap-3">
46
- <div class="mw-card mw-card-simple mw-p-2">Item 1</div>
47
- <div class="mw-card mw-card-simple mw-p-2">Item 2</div>
48
- <div class="mw-card mw-card-simple mw-p-2">Item 3</div>
51
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 1</div>
52
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 2</div>
53
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 3</div>
49
54
  </div>
50
55
  </div>
51
56
 
52
57
  <div class="mw-card mw-card-simple mw-mb-4">
53
58
  <h4 class="mw-mb-2">Flex Column</h4>
54
59
  <div class="mw-d-flex mw-flex-column mw-gap-3">
55
- <div class="mw-card mw-card-simple mw-p-2">Item 1</div>
56
- <div class="mw-card mw-card-simple mw-p-2">Item 2</div>
57
- <div class="mw-card mw-card-simple mw-p-2">Item 3</div>
60
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 1</div>
61
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 2</div>
62
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">Item 3</div>
58
63
  </div>
59
64
  </div>
60
65
 
@@ -64,8 +69,12 @@
64
69
  class="mw-d-flex mw-justify-center mw-items-center mw-gap-3"
65
70
  style="height: 90px"
66
71
  >
67
- <div class="mw-card mw-card-simple mw-p-2">Centered</div>
68
- <div class="mw-card mw-card-simple mw-p-2">Centered</div>
72
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">
73
+ Centered
74
+ </div>
75
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">
76
+ Centered
77
+ </div>
69
78
  </div>
70
79
  </div>
71
80
 
@@ -76,10 +85,20 @@
76
85
  <code>mw-self-*</code> lets a single child break out of it.
77
86
  </p>
78
87
  <div class="mw-d-flex mw-items-stretch mw-gap-3" style="height: 130px">
79
- <div class="mw-card mw-card-simple mw-p-2">stretch</div>
80
- <div class="mw-card mw-card-simple mw-p-2 mw-self-start">start</div>
81
- <div class="mw-card mw-card-simple mw-p-2 mw-self-center">center</div>
82
- <div class="mw-card mw-card-simple mw-p-2 mw-self-end">end</div>
88
+ <div class="mw-card mw-card-simple mw-p-2 mw-corner-plain">stretch</div>
89
+ <div
90
+ class="mw-card mw-card-simple mw-p-2 mw-self-start mw-corner-plain"
91
+ >
92
+ start
93
+ </div>
94
+ <div
95
+ class="mw-card mw-card-simple mw-p-2 mw-self-center mw-corner-plain"
96
+ >
97
+ center
98
+ </div>
99
+ <div class="mw-card mw-card-simple mw-p-2 mw-self-end mw-corner-plain">
100
+ end
101
+ </div>
83
102
  </div>
84
103
  </div>
85
104
  </div>
@@ -92,30 +111,30 @@
92
111
  <div class="mw-mb-4">
93
112
  <p class="mw-mb-2">Small gap (gap-2)</p>
94
113
  <div class="mw-d-flex mw-gap-2 mw-flex-wrap">
95
- <div class="mw-card mw-card-simple">Item</div>
96
- <div class="mw-card mw-card-simple">Item</div>
97
- <div class="mw-card mw-card-simple">Item</div>
98
- <div class="mw-card mw-card-simple">Item</div>
114
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
115
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
116
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
117
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
99
118
  </div>
100
119
  </div>
101
120
 
102
121
  <div class="mw-mb-4">
103
122
  <p class="mw-mb-2">Medium gap (gap-4)</p>
104
123
  <div class="mw-d-flex mw-gap-4 mw-flex-wrap">
105
- <div class="mw-card mw-card-simple">Item</div>
106
- <div class="mw-card mw-card-simple">Item</div>
107
- <div class="mw-card mw-card-simple">Item</div>
108
- <div class="mw-card mw-card-simple">Item</div>
124
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
125
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
126
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
127
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
109
128
  </div>
110
129
  </div>
111
130
 
112
131
  <div>
113
132
  <p class="mw-mb-2">Large gap (gap-7)</p>
114
133
  <div class="mw-d-flex mw-gap-7 mw-flex-wrap">
115
- <div class="mw-card mw-card-simple">Item</div>
116
- <div class="mw-card mw-card-simple">Item</div>
117
- <div class="mw-card mw-card-simple">Item</div>
118
- <div class="mw-card mw-card-simple">Item</div>
134
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
135
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
136
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
137
+ <div class="mw-card mw-card-simple mw-corner-plain">Item</div>
119
138
  </div>
120
139
  </div>
121
140
  </div>
@@ -1,5 +1,6 @@
1
1
  @use 'sass:map';
2
2
  @use 'variables' as v;
3
+ @use 'functions' as *;
3
4
 
4
5
  // Media query mixins
5
6
  @mixin media-up($breakpoint) {
@@ -270,3 +271,72 @@
270
271
  text-decoration: underline;
271
272
  }
272
273
  }
274
+
275
+ // ---------------------------------------------------------------------------
276
+ // Surface
277
+ //
278
+ // The MaverickWave silhouette: sharp corners on the top-left/bottom-right
279
+ // diagonal, round ones on the other. Nine components repeated those four radii
280
+ // by hand - this is the only place the shape is defined now.
281
+ //
282
+ // On top of the radii, an accent arc on the two round corners. The asymmetry
283
+ // alone reads as an accident; a coloured bow sitting exactly on it does not.
284
+ // Point-symmetric like the radii themselves, so it holds up on a tall card, a
285
+ // wide panel and a square tile alike.
286
+ //
287
+ // The ring is drawn inside the padding box rather than on the border, because
288
+ // four of the callers clip with `overflow: hidden` and would swallow a ring
289
+ // sitting on the border edge. Hence $border-width: `inset: 0` already lands on
290
+ // the padding box, but the corner radius there is the outer one minus the
291
+ // border, and a ring drawn at the outer radius would visibly miss the curve.
292
+ //
293
+ // $corners drops the top arc for a surface whose top-right corner is already
294
+ // taken by a fill of its own - see the coloured panel headers.
295
+ // ---------------------------------------------------------------------------
296
+ @mixin surface($border-width: 1px, $corners: 'both') {
297
+ position: relative;
298
+ border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
299
+
300
+ &::after {
301
+ @include corner-accent($border-width, $corners);
302
+ }
303
+ }
304
+
305
+ // The arc on its own, for a variant that has to redraw it without restating the
306
+ // shape - it is already on the element by then.
307
+ @mixin corner-accent($border-width: 1px, $corners: 'both') {
308
+ $sharp: radius('sm') - $border-width;
309
+ $round: radius('xl') - $border-width;
310
+ // Opaque out to where the curve ends, fading from there - so the arc runs a
311
+ // little way into the straight edge instead of being cut off at the tangent.
312
+ //
313
+ // The 1.8 is the one number worth retuning here, and it is bounded by the
314
+ // shortest surface rather than by the nicest-looking card: the fade reaches
315
+ // from a corner, so on a 50px-high box - `mw-card-simple` with one line in it
316
+ // - anything past about 2 lets the two arcs meet in the middle and the pair
317
+ // stops reading as two corners and starts reading as a frame. Higher is
318
+ // softer on a tall card, lower is more defined on a short one.
319
+ $reach: $round * 1.8;
320
+ $top: radial-gradient(circle $reach at 100% 0, #000 $round, transparent 100%);
321
+ $bottom: radial-gradient(
322
+ circle $reach at 0 100%,
323
+ #000 $round,
324
+ transparent 100%
325
+ );
326
+
327
+ content: '';
328
+ position: absolute;
329
+ inset: 0;
330
+ pointer-events: none;
331
+ // 2px rather than 1px: in the dark theme --mw-border sits at OKLch lightness
332
+ // 0.32 and the arc tone at 0.41, so a hairline is separated from the plain
333
+ // border by little more than its saturation and vanishes at reading distance.
334
+ border: 2px solid var(--mw-corner-accent);
335
+ border-radius: $sharp $round $sharp $round;
336
+
337
+ @if $corners == 'bottom' {
338
+ mask-image: $bottom;
339
+ } @else {
340
+ mask-image: $top, $bottom;
341
+ }
342
+ }
@@ -505,6 +505,9 @@ $dark-theme-colors: (
505
505
  // Translucent accent line used for dividers, rules and outlines. Built from
506
506
  // the ink tone, not the fill tone, or the line disappears into the page.
507
507
  'border-accent': fade('dark-primary-text-color', 70%),
508
+ // The accent arc on the two round corners of every mw-surface. Full strength
509
+ // here: against a dark card the ink tone is the faintest it gets.
510
+ 'corner-accent': token('dark-primary-text-color'),
508
511
  );
509
512
 
510
513
  // Light theme colors. Emitted as --mw-light-<key>.
@@ -537,6 +540,10 @@ $light-theme-colors: (
537
540
  'danger-text-color': ink-on-light('danger-color'),
538
541
  'info-text-color': ink-on-light('info-color'),
539
542
  'border-accent': fade('light-primary-text-color', 70%),
543
+ // Held back a little against the dark theme: the same blue on a near-white
544
+ // card carries far more contrast than it does on a dark one, and at full
545
+ // strength the arc stops being a detail and starts being a frame.
546
+ 'corner-accent': fade('light-primary-text-color', 80%),
540
547
  );
541
548
 
542
549
  // Header/navbar colors. The bar is dark in both themes, so every tone here is
@@ -2,7 +2,7 @@
2
2
 
3
3
  .mw-accordion {
4
4
  border: 1px solid var(--mw-border);
5
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
5
+ @include surface;
6
6
  overflow: hidden;
7
7
  margin: spacing('2');
8
8
 
@@ -24,7 +24,7 @@ $_mw-calendar-dot-tones: (
24
24
  padding: spacing('5');
25
25
  background: var(--mw-card-background);
26
26
  border: 1px solid var(--mw-border);
27
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
27
+ @include surface;
28
28
  box-shadow: var(--mw-elevation-2);
29
29
  }
30
30
 
@@ -47,11 +47,10 @@ $_mw-card-addon-colors: (
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  background: var(--mw-card-background);
50
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
50
+ @include surface;
51
51
  box-shadow: var(--mw-elevation-2);
52
52
  border: 1px solid var(--mw-border);
53
53
  transition: var(--mw-transition);
54
- position: relative;
55
54
  // deliberately not `overflow: hidden` - that would also cut off anything a
56
55
  // child wants to show outside the card, a tooltip above a button being the
57
56
  // common case. Images round their own corners below, and only the ribbon
@@ -288,7 +288,7 @@ $_mw-kanban-ribbon-clearance-compact: 58px;
288
288
  background: var(--mw-card-background);
289
289
  border: 1px dashed var(--mw-primary-text-color);
290
290
  // Same silhouette as a ticket, so it reads as one being written
291
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
291
+ @include surface;
292
292
 
293
293
  &.mw-active {
294
294
  display: flex;
@@ -27,7 +27,7 @@
27
27
  // Modal container
28
28
  .mw-modal {
29
29
  background: var(--mw-card-background);
30
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
30
+ @include surface(0);
31
31
  box-shadow: var(--mw-elevation-5);
32
32
  max-width: 520px;
33
33
  width: 100%;
@@ -7,7 +7,7 @@
7
7
  padding: spacing('5');
8
8
  background: var(--mw-card-background);
9
9
  border: 1px solid var(--mw-border);
10
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
10
+ @include surface;
11
11
  box-shadow: var(--mw-elevation-2);
12
12
  }
13
13
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  .mw-panel {
4
4
  background: var(--mw-card-background);
5
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
5
+ @include surface(2px);
6
6
  border: 2px solid var(--mw-border);
7
7
  overflow: hidden;
8
8
  display: flex;
@@ -62,6 +62,15 @@
62
62
  }
63
63
  }
64
64
 
65
+ // The coloured header already owns the top-right corner. An arc drawn over it
66
+ // either disappears into the primary fill or fights the secondary one - a
67
+ // blue bow on an orange header reads as a rendering fault, not as a mark. The
68
+ // bottom corner carries it alone on these two.
69
+ &-primary::after,
70
+ &-secondary::after {
71
+ @include corner-accent(2px, 'bottom');
72
+ }
73
+
65
74
  // Scrollable variant for fixed height
66
75
  &-scrollable {
67
76
  max-height: 500px;
@@ -62,12 +62,11 @@
62
62
  // Base tile
63
63
  .mw-tile {
64
64
  background: var(--mw-card-background);
65
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
65
+ @include surface;
66
66
  padding: spacing('5');
67
67
  box-shadow: var(--mw-elevation-2);
68
68
  transition: var(--mw-transition);
69
69
  border: 1px solid var(--mw-border);
70
- position: relative;
71
70
  overflow: hidden;
72
71
  display: flex;
73
72
  flex-direction: column;
@@ -2,11 +2,10 @@
2
2
 
3
3
  .mw-login {
4
4
  background: var(--mw-card-background);
5
- border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
5
+ @include surface;
6
6
  box-shadow: var(--mw-elevation-2);
7
7
  transition: var(--mw-transition);
8
8
  border: 1px solid var(--mw-border);
9
- position: relative;
10
9
  overflow: hidden;
11
10
  width: min(340px, 85%);
12
11
  margin: spacing('2') auto;
@@ -0,0 +1,8 @@
1
+ @use '../abstracts' as *;
2
+
3
+ // Opt-out from the corner accent - the arc on the two round corners that every
4
+ // surface in the framework carries, see the surface() mixin. Everything else
5
+ // stays: the radii, the border, the shadow, the hover.
6
+ .mw-corner-plain::after {
7
+ content: none;
8
+ }
@@ -1,5 +1,6 @@
1
1
  @forward 'accessibility';
2
2
  @forward 'aspect';
3
+ @forward 'corner';
3
4
  @forward 'display';
4
5
  @forward 'elevation';
5
6
  @forward 'flex';