Skip to content

Commit

Permalink
fix: clear top margin for nested list recursively (#280)
Browse files Browse the repository at this point in the history
* fix: clear top margin for nested list children

* chore: run `npm run build:css`
  • Loading branch information
imfing authored Feb 6, 2024
1 parent 7191e25 commit 716af59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1702,9 +1702,9 @@ video {
margin-bottom: 0.5rem;
}
/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
inside the first list item (li) of any parent ul or ol.
inside the list item (li) of any parent ul or ol.
The rule sets the top margin of the selected list to zero. */
.content :where(ul, ol) > li:first-child > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
.content :where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-top: 0px;
}
.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
Expand Down Expand Up @@ -1804,6 +1804,7 @@ article details > summary::before {
height: 1.2em;
width: 1.2em;
vertical-align: -4px;
padding: 0 0.6em;
}
/* Code syntax highlight */
/* Light theme for syntax highlight */
Expand Down
4 changes: 2 additions & 2 deletions assets/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
}
}
/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
inside the first list item (li) of any parent ul or ol.
inside the list item (li) of any parent ul or ol.
The rule sets the top margin of the selected list to zero. */
:where(ul, ol) > li:first-child > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
:where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply mt-0;
}
:where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
Expand Down

0 comments on commit 716af59

Please sign in to comment.