From d252d7fdfc2679a6b776b32ddcff769af934f39d Mon Sep 17 00:00:00 2001 From: 7iomka <7iomka@gmail.com> Date: Sun, 2 Oct 2022 18:42:09 +0300 Subject: [PATCH 1/2] [@mantine/core] Fix indentation on List (listStylePosition: 'inside') --- src/mantine-core/src/List/List.styles.ts | 2 +- src/mantine-core/src/List/ListItem/ListItem.styles.ts | 4 +++- 2 files changed, 4 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..cb45ae261ca 100644 --- a/src/mantine-core/src/List/ListItem/ListItem.styles.ts +++ b/src/mantine-core/src/List/ListItem/ListItem.styles.ts @@ -8,10 +8,12 @@ interface ListItemStyles { export default createStyles((theme, { spacing, center }: ListItemStyles, getRef) => ({ itemWrapper: { ref: getRef('itemWrapper'), - display: 'inline', + display: 'inline-flex', + whiteSpace: 'normal', }, item: { + whiteSpace: 'nowrap', lineHeight: center ? 1 : theme.lineHeight, '&:not(:first-of-type)': { From 477d694d735c4914245ea6322feb95a2e6872ae5 Mon Sep 17 00:00:00 2001 From: 7iomka <7iomka@gmail.com> Date: Sun, 2 Oct 2022 18:47:20 +0300 Subject: [PATCH 2/2] [@mantine/core] List - fix nested items --- src/mantine-core/src/List/ListItem/ListItem.styles.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mantine-core/src/List/ListItem/ListItem.styles.ts b/src/mantine-core/src/List/ListItem/ListItem.styles.ts index cb45ae261ca..fb2f7c6a4b4 100644 --- a/src/mantine-core/src/List/ListItem/ListItem.styles.ts +++ b/src/mantine-core/src/List/ListItem/ListItem.styles.ts @@ -9,6 +9,7 @@ export default createStyles((theme, { spacing, center }: ListItemStyles, getRef) itemWrapper: { ref: getRef('itemWrapper'), display: 'inline-flex', + flexDirection: 'column', whiteSpace: 'normal', },