From 1dcb888fa1239342691e6a8d04e7ba5c1f166452 Mon Sep 17 00:00:00 2001 From: Laxminarayan Chandrashekar <5959880+lxminarayn@users.noreply.github.com> Date: Fri, 27 Nov 2026 10:17:24 +0530 Subject: [PATCH] feat(material/bottom-sheet): add a styling token for the container elevation Previously the shadow of the bottom sheet container was hardcoded to elevation 16 and couldn't be changed through tokens. Adds a `container-elevation-shadow` token to `bottom-sheet-overrides`, matching the existing token of the dialog, menu, select and autocomplete panels. The default rendering stays the same in both M2 and M3. --- src/material/bottom-sheet/_m2-bottom-sheet.scss | 2 ++ src/material/bottom-sheet/_m3-bottom-sheet.scss | 2 ++ src/material/bottom-sheet/bottom-sheet-container.scss | 3 +-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/material/bottom-sheet/_m2-bottom-sheet.scss b/src/material/bottom-sheet/_m2-bottom-sheet.scss index f4a0889bae34..acd7db018bf3 100644 --- a/src/material/bottom-sheet/_m2-bottom-sheet.scss +++ b/src/material/bottom-sheet/_m2-bottom-sheet.scss @@ -1,3 +1,4 @@ +@use '../core/style/elevation'; @use '../core/tokens/m2-utils'; @use 'sass:map'; @@ -7,6 +8,7 @@ @return ( base: ( bottom-sheet-container-shape: 4px, + bottom-sheet-container-elevation-shadow: elevation.get-box-shadow(16), ), color: ( bottom-sheet-container-text-color: map.get($system, on-surface), diff --git a/src/material/bottom-sheet/_m3-bottom-sheet.scss b/src/material/bottom-sheet/_m3-bottom-sheet.scss index 87420eb865bd..5118587b04c9 100644 --- a/src/material/bottom-sheet/_m3-bottom-sheet.scss +++ b/src/material/bottom-sheet/_m3-bottom-sheet.scss @@ -1,4 +1,5 @@ @use 'sass:map'; +@use '../core/style/elevation'; @use '../core/tokens/m3-utils'; @use '../core/tokens/m3'; @@ -8,6 +9,7 @@ @return ( base: ( bottom-sheet-container-shape: 28px, + bottom-sheet-container-elevation-shadow: elevation.get-box-shadow(16), ), color: ( bottom-sheet-container-text-color: map.get($system, on-surface), diff --git a/src/material/bottom-sheet/bottom-sheet-container.scss b/src/material/bottom-sheet/bottom-sheet-container.scss index 8fd8c681664c..ed4b839c121b 100644 --- a/src/material/bottom-sheet/bottom-sheet-container.scss +++ b/src/material/bottom-sheet/bottom-sheet-container.scss @@ -1,5 +1,4 @@ @use '@angular/cdk'; -@use '../core/style/elevation'; @use './m3-bottom-sheet'; @use '../core/tokens/token-utils'; @@ -33,7 +32,7 @@ $fallbacks: m3-bottom-sheet.get-tokens(); } .mat-bottom-sheet-container { - @include elevation.elevation(16); + box-shadow: token-utils.slot(bottom-sheet-container-elevation-shadow, $fallbacks); padding: $container-vertical-padding $container-horizontal-padding; min-width: 100vw;