From 8a402d06d24d6a00e0bcec005a88ce3c4b6e41f9 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 26 Feb 2018 16:04:34 +0100 Subject: [PATCH] fix(dialog): actions not being pulled down when trapping focus (#10007) Fixes the dialog action buttons not being pulled down to the correct spacing when there is a focus trap around the actions container. These changes remove the `:last-child` selector, because it is easy to break and the actions are intended to always be placed at the bottom of a dialog anyway. Fixes #9722. --- src/lib/dialog/dialog.scss | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/dialog/dialog.scss b/src/lib/dialog/dialog.scss index 2604ef84653..03a72fc6802 100644 --- a/src/lib/dialog/dialog.scss +++ b/src/lib/dialog/dialog.scss @@ -46,12 +46,8 @@ $mat-dialog-button-margin: 8px !default; display: flex; flex-wrap: wrap; - &:last-child { - // If the actions are the last element in a dialog, we need to pull them down - // over the dialog padding, in order to avoid the action's padding stacking - // with the dialog's. - margin-bottom: -$mat-dialog-padding; - } + // Pull the actions down to avoid their padding stacking with the dialog's padding. + margin-bottom: -$mat-dialog-padding; &[align='end'] { justify-content: flex-end;