From 6c8a8b1403e63140dc41751140c5b79532f23de2 Mon Sep 17 00:00:00 2001 From: 7iomka <7iomka@gmail.com> Date: Mon, 3 Oct 2022 18:24:46 +0300 Subject: [PATCH] [@mantine/core] List: Fix incorrect indentation for nested list items (#2606) * [@mantine/core] Fix indentation on List (listStylePosition: 'inside') * [@mantine/core] List - fix nested items --- src/mantine-core/src/List/List.styles.ts | 2 +- src/mantine-core/src/List/ListItem/ListItem.styles.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mantine-core/src/List/List.styles.ts b/src/mantine-core/src/List/List.styles.ts index f17e95e424b..747147a1303 100644 --- a/src/mantine-core/src/List/List.styles.ts +++ b/src/mantine-core/src/List/List.styles.ts @@ -15,6 +15,6 @@ export default createStyles((theme, { withPadding, size, listStyleType }: ListSt lineHeight: theme.lineHeight, margin: 0, paddingLeft: withPadding ? theme.spacing.xl : 0, - listStylePosition: 'outside', + listStylePosition: 'inside', }, })); diff --git a/src/mantine-core/src/List/ListItem/ListItem.styles.ts b/src/mantine-core/src/List/ListItem/ListItem.styles.ts index 88283397cd5..fb2f7c6a4b4 100644 --- a/src/mantine-core/src/List/ListItem/ListItem.styles.ts +++ b/src/mantine-core/src/List/ListItem/ListItem.styles.ts @@ -8,10 +8,13 @@ interface ListItemStyles { export default createStyles((theme, { spacing, center }: ListItemStyles, getRef) => ({ itemWrapper: { ref: getRef('itemWrapper'), - display: 'inline', + display: 'inline-flex', + flexDirection: 'column', + whiteSpace: 'normal', }, item: { + whiteSpace: 'nowrap', lineHeight: center ? 1 : theme.lineHeight, '&:not(:first-of-type)': {