Skip to content

Commit

Permalink
feat(dialog): Add a chaining class that suppresses scrim animations.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 616132734
  • Loading branch information
SLaks authored and Copybara-Service committed Mar 15, 2024
1 parent c43b343 commit 819498d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/mdc-dialog/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 819498d

Please sign in to comment.