From 4b94fbb759e163abb9495777973b5a6e700769f7 Mon Sep 17 00:00:00 2001 From: Jack Brewer Date: Tue, 24 Jan 2023 04:21:28 +0000 Subject: [PATCH] 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 --- .changeset/hot-parrots-shave.md | 5 +++++ src/markdown/tables.scss | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/hot-parrots-shave.md diff --git a/.changeset/hot-parrots-shave.md b/.changeset/hot-parrots-shave.md new file mode 100644 index 0000000000..307d412401 --- /dev/null +++ b/.changeset/hot-parrots-shave.md @@ -0,0 +1,5 @@ +--- +'@primer/css': patch +--- + +Remove trailing margin from last-child within a markdown table cell diff --git a/src/markdown/tables.scss b/src/markdown/tables.scss index ee095c99ad..0575f14939 100644 --- a/src/markdown/tables.scss +++ b/src/markdown/tables.scss @@ -1,5 +1,5 @@ // Needs refactoring -// stylelint-disable selector-max-type +// stylelint-disable selector-max-type, selector-max-compound-selectors .markdown-body { // Tables table { @@ -20,6 +20,12 @@ border: $border-width $border-style var(--color-border-default); } + td { + > :last-child { + margin-bottom: 0; + } + } + tr { background-color: var(--color-canvas-default); border-top: $border-width $border-style var(--color-border-muted);