shelving 1.304.0 → 1.304.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": "shelving",
3
- "version": "1.304.0",
3
+ "version": "1.304.1",
4
4
  "author": "Dave Houlbrooke <dave@shax.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,7 +64,7 @@ function DeleteButton({ onConfirm }: { onConfirm: () => void }) {
64
64
 
65
65
  ## Styling
66
66
 
67
- `Dialog` paints the full-screen overlay and resets the browser's default `<dialog>` border, size limits, and `::backdrop`. The inner panel comes from its children, usually `<Modal>`. Override these hooks at `:root` (or any ancestor scope) to retheme.
67
+ `Dialog` paints the full-screen overlay and resets the browser's default `<dialog>` border, size limits, and `::backdrop`. Transparent borders as wide as the screen's safe areas keep the content and the close button clear of the notch, rounded corners and home bar. The inner panel comes from its children, usually `<Modal>`. Override these hooks at `:root` (or any ancestor scope) to retheme.
68
68
 
69
69
  | Variable | Styles | Default |
70
70
  |---|---|---|
@@ -22,7 +22,12 @@
22
22
  overscroll-behavior: contain;
23
23
  padding-block: var(--dialog-padding, var(--space-normal));
24
24
  padding-inline: var(--dialog-indent, var(--space-normal));
25
- border: none;
25
+
26
+ /* Transparent borders keep the content out of the screen's safe areas (notch, rounded corners, home bar). The overlay paints under them, so the padding stays even. */
27
+ border-top: env(safe-area-inset-top, 0) solid transparent;
28
+ border-right: env(safe-area-inset-right, 0) solid transparent;
29
+ border-bottom: env(safe-area-inset-bottom, 0) solid transparent;
30
+ border-left: env(safe-area-inset-left, 0) solid transparent;
26
31
 
27
32
  /* Style */
28
33
  color: var(--dialog-color, var(--tint-100));
@@ -61,7 +66,7 @@
61
66
 
62
67
  .close {
63
68
  position: fixed;
64
- top: var(--dialog-close-offset, var(--space-small));
65
- right: var(--dialog-close-offset, var(--space-small));
69
+ top: calc(var(--dialog-close-offset, var(--space-small)) + env(safe-area-inset-top, 0px));
70
+ right: calc(var(--dialog-close-offset, var(--space-small)) + env(safe-area-inset-right, 0px));
66
71
  }
67
72
  }
@@ -96,7 +96,7 @@ A link click inside a `<Dialog>` closes it, so the menu slides out as the page c
96
96
 
97
97
  ## Styling
98
98
 
99
- `Modal` paints a shadowed surface with no border. Set `--modal-stroke` (for example `var(--stroke-normal)`) to show the themed border, or `--modal-border` to replace it. A pinned panel then has no border on the side that touches the screen edge. On a pinned panel, only the corners that do not touch a screen edge are round. Override these hooks at `:root` (or any ancestor scope) to retheme.
99
+ `Modal` paints a shadowed surface with no border. Set `--modal-stroke` (for example `var(--stroke-normal)`) to show the themed border, or `--modal-border` to replace it. A pinned panel then has no visible border on the side that touches the screen edge. That side has a transparent border as wide as the screen's safe area (notch, rounded corners, home bar), so the content stays clear of it and the background fills it. On a pinned panel, only the corners that do not touch a screen edge are round. Override these hooks at `:root` (or any ancestor scope) to retheme.
100
100
 
101
101
  | Variable | Styles | Default |
102
102
  |---|---|---|
@@ -54,30 +54,36 @@
54
54
  width: var(--modal-width, var(--width-narrow));
55
55
  }
56
56
 
57
- /* If a theme sets `--modal-stroke` or `--modal-border`, remove the border on each side that touches the edge of the screen. */
57
+ /*
58
+ * On each side that touches the edge of the screen, a transparent border replaces any `--modal-stroke` or `--modal-border`.
59
+ * - The border is as wide as the screen's safe area on that side (notch, rounded corners, home bar), so the content stays clear of it.
60
+ * - The panel's background paints under the border, so it fills the safe area, and the padding stays even.
61
+ */
58
62
  &.top {
59
63
  top: 0;
60
- border-top: none;
64
+ border-top: env(safe-area-inset-top, 0) solid transparent;
61
65
  view-transition-class: modal-top;
62
66
  }
63
67
 
64
68
  &.bottom {
65
69
  bottom: 0;
66
- border-bottom: none;
70
+ border-bottom: env(safe-area-inset-bottom, 0) solid transparent;
67
71
  view-transition-class: modal-bottom;
68
72
  }
69
73
 
70
74
  &.left {
71
75
  left: 0;
72
- border-left: none;
73
- border-block: none;
76
+ border-top: env(safe-area-inset-top, 0) solid transparent;
77
+ border-bottom: env(safe-area-inset-bottom, 0) solid transparent;
78
+ border-left: env(safe-area-inset-left, 0) solid transparent;
74
79
  view-transition-class: modal-left;
75
80
  }
76
81
 
77
82
  &.right {
78
83
  right: 0;
79
- border-right: none;
80
- border-block: none;
84
+ border-top: env(safe-area-inset-top, 0) solid transparent;
85
+ border-right: env(safe-area-inset-right, 0) solid transparent;
86
+ border-bottom: env(safe-area-inset-bottom, 0) solid transparent;
81
87
  view-transition-class: modal-right;
82
88
  }
83
89
  }