LearnNewsExamplesServices
Frontmatter
id8383
titleAdd styling for tables in Markdown component
stateClosed
labels
enhancementdesignai
assigneestobiu
createdAtJan 7, 2026, 3:18 PM
updatedAtJan 7, 2026, 3:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/8383
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 7, 2026, 3:21 PM

Add styling for tables in Markdown component

Closed v11.19.0 enhancementdesignai
tobiu
tobiu commented on Jan 7, 2026, 3:18 PM

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;
        }
    }
tobiu added the enhancement label on Jan 7, 2026, 3:18 PM
tobiu added the design label on Jan 7, 2026, 3:18 PM
tobiu added the ai label on Jan 7, 2026, 3:18 PM
tobiu assigned to @tobiu on Jan 7, 2026, 3:20 PM
tobiu referenced in commit afb7cba - "Add styling for tables in Markdown component #8383" on Jan 7, 2026, 3:21 PM
tobiu closed this issue on Jan 7, 2026, 3:21 PM