sheer-ui 0.3.0 → 0.3.1

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,6 +1,6 @@
1
1
  {
2
2
  "name": "sheer-ui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Svelte 5 UI component library with Tailwind CSS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -569,6 +569,28 @@ body:has([data-text-selection-guard]) {
569
569
  }
570
570
  }
571
571
 
572
+ /* Without anchor positioning (iOS Safari ≤18, Firefox ESR 140; ~11% 2026-08) every surface
573
+ centers on screen instead of hanging off its trigger. The UA popover default already
574
+ centers (inset 0, auto margins, fit-content box), but preflight's `* { margin: 0 }` sends it
575
+ to the top-left and a consumer's `w-auto!` stretches it edge to edge, since an auto width
576
+ between two insets is solved, not shrunk; the fit-content caps restore the box. The JS
577
+ floating surfaces carry inline `inset: auto` and collision margins, hence the importants.
578
+ Delete once ESR 140 is out of support and iOS 18 is under 1%. */
579
+ @supports not (anchor-name: --a) {
580
+ [data-anchored] {
581
+ inset: 0;
582
+ margin: auto;
583
+ max-width: fit-content;
584
+ height: fit-content;
585
+ }
586
+ [data-floating-content] {
587
+ inset: 0 !important;
588
+ margin: auto !important;
589
+ max-width: fit-content;
590
+ height: fit-content;
591
+ }
592
+ }
593
+
572
594
  /* An exiting anchored surface (still shown while its [data-state=closed] fade runs, hidden by
573
595
  the deferred hidePopover) must not catch the pointer. Shared here, not restated per surface. */
574
596
  [data-anchored][data-state='closed'] {