Skip to content

Commit 4b94fbb

Browse files
jackbrewersimurai
andauthored
Remove trailing margin from HTML elements within markdown tables (#2365)
* Remove trailing margin from last-child within a markdown table cell * Add changeset * Move new styles to table-specific file * Disable `selector-max-compound-selectors` stylelint Co-authored-by: simurai <[email protected]>
1 parent 872a578 commit 4b94fbb

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/hot-parrots-shave.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/css': patch
3+
---
4+
5+
Remove trailing margin from last-child within a markdown table cell

src/markdown/tables.scss

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Needs refactoring
2-
// stylelint-disable selector-max-type
2+
// stylelint-disable selector-max-type, selector-max-compound-selectors
33
.markdown-body {
44
// Tables
55
table {
@@ -20,6 +20,12 @@
2020
border: $border-width $border-style var(--color-border-default);
2121
}
2222

23+
td {
24+
> :last-child {
25+
margin-bottom: 0;
26+
}
27+
}
28+
2329
tr {
2430
background-color: var(--color-canvas-default);
2531
border-top: $border-width $border-style var(--color-border-muted);

0 commit comments

Comments
 (0)