diff --git a/src/app/plugins/react-custom-html-parser.tsx b/src/app/plugins/react-custom-html-parser.tsx index 3c5fce6f5..013b46183 100644 --- a/src/app/plugins/react-custom-html-parser.tsx +++ b/src/app/plugins/react-custom-html-parser.tsx @@ -762,9 +762,11 @@ export const getReactCustomHtmlParser = ( if (name === 'table') { return ( - - {renderChildren()} -
+
+ + {renderChildren()} +
+
); } if (name === 'th') { diff --git a/src/app/styles/CustomHtml.css.ts b/src/app/styles/CustomHtml.css.ts index 90b97b0b8..23efaf9b7 100644 --- a/src/app/styles/CustomHtml.css.ts +++ b/src/app/styles/CustomHtml.css.ts @@ -302,9 +302,17 @@ export const HorizontalRule = style([ }, ]); -export const Table = style([ +export const TableContainer = style([ DefaultReset, MarginSpaced, + { + overflowX: 'auto', + maxWidth: '100%', + } +]) + +export const Table = style([ + DefaultReset, { borderCollapse: 'collapse', }, @@ -317,6 +325,7 @@ export const Th = style([ border: `${config.borderWidth.B300} solid ${color.SurfaceVariant.ContainerLine}`, backgroundColor: color.SurfaceVariant.Container, color: color.SurfaceVariant.OnContainer, + minWidth: toRem(100), } ]); @@ -327,5 +336,6 @@ export const Td = style([ border: `${config.borderWidth.B300} solid ${color.Surface.ContainerLine}`, backgroundColor: color.Surface.Container, color: color.Surface.OnContainer, + minWidth: toRem(100), } ]);