Skip to content

Commit ad108ff

Browse files
author
Dimitri POSTOLOV
authoredApr 5, 2024··
[v3] use overflow-x-auto instead overflow-x-scroll for <Table /> (#2828)
* aa * aa
1 parent b47880d commit ad108ff

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed
 

‎.changeset/long-years-occur.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'nextra-theme-blog': patch
3+
'nextra-theme-docs': patch
4+
'nextra': patch
5+
---
6+
7+
use `overflow-x-auto` instead `overflow-x-scroll` for `<Table />`

‎.changeset/three-pandas-joke.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'nextra-theme-docs': patch
3+
---
4+
5+
fix `<Bleed />` overflows incorrectly in firefox

‎packages/nextra-theme-docs/src/components/toc.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export function TOC({ toc, filePath }: TOCProps): ReactElement {
5656
<div
5757
className={cn(
5858
'nextra-scrollbar _sticky _top-16 _overflow-y-auto _pr-4 _pt-6 _text-sm [hyphens:auto]',
59-
'_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4'
59+
'_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4',
60+
'_z-[-1]' // for firefox https://github.com/shuding/nextra/issues/2824
6061
)}
6162
>
6263
{hasHeadings && (

‎packages/nextra-theme-docs/src/index.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,4 @@ export {
105105
LocaleSwitch
106106
} from './components'
107107

108-
export {
109-
useMenu
110-
} from './contexts'
108+
export { useMenu } from './contexts'

‎packages/nextra/src/client/components/table.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export const Table = ({
55
className = '',
66
...props
77
}: ComponentProps<'table'>) => (
8-
<table className={cn('_block _overflow-x-scroll', className)} {...props} />
8+
<table className={cn('_block _overflow-x-auto', className)} {...props} />
99
)

0 commit comments

Comments
 (0)
Please sign in to comment.