Skip to content

Commit

Permalink
[v3] use overflow-x-auto instead overflow-x-scroll for <Table /> (
Browse files Browse the repository at this point in the history
#2828)

* aa

* aa
  • Loading branch information
Dimitri POSTOLOV committed Apr 5, 2024
1 parent b47880d commit ad108ff
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .changeset/long-years-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'nextra-theme-blog': patch
'nextra-theme-docs': patch
'nextra': patch
---

use `overflow-x-auto` instead `overflow-x-scroll` for `<Table />`
5 changes: 5 additions & 0 deletions .changeset/three-pandas-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix `<Bleed />` overflows incorrectly in firefox
3 changes: 2 additions & 1 deletion packages/nextra-theme-docs/src/components/toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export function TOC({ toc, filePath }: TOCProps): ReactElement {
<div
className={cn(
'nextra-scrollbar _sticky _top-16 _overflow-y-auto _pr-4 _pt-6 _text-sm [hyphens:auto]',
'_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4'
'_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4',
'_z-[-1]' // for firefox https://github.com/shuding/nextra/issues/2824
)}
>
{hasHeadings && (
Expand Down
4 changes: 1 addition & 3 deletions packages/nextra-theme-docs/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,4 @@ export {
LocaleSwitch
} from './components'

export {
useMenu
} from './contexts'
export { useMenu } from './contexts'
2 changes: 1 addition & 1 deletion packages/nextra/src/client/components/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export const Table = ({
className = '',
...props
}: ComponentProps<'table'>) => (
<table className={cn('_block _overflow-x-scroll', className)} {...props} />
<table className={cn('_block _overflow-x-auto', className)} {...props} />
)

0 comments on commit ad108ff

Please sign in to comment.