Skip to content

Commit

Permalink
feat: horizontal table scrolling is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
YangFong committed Sep 3, 2024
1 parent df38304 commit 9b01406
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/config/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,10 @@ const defaultTheme: Theme = {
},

td: {
border: `1px solid #dfdfdf`,
padding: `0.25em 0.5em`,
color: `#3f3f3f`,
'border': `1px solid #dfdfdf`,
'padding': `0.25em 0.5em`,
'color': `#3f3f3f`,
'word-break': `keep-all`,
},

footnote: {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export function initRenderer(opts: IOpts) {
})
.join(``)
return `
<section style="padding:0 8px;">
<section style="padding:0 8px; max-width: 100%; overflow: auto">
<table class="preview-table">
<thead ${styles(`thead`)}>${headerRow}</thead>
<tbody>${body}</tbody>
Expand Down

0 comments on commit 9b01406

Please sign in to comment.