Bug(Dialog): Dialog size is fixed and can't be changed
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
### Is this a regression?
- [X] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
16-
### Description
Exist a property that make all dialogs appear at the same exact size at this class:
.cdk-overlay-pane.mat-mdc-dialog-panel
max-width: var(--mat-dialog-container-max-width, 80vw);
If you replace it with this at style.scss now it works fine and resize based on your elements
.cdk-overlay-pane.mat-mdc-dialog-panel {
max-width: 100% !important;
}
### Reproduction
StackBlitz link: No link
Steps to reproduce:
1. use a dialog and try change your modal size using dialog config ex. width: '100%'
const dialogConfig: MatDialogConfig = {
hasBackdrop: true,
disableClose: true,
width: '100%'
};
At past versions it dosnt matter, resize based on your styles and structure.
### Expected Behavior
Dialog resize based on component structure
### Actual Behavior
Dialog size appear fixed and can't change base on component elements
### Environment
- Angular: 18.0.3
- CDK/Material: 18.0.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
Guía de contribución
Línea de trabajo
Comienza reproduciendo el problema con la configuración width de Angular Material's MatDialogConfig e inspecciona la regla max-width de .cdk-overlay-pane.mat-mdc-dialog-panel descrita en el informe. Compara el comportamiento actual del tamaño del diálogo con el de la versión anterior; se considera terminado cuando el ancho del diálogo responde al valor configurado y al contenido del componente sin requerir un override global con !important.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, css, typescript
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 58/100