Skip to content

Proposal: Ability to add extra class(es) to dialog container #4653

@willshowell

Description

@willshowell

Bug, feature request, or proposal:

Proposal

Use Case 1:

I have a dialog that I want to be full-bleed (in my case, it contains just a map)

this.dialog.open(MyMapDialogComponent, { containerClass: 'full-bleed' })

.mat-dialog.container.full-bleed {
  padding: 0;
}

Use Case 2:

I want to make my dialog full screen:

this.dialog.open(MyBigDialogComponent, { containerClass: 'full-screen' })

.mat-dialog-container.full-screen {
  max-width: none;
  width: 100vw;
  height: 100vh;
}

This wouldn't be too different from backdropClass or snackbar's extraClasses and it would solve #3209

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions