Restore header rounding for non-overflowing tables

This commit is contained in:
Peter White
2026-03-25 08:09:27 +01:00
parent 65c5af9380
commit 138d99aa77
2 changed files with 5 additions and 3 deletions
@@ -93,7 +93,7 @@ export function StickyViewGrid({ className, header, children }: StickyViewGridPr
<div
ref={rootRef}
className={tcls(
'group/table relative flex w-full min-w-0 max-w-full flex-col rounded-t-none rounded-b-lg border-tint-subtle',
'group/table relative flex w-full min-w-0 max-w-full flex-col rounded-lg border-tint-subtle',
'data-[scrollable=true]:border'
)}
data-scrollable="false"
@@ -101,7 +101,7 @@ export function StickyViewGrid({ className, header, children }: StickyViewGridPr
<div
ref={stickyHeaderRef}
className={tcls(
'-mx-px sticky z-10 w-full min-w-0 max-w-full overflow-hidden rounded-t-none px-px',
'-mx-px sticky z-10 w-full min-w-0 max-w-full overflow-hidden rounded-t-[inherit] px-px',
'[top:var(--toc-top-offset,var(--outline-top-offset,0px))]'
)}
>
@@ -123,6 +123,7 @@ export function StickyViewGrid({ className, header, children }: StickyViewGridPr
className={tcls(
styles.tableScrollArea,
'w-full min-w-0 overflow-x-auto overflow-y-hidden border-tint-subtle',
'group-data-[scrollable=true]/table:mx-px',
'group-data-[scrollable=true]/table:border-0',
'group-data-[scrollable=true]/table:rounded-none'
)}
@@ -56,8 +56,9 @@ export function Table(props: BlockProps<DocumentBlockTable>) {
<ViewGridHeader
{...gridProps}
className={tcls(
'mb-0 rounded-t-none rounded-b-none border-t border-r border-l',
'mb-0 rounded-b-none border-t border-r border-l',
'group-data-[scrollable=false]/table:mb-1',
'group-data-[scrollable=false]/table:rounded-b-lg',
'group-data-[scrollable=true]/table:border-t-0',
'group-data-[scrollable=true]/table:border-r-0',
'group-data-[scrollable=true]/table:border-l-0'