mnfst 0.5.195 → 0.5.196

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.
@@ -10,13 +10,18 @@
10
10
 
11
11
  @layer base {
12
12
 
13
+ /* Animates `scale`, not `transform`. With fill mode `both` a transform
14
+ animation keeps its final value forever, which silently overrides any
15
+ transform an author put on a popover — so a menu positioned with
16
+ translate(-50%) simply would not move. The standalone property leaves
17
+ transform free. */
13
18
  @keyframes mnfst-popover-in {
14
19
  from {
15
- transform: scale(.9)
20
+ scale: .9
16
21
  }
17
22
 
18
23
  to {
19
- transform: none
24
+ scale: 1
20
25
  }
21
26
  }
22
27
 
@@ -2547,6 +2547,11 @@ function initializeColorpickerPlugin() {
2547
2547
 
2548
2548
  const isDialog = target.tagName === 'DIALOG';
2549
2549
 
2550
+ // A generated panel is appended to <body>, so manifest.dialog.css can't
2551
+ // tell from DOM position that it belongs to a swatch inside a dialog
2552
+ // rather than to the page behind it, and fades it out. Say so here.
2553
+ if (el.closest('[popover]')) target.setAttribute('data-popover-nested', '');
2554
+
2550
2555
  // Non-dialog popover targets route through x-dropdown (anchored like
2551
2556
  // a dropdown). <dialog> targets open imperatively on click instead
2552
2557
  // (modal/centered, not trigger-anchored).
@@ -2568,7 +2573,9 @@ function initializeColorpickerPlugin() {
2568
2573
  e.preventDefault();
2569
2574
  try {
2570
2575
  if (target.hasAttribute('popover')) {
2571
- if (!target.matches(':popover-open')) target.showPopover();
2576
+ // `source` names the swatch as the invoker, so opening the
2577
+ // panel can't light-dismiss a dialog or menu it sits inside.
2578
+ if (!target.matches(':popover-open')) target.showPopover({ source: el });
2572
2579
  } else {
2573
2580
  if (!target.open) target.showModal();
2574
2581
  }