Skip to content

Commit

Permalink
fix: WEB-706 Custom overflowX on tables (#6337)
Browse files Browse the repository at this point in the history
* add table to mdxComponents and overflowX css

* Update table margin

* reset table margin
  • Loading branch information
carlagn authored Oct 15, 2024
1 parent 0f32f59 commit a12ae7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,18 @@ kbd {
font-family: "JetBrainsMono" !important;
}

.mdx-table {
margin: 0px 0px 20px;
overflow-x: scroll;
}

table {
word-break: normal;
border: 1px solid var(--border-color);
border-radius: 8px;
border-spacing: 0px;
margin: 0 0px 20px;
white-space: inherit;
margin: 0;
min-width: min-content;
max-width: 100%;
width: fit-content;
Expand Down
1 change: 1 addition & 0 deletions src/theme/MDXComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export default {
TopBlock,
CodeWithResult,
SwitchTech,
table: (p: any) => <div className="mdx-table"><table {...p}>{p.children}</table></div>,
ParallelBlocks,
ButtonLink,
NavigationLinksContainer,
Expand Down

0 comments on commit a12ae7d

Please sign in to comment.