mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-30 00:01:15 +00:00
Improve the look of tables (#1299)
* feat(css): remove table styling that overrides bootstrap * feat(utils): style MD tables appropriately with bootstrap class
This commit is contained in:
parent
f2db90196d
commit
79f4009541
2 changed files with 4 additions and 25 deletions
|
@ -80,30 +80,6 @@
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-div table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
border: 1px solid var(--dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-div table th,
|
|
||||||
.md-div table td {
|
|
||||||
padding: 0.3rem;
|
|
||||||
vertical-align: top;
|
|
||||||
border-top: 1px solid var(--dark);
|
|
||||||
border: 1px solid var(--dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-div table thead th {
|
|
||||||
vertical-align: bottom;
|
|
||||||
border-bottom: 2px solid var(--dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.md-div table tbody + tbody {
|
|
||||||
border-top: 2px solid var(--dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.vote-bar {
|
.vote-bar {
|
||||||
margin-top: -6.5px;
|
margin-top: -6.5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -739,7 +739,7 @@ function setupMarkdown() {
|
||||||
defs: emojiDefs,
|
defs: emojiDefs,
|
||||||
})
|
})
|
||||||
.disable("image");
|
.disable("image");
|
||||||
var defaultRenderer = md.renderer.rules.image;
|
const defaultRenderer = md.renderer.rules.image;
|
||||||
md.renderer.rules.image = function (
|
md.renderer.rules.image = function (
|
||||||
tokens: Token[],
|
tokens: Token[],
|
||||||
idx: number,
|
idx: number,
|
||||||
|
@ -758,6 +758,9 @@ function setupMarkdown() {
|
||||||
const alt_text = item.content;
|
const alt_text = item.content;
|
||||||
return `<img class="icon icon-emoji" src="${src}" title="${title}" alt="${alt_text}"/>`;
|
return `<img class="icon icon-emoji" src="${src}" title="${title}" alt="${alt_text}"/>`;
|
||||||
};
|
};
|
||||||
|
md.renderer.rules.table_open = function () {
|
||||||
|
return '<table class="table">';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEmojiMart(
|
export function getEmojiMart(
|
||||||
|
|
Loading…
Reference in a new issue