Skip to content

Commit

Permalink
fix: set top margin to zero for nested list (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
imfing committed Feb 3, 2024
1 parent c630805 commit 7191e25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,12 @@ video {
margin-top: 0.5rem;
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.
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] *)) {
margin-top: 0px;
}
.content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
overflow-wrap: break-word;
border-radius: 0.375rem;
Expand Down
6 changes: 6 additions & 0 deletions assets/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
@apply my-2;
}
}
/* 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.
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] *)) {
@apply mt-0;
}
:where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
@apply border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10;
}
Expand Down

0 comments on commit 7191e25

Please sign in to comment.