Skip to content

Commit

Permalink
fix(dialog): content not displaying on Safari
Browse files Browse the repository at this point in the history
Fixes #4728

PiperOrigin-RevId: 559224134
  • Loading branch information
asyncLiz authored and Copybara-Service committed Aug 22, 2023
1 parent d25c5e9 commit 9b7647b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dialog/internal/_dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,27 @@
.container {
border-radius: inherit;
display: flex;
flex: 1;
flex-direction: column;
// Safari won't show content with "flex: 1", but container needs to grow if
// height is set on the dialog, so use flex-grow instead.
flex-grow: 1;
overflow: hidden;
position: relative;
transform-origin: top;
}

.container::before {
background: var(--_container-color);
border-radius: inherit;
content: '';
inset: 0;
position: absolute;
}

.scroller {
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
z-index: 0; // needed to display scrollbars on Chrome linux
}
Expand All @@ -198,6 +203,7 @@
.content {
color: var(--_supporting-text-color);
font: var(--_supporting-text-type);
height: min-content; // Needed for Safari
position: relative;
}

Expand Down

0 comments on commit 9b7647b

Please sign in to comment.