maverick-wave 6.0.0 → 6.2.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": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "config": {
5
- "version_short": "6.0"
5
+ "version_short": "6.2"
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",
@@ -19,6 +19,10 @@
19
19
  // shape rather than a diamond stuck to a box.
20
20
  $_mw-tooltip-arrow-inset: $_mw-tooltip-gap +
21
21
  $_mw-tooltip-arrow - math.div($_mw-tooltip-arrow-side, 2);
22
+ // No room above in a top-edge bar; `:is`, not `:where`, to weigh like .mw-tooltip-below
23
+ $_mw-tooltip-top-bars: ':is(.mw-header, .mw-app-topbar, .mw-tooltips-below)';
24
+ // Not the header: its backdrop-filter makes it the containing block of `fixed`
25
+ $_mw-tooltip-anchored-bars: ':is(.mw-app-topbar, .mw-tooltips-below)';
22
26
 
23
27
  [data-tooltip] {
24
28
  position: relative;
@@ -84,7 +88,8 @@
84
88
  // itself. Leave that cleared and the box falls to its static position, which
85
89
  // for a pseudo element is inside the trigger it is supposed to sit above.
86
90
  // The three rules under this one then move the one edge each of them owns.
87
- &:is(.mw-tooltip-below, .mw-tooltip-end, .mw-tooltip-start) {
91
+ &:is(.mw-tooltip-below, .mw-tooltip-end, .mw-tooltip-start),
92
+ #{$_mw-tooltip-top-bars} & {
88
93
  &::before,
89
94
  &::after {
90
95
  position: absolute;
@@ -103,7 +108,8 @@
103
108
  }
104
109
  }
105
110
 
106
- &.mw-tooltip-below {
111
+ &.mw-tooltip-below,
112
+ #{$_mw-tooltip-top-bars} & {
107
113
  &::before {
108
114
  top: 100%;
109
115
  bottom: auto;
@@ -171,6 +177,8 @@
171
177
  &::before,
172
178
  &::after {
173
179
  position: fixed;
180
+ // Spelled out: before Chrome 154 the default was `none` and the bubble fell into the trigger
181
+ position-anchor: auto;
174
182
  // The absolute placement these replace - left as-is they fight the
175
183
  // position-area, which resolves the inset properties itself.
176
184
  bottom: auto;
@@ -201,6 +209,29 @@
201
209
  margin: 0 0 0 $_mw-tooltip-arrow-inset;
202
210
  }
203
211
  }
212
+
213
+ // Below, still anchored - a trigger that truncates its label clips a positioned bubble
214
+ #{$_mw-tooltip-anchored-bars} & {
215
+ &::before,
216
+ &::after {
217
+ position: fixed;
218
+ top: auto;
219
+ bottom: auto;
220
+ left: auto;
221
+ }
222
+
223
+ &::before {
224
+ position-area: block-end;
225
+ transform: none;
226
+ margin: ($_mw-tooltip-gap + $_mw-tooltip-arrow) 0 0;
227
+ }
228
+
229
+ &::after {
230
+ position-area: block-end;
231
+ transform: rotate(45deg);
232
+ margin: $_mw-tooltip-arrow-inset 0 0;
233
+ }
234
+ }
204
235
  }
205
236
  }
206
237
  }