Tighten markdown list spacing around prose
Lists previously had a static marginVertical that stacked with paragraph.marginBottom, producing 20px gaps and oversized whitespace around paragraphs sandwiched between lists. Spacing is now context-aware via the render rule: list -> list keeps the normal paragraph gap (back-to-back lists read as continuous content) while p <-> list transitions get a slightly larger gap (lists read as their own section). Static margins can't satisfy both because RN doesn't collapse margins, so the bullet_list / ordered_list rule inspects the next sibling type and picks marginBottom accordingly.
This commit is contained in:
@@ -252,13 +252,11 @@ export function createMarkdownStyles(theme: Theme) {
|
||||
// =========================================================================
|
||||
|
||||
bullet_list: {
|
||||
marginVertical: theme.spacing[2],
|
||||
paddingLeft: 0,
|
||||
width: "100%" as const,
|
||||
},
|
||||
|
||||
ordered_list: {
|
||||
marginVertical: theme.spacing[2],
|
||||
paddingLeft: 0,
|
||||
width: "100%" as const,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user