@jsenv/navi 0.29.410 → 0.29.411

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.
@@ -236,7 +236,8 @@ to start when unsure which export solves a problem.
236
236
  `enableVirtualKeyboardOverlay()`: `--navi-keyboard-inset-bottom`). Read before hand-writing an offset to clear a `FixedBar`.
237
237
  - `scroll.md` — where scrolling happens: `header`/`body`/`footer`, `List`'s
238
238
  `scroller`, where a list opens and what a search does to where it is, a popup
239
- that scrolls, hover while scrolling; many rows: `<List.Items>` and the render
239
+ that scrolls, hover while scrolling, how a list clips at its rounded corners
240
+ and why a borderless list has none; many rows: `<List.Items>` and the render
240
241
  window (`renderBudget`, its `{ initial, after }` form for a list opening in
241
242
  a click, `virtualItemSize`, `findText` for Cmd/Ctrl + F beyond the window).
242
243
  Read before writing CSS to make something scroll, and before rendering a
package/docs/scroll.md CHANGED
@@ -555,3 +555,46 @@ read as a box in a box. `borderWidth="0"` removes it — the prop writes
555
555
  `--list-border-width` inline, which wins over the `-default`. A list that is
556
556
  itself the content of a `[popover]`/`<dialog>` already drops the default on its
557
557
  own.
558
+
559
+ ### The corners: the frame clips, not the scroll box
560
+
561
+ A list clips its content twice, at the same edge, for two different reasons:
562
+
563
+ - the **scroll box** (`.navi_list_scroll_container`, square, `overflow: auto`)
564
+ cuts what scrolls;
565
+ - the **frame** (`.navi_list_container`, `overflow: hidden` plus the radius)
566
+ rounds that cut at the corners.
567
+
568
+ The curve belongs on the frame. Do not move it onto the scroll box. A scroll
569
+ container does not clip its own scrollbar to its `border-radius`: measured in
570
+ Chromium with classic scrollbars, the scrollbar paints square over the rounded
571
+ corner, while the frame's clip cuts it. The scroll box would also need the
572
+ inner radius (the outer radius minus the border width). CSS cannot know that
573
+ radius when the border was removed by the `border` prop.
574
+
575
+ The curve cuts whatever sits on it. For rows drawn as full-width stripes, that
576
+ is what you want: a selected row's background follows the corner. For rows that
577
+ are framed cards themselves (a grid of hours, a column of game cards), the
578
+ list's curve cuts their outer corners whenever its radius is larger than
579
+ theirs. At a fractional pixel ratio, the frame's clip can also blur the last
580
+ row's bottom edge (measured in WebKit at DPR 2.625).
581
+
582
+ ### Without a border, no corner
583
+
584
+ The default radius is the border's radius. A list given `border="none"`,
585
+ `border="0"` or `borderWidth="0"`, and no `borderRadius`, is marked
586
+ `data-borderless`. It then has no radius, and its frame stops clipping, because
587
+ rounding the corners was that clip's only job. The scroll box still clips. A
588
+ badge crossing the list's edge is still cut there, and `overflow="visible"`
589
+ remains the only way to let content out.
590
+
591
+ - An explicit `borderRadius` keeps both the curve and the frame's clip: a
592
+ borderless list painting a background of its own may want that surface
593
+ rounded, with the rows clipped to it.
594
+ - Only the props turn it on. A border removed from CSS (the popup's own
595
+ `-default`, an app class) keeps the default radius. In a dialog, the corners
596
+ that touch the dialog's squared edge are squared by rules keyed on the
597
+ dialog's `data-flush-*` attributes, in `list.jsx`.
598
+
599
+ Reference: `src/control/list/list.jsx` (the `.navi_list_container` CSS and
600
+ `isBorderless`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.410",
3
+ "version": "0.29.411",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {