From 819498d8c9bd8c5c72d2f7b12ec082795b6628d1 Mon Sep 17 00:00:00 2001 From: Schabse Laks Date: Fri, 15 Mar 2024 08:08:53 -0700 Subject: [PATCH] feat(dialog): Add a chaining class that suppresses scrim animations. PiperOrigin-RevId: 616132734 --- packages/mdc-dialog/_mixins.scss | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/mdc-dialog/_mixins.scss b/packages/mdc-dialog/_mixins.scss index 389b0c0cd4c..b5d11f40f3c 100644 --- a/packages/mdc-dialog/_mixins.scss +++ b/packages/mdc-dialog/_mixins.scss @@ -395,7 +395,8 @@ .mdc-dialog__container { @include feature-targeting.targets($feat-animation) { - transition: opacity 75ms linear, + transition: + opacity 75ms linear, animation-functions.enter(transform, 150ms); } } @@ -423,6 +424,16 @@ } } + // Override the above transitions when chaining dialogs. + .mdc-dialog--chaining .mdc-dialog__scrim { + @include feature-targeting.targets($feat-animation) { + transition: none; + } + @include feature-targeting.targets($feat-structure) { + opacity: 1; + } + } + .mdc-dialog--open { .mdc-dialog__scrim { @include feature-targeting.targets($feat-structure) {