Skip to content

Commit 80a0ac4

Browse files
mkrtchianclaude
andcommitted
fix(css): restore tight nested-list spacing for Nextra 4
The old rules targeted Nextra 2 nx- classes, dead since the v4 migration. Nextra 4 spaces content lists with my-[.5em] on <li> and not-first:mt-[1.25em] on nested lists; scope tight margins to <article>. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 352c65c commit 80a0ac4

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

styles.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
main ul.nx-mt-6 {
2-
margin-top: 0;
3-
}
4-
5-
main ul:is([dir="ltr"] .ltr\:nx-ml-6) {
6-
margin-left: 2rem;
1+
/* Reading notes lean heavily on nested lists. Nextra 4 spaces them
2+
generously (content <li> get my-[.5em]; nested lists add
3+
not-first:mt-[1.25em] + my-[.75em]), which spreads deep lists out.
4+
Scope to <article> so the sidebar/TOC lists are untouched. Plain rules,
5+
unlayered, so they win over Nextra's @layer utilities without !important. */
6+
article li {
7+
margin-top: 0.4rem;
8+
margin-bottom: 0.4rem;
79
}
810

9-
main li.nx-my-2 {
11+
article :is(ul, ol) :is(ul, ol) {
1012
margin-top: 0.4rem;
1113
margin-bottom: 0.4rem;
1214
}

0 commit comments

Comments
 (0)