From 49af49bb019b93e48a1f6386a1b0b9ab20989a23 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 24 Sep 2024 15:34:22 +0200 Subject: [PATCH] fix(material/datepicker): set explicit line height on calendar (#29770) Sets a `line-height` on the calendar, otherwise it inherits the one from the `body` which can throw off the layout. Fixes #29756. --- src/material/datepicker/calendar.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/material/datepicker/calendar.scss b/src/material/datepicker/calendar.scss index 2d45a130b15f..91c0ee44827e 100644 --- a/src/material/datepicker/calendar.scss +++ b/src/material/datepicker/calendar.scss @@ -27,6 +27,9 @@ $_tokens: tokens-mat-datepicker.$prefix, tokens-mat-datepicker.get-token-slots() .mat-calendar { display: block; + // Prevents layout issues if the line height bleeds in from the body (see #29756). + line-height: normal; + @include token-utils.use-tokens($_tokens...) { @include token-utils.create-token-slot(font-family, calendar-text-font); @include token-utils.create-token-slot(font-size, calendar-text-size);