Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

fix: add styling for markdown tables #921

Merged
merged 1 commit into from
Feb 10, 2021
Merged
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
6 changes: 6 additions & 0 deletions src/styles/_markdown-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@
code {
background: rgba(mat-color($foreground, secondary-text), $exportBackgroundOpacity);
}

> table {
th, td {
border-bottom-color: mat-color($foreground, divider);
}
}
}
}
28 changes: 24 additions & 4 deletions src/styles/_markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
text-decoration: none;
}

td code {
font-size: 14px;
}

pre {
border-radius: 5px;
display: block;
Expand All @@ -56,6 +52,30 @@
code {
padding: 3px;
}

// Target direct descendants here so that the styles don't bleed into the live examples.
> table {
text-align: left;
table-layout: fixed;
border-collapse: collapse;
margin-bottom: 1em;
font-size: 14px;

tr {
height: 48px;
}

th, td {
padding: 8px 4px 8px 0;
border-bottom-width: 1px;
border-bottom-style: solid;
}

// Code tends to wrap inside tables which doesn't look great with the background color.
code {
background: transparent;
}
}
}

.docs-header-link {
Expand Down