Skip to content

Commit

Permalink
Restrict first- and last-child margin removal to only elements where …
Browse files Browse the repository at this point in the history
…margin is added
  • Loading branch information
QuinnStraus authored Dec 20, 2024
1 parent 3216b36 commit c53778a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.root {
& :first-child {
& :where(h1, h2, h3, h4, h5, h6, img, p, ul, ol, hr, pre, table, caption, blockquote) :first-child {
margin-top: 0;
}

& :last-child {
& :where(h1, h2, h3, h4, h5, h6, img, p, ul, ol, hr, pre, table, caption, blockquote) :last-child {
margin-bottom: 0;
}

Expand Down

0 comments on commit c53778a

Please sign in to comment.