Skip to content

Commit

Permalink
[@mantine/core] Button: Fix incorrect overlap between buttons in Butt…
Browse files Browse the repository at this point in the history
…on.Group for screens with low resolution (#1979)

* [@mantine/core] ButtonGroup: Fix overlap between buttons

* fix: add buttonBorderWidth

* fix: Change border size based on dpi

* fix: Change media query condition

* [@mantine/core] Fix incorrect media query

Co-authored-by: Vitaly Rtishchev <rtivital@gmail.com>
  • Loading branch information
ryuhangyeong and rtivital committed Aug 12, 2022
1 parent 12c4556 commit f82e20c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mantine-core/src/Button/ButtonGroup/ButtonGroup.styles.ts
Expand Up @@ -33,6 +33,13 @@ export default createStyles(
[orientation === 'vertical' ? 'borderBottomWidth' : 'borderRightWidth']:
buttonBorderWidth / 2,
},

'& + [data-button]': {
[orientation === 'vertical' ? 'marginTop' : 'marginLeft']: -buttonBorderWidth,
'@media (min-resolution: 192dpi)': {
[orientation === 'vertical' ? 'marginTop' : 'marginLeft']: 0,
},
},
},
},
})
Expand Down

0 comments on commit f82e20c

Please sign in to comment.