The Neo.component.Markdown component currently lacks styling for standard HTML tables generated from Markdown. Tables appear without borders or distinct headers.
We need to add CSS rules to resources/scss/src/component/Markdown.scss to style top-level tables within the .neo-markdown-component class.
Requirements:
- Add borders to table, th, and td elements.
- Avoid double borders (e.g., using
border-collapse: collapse).
- Style the table header (th) with a distinct background color.
- Add padding to cells for readability.
- Crucial: Ensure these styles are scoped only to tables that are direct children (or close descendants) of the markdown content, and do not affect tables inside nested Neo components (like
LivePreview examples). Using the child combinator > or ensuring specificity is key.
Proposed CSS (Draft):
> table {
border-collapse: collapse;
margin: 1em 0;
width: 100%;
th, td {
border: 1px solid lightgray;
padding: 8px 12px;
text-align: left;
}
th {
background-color: #f8f8f8;
font-weight: bold;
}
}
The
Neo.component.Markdowncomponent currently lacks styling for standard HTML tables generated from Markdown. Tables appear without borders or distinct headers.We need to add CSS rules to
resources/scss/src/component/Markdown.scssto style top-level tables within the.neo-markdown-componentclass.Requirements:
border-collapse: collapse).LivePreviewexamples). Using the child combinator>or ensuring specificity is key.Proposed CSS (Draft):
> table { border-collapse: collapse; margin: 1em 0; width: 100%; th, td { border: 1px solid lightgray; padding: 8px 12px; text-align: left; } th { background-color: #f8f8f8; font-weight: bold; } }