From f768fbbe631ba2f8185c0dbf512ab5ad706801bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dtalo=20Andrade?= Date: Sun, 4 Sep 2022 01:09:58 -0300 Subject: [PATCH 1/2] remove margin from the last slide --- .../src/CarouselSlide/CarouselSlide.styles.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts b/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts index b3866ee2707..1326d9dbabf 100644 --- a/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts +++ b/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts @@ -57,10 +57,12 @@ export default createStyles( }) / 2 : 0 }px)`, - [orientation === 'horizontal' ? 'marginRight' : 'marginBottom']: theme.fn.size({ - size: gap, - sizes: theme.spacing, - }), + "&:not(:last-of-type)": { + [orientation === 'horizontal' ? 'marginRight' : 'marginBottom']: theme.fn.size({ + size: gap, + sizes: theme.spacing, + }), + }, ...slideBreakpoints, }, From 2ef9454627dcb2ea58fad1f3238c55dfadddcd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dtalo=20Andrade?= Date: Sun, 4 Sep 2022 16:17:28 -0300 Subject: [PATCH 2/2] prettier --- src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts b/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts index 1326d9dbabf..d67dddd1234 100644 --- a/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts +++ b/src/mantine-carousel/src/CarouselSlide/CarouselSlide.styles.ts @@ -57,7 +57,7 @@ export default createStyles( }) / 2 : 0 }px)`, - "&:not(:last-of-type)": { + '&:not(:last-of-type)': { [orientation === 'horizontal' ? 'marginRight' : 'marginBottom']: theme.fn.size({ size: gap, sizes: theme.spacing,