Skip to content
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(Dialog): All variants use flex #1269

Merged
merged 5 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/thirty-lemons-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@itwin/itwinui-css': major
FlyersPh9 marked this conversation as resolved.
Show resolved Hide resolved
'@itwin/itwinui-react': major
---

All dialog variants have `flex` applied by default. This means the content should be wrapped with `Dialog.Content` or `ModalContent` for optimal layout.
6 changes: 2 additions & 4 deletions packages/itwinui-css/src/dialog/dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ $iui-dialogue-resizable-min-height: 7.75rem; // 7.75rem = 124px = title bar heig
padding: var(--iui-size-s) var(--iui-size-m);
pointer-events: auto;
background-color: var(--iui-color-background);
display: flex;
flex-direction: column;
@media (forced-colors: active) {
border: 1px solid;
}
Expand Down Expand Up @@ -95,8 +97,6 @@ $iui-dialogue-resizable-min-height: 7.75rem; // 7.75rem = 124px = title bar heig
width: 100vw;
top: 0;
left: 0;
display: flex;
flex-direction: column;
will-change: transform;

&:not(.iui-dialog-visible) {
Expand All @@ -114,8 +114,6 @@ $iui-dialogue-resizable-min-height: 7.75rem; // 7.75rem = 124px = title bar heig
}

.iui-dialog-draggable {
display: flex;
flex-direction: column;
border: 1px solid var(--iui-color-border);
min-height: $iui-dialogue-resizable-min-height;
}
Expand Down