fix: set top margin to zero for nested list (#276)

This commit is contained in:
Xin 2024-02-03 09:09:16 -05:00 committed by GitHub
parent c630805511
commit 7191e25958
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View File

@ -1701,6 +1701,12 @@ video {
margin-top: 0.5rem; margin-top: 0.5rem;
margin-bottom: 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] *)) { .content :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
overflow-wrap: break-word; overflow-wrap: break-word;
border-radius: 0.375rem; border-radius: 0.375rem;

View File

@ -57,6 +57,12 @@
@apply my-2; @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] *)) { :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; @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;
} }