From 5bc97ec89462a2dc11fdeccf69ee41eadc265bd4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 11 Jul 2017 18:21:55 +0200 Subject: [PATCH] fix(list): subheader margin being overwritten by typography (#5652) Fixes the `.mat-subheader` margin being overwritten by the `.mat-typography` due to lower specificity. Fixes #5639. --- src/lib/list/list.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/list/list.scss b/src/lib/list/list.scss index 83c9c7906bb9..aee5121afba1 100644 --- a/src/lib/list/list.scss +++ b/src/lib/list/list.scss @@ -110,7 +110,12 @@ $mat-dense-list-icon-size: 20px; display: block; box-sizing: border-box; padding: $mat-list-side-padding; - margin: 0; + + // This needs slightly more specificity, because it + // can be overwritten by the typography styles. + .mat-list & { + margin: 0; + } } // This mixin adjusts the heights and padding based on whether the list is in dense mode.