Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions gui/src/components/StyledMarkdownPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,30 @@ const StyledMarkdown = styled.div<{
> *:last-child {
margin-bottom: 0;
}

table {
border-collapse: collapse;
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
margin-bottom: 16px;
}

table th,
table td {
padding: 6px 13px;
border: 1px solid var(--vscode-editorWidget-border, #454545);
}

table th {
font-weight: 600;
background-color: var(--vscode-editor-background);
}

table tr:nth-child(2n) {
background-color: var(--vscode-list-hoverBackground, rgba(255,255,255,0.04));
}
`;

interface StyledMarkdownPreviewProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ export function remarkTables() {
{
type: "tableRow",
children: headerCells.map((cell, i) => ({
type: "element",
tagName: "th",
type: "tableCell",
align: alignments[i],
children: [{ type: "text", value: cell }],
})),
Expand Down
Loading