From 59c4714693b992fe5aa3c4c2e885dd67bf5d4ed4 Mon Sep 17 00:00:00 2001 From: Matthew Costabile Date: Fri, 29 May 2026 11:47:21 +0000 Subject: [PATCH 1/2] perf(TreeView): make rows paint-safe (no visual change) and reduce hover/focus invalidation - Add 'overflow-clip-margin: var(--base-size-8)' to '.TreeViewItem' and '.TreeViewItemContainer' so the current-item indicator (positioned at 'left: -8px' of the row container) remains visible when a consumer applies 'contain: paint' to the row, or when the documented 'containIntrinsicSize' prop triggers 'content-visibility: auto' (which implies paint containment) on the container. The property is a no-op when no paint containment is active, so default rendering is unchanged. Safari 17 silently ignores the property and keeps the pre-existing clipped-indicator behavior under consumer-side 'contain: paint' (no regression from prior versions); Safari 18+ supports it, as does 'content-visibility: auto'. - Replace ':has(.TreeViewItemSkeleton):hover' with a positive '[data-loading]' marker emitted on the placeholder row's
  • by 'LoadingItem' via a module-private 'LoadingPlaceholderContext'. No public-API change; avoids the broad ':has()' invalidation cost across every row in large trees. - Replace the root-scope ':hover'/':focus-within' descendant selectors on level lines with an inherited '--tree-line-color' custom property toggled on the root