-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: Improve sizing behaviour of Dialog #1329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have much to add to Aram's comment, but I did notice that this example of how to open a dialog doesn't look right.
Fixed – the new |
There is no functional difference because `position: fixed` positions the dialog relative to the viewport. Bonus: they are direction-agnostic.
@@ -21,18 +27,14 @@ | |||
.ams-dialog__form { | |||
display: grid; | |||
gap: var(--ams-dialog-form-gap); | |||
grid-template-rows: auto 1fr auto; | |||
max-block-size: var(--ams-dialog-form-max-block-size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This broke the scrolling inside the Dialog (while keeping the action buttons in view).
Aligns the (maximum) block and inline sizes of a Dialog with our spacing system.
A Dialog now gets
The inner layout has been improved as well: making the
<dialog>
a flex container automatically makes its child<form>
size optimally. Setting heights for the grid rows of the form no longer seems necessary.It is a breaking change because the
dialog-form-max-block-size
token gets removed.