From 716af593935d6d103f83c4b5b70428f955f93d7b Mon Sep 17 00:00:00 2001 From: Xin Date: Tue, 6 Feb 2024 17:04:37 -0500 Subject: [PATCH] fix: clear top margin for nested list recursively (#280) * fix: clear top margin for nested list children * chore: run `npm run build:css` --- assets/css/compiled/main.css | 5 +++-- assets/css/typography.css | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index bb38640..0ff5e86 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -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] *)) { @@ -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 */ diff --git a/assets/css/typography.css b/assets/css/typography.css index 776f0df..bfd96ad 100644 --- a/assets/css/typography.css +++ b/assets/css/typography.css @@ -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] *)) {