From 9b7647bd3d44c433e0edad7cd4d30f6fdd220f25 Mon Sep 17 00:00:00 2001 From: Elizabeth Mitchell Date: Tue, 22 Aug 2023 14:24:58 -0700 Subject: [PATCH] fix(dialog): content not displaying on Safari Fixes #4728 PiperOrigin-RevId: 559224134 --- dialog/internal/_dialog.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dialog/internal/_dialog.scss b/dialog/internal/_dialog.scss index 6fc7e72de8..ccab43831c 100644 --- a/dialog/internal/_dialog.scss +++ b/dialog/internal/_dialog.scss @@ -167,8 +167,10 @@ .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; @@ -176,13 +178,16 @@ .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 } @@ -198,6 +203,7 @@ .content { color: var(--_supporting-text-color); font: var(--_supporting-text-type); + height: min-content; // Needed for Safari position: relative; }