Skip to content

Commit 587f14e

Browse files
authored
fix(modal): add explicit margin auto to dialog element styles (#3312)
* fix(modal): add explicit margin * chore(modal): changeset
1 parent a585398 commit 587f14e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/cruel-frogs-accept.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@leafygreen-ui/modal': patch
3+
'@leafygreen-ui/confirmation-modal': patch
4+
'@leafygreen-ui/marketing-modal': patch
5+
---
6+
7+
Add explicit `margin: auto;` to `<dialog>` element styles to prevent `margin` property being reset

packages/modal/src/Modal/Modal.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const getBaseDialogStyles = (theme: Theme) => css`
5959
background-color: ${color[theme].background[Variant.Primary][
6060
InteractionState.Default
6161
]};
62+
margin: auto;
6263
padding: ${spacing[1000]}px ${spacing[900]}px;
6364
color: ${color[theme].text[Variant.Primary][InteractionState.Default]};
6465
font-family: ${fontFamilies.default};

0 commit comments

Comments
 (0)