angular / angular/components

bug(bottom sheet): align bottom sheet with m3 specs

Aperta
#32,095 1 commento 1 reazione 0 assegnatari Vedi su GitHub
area: material/bottom-sheet P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Hi Angular Material team!
I would like to highlight that the bottom sheet implementation and Material 3 specification seems to have diverged.

There is a specification for sizes and responsive behaviour of bottom sheet mentioned here: https://m3.material.io/components/bottom-sheets/specs

Right now, the workaround is to modify some CSS manually. Unfortunately, the required values are not exposed via `--mat-sys` CSS variables, so the workaround ends up using internal CSS classes selectors. In some cases, it might require using `!import` if styles are not wrapper in some parent CSS class - which is considered an anti-pattern.

Here is a version with bottom sheet styles overwrites to match Material 3 specification:
https://stackblitz.com/edit/3dhv1nhh?file=src%2Fstyles.css

Please let me know if you need any help with this in case the bug or story gets picked up — happy to support!

### Reproduction

StackBlitz link (from official material.angular.io page): https://stackblitz.com/run?file=src%2Fexample%2Fbottom-sheet-overview-example.ts&startScript=start
Steps to reproduce:
1. Open side sheet on mobile, tablet and desktop breakpoints

### Expected Behavior

- bottom sheet implementation is aligned with Material 3 specification
- with responsive width of bottom sheet, mat-bottom-sheet-container-medium, mat-bottom-sheet-container-large and mat-bottom-sheet-container-xlarge are no longer needed.

### Actual Behavior

- bottom sheet does not comply with Material 3 specification

### Environment

- Angular: 20.2.0
- CDK/Material: 20.2.0
- Browser(s): Chrome (and any other)
- Operating System (e.g. Windows, macOS, Ubuntu): macOS 26 (and any other)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con le specifiche Material 3 per i bottom sheet e con l’esempio ufficiale in src/example/bottom-sheet-overview-example.ts; confronta il suo comportamento ai breakpoint per dispositivi mobili, tablet e desktop con gli stili mostrati in src/styles.css. Il lavoro è completo quando il bottom sheet segue il dimensionamento responsive specificato senza richiedere selettori CSS interni, !important o le classi container medium, large e xlarge.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
design, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.