-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolbar in Dialog #5537
Comments
You can use the panelClass to customize the dialog: https://plnkr.co/edit/s2RVEBQVxtDUmUBlUp2t?p=preview. Take a look at this @willshowell's #3239 (comment) |
There's no built-in support or plans to support it? I tried to declare the css at the component level since those definitions should not be on the global scope. It doesn't appear to work though: Plunker |
I don't know (probably will, becase it is in material design specs under the title "Full-screen dialog titles"). @crisbeto can tell you this.
In that case you must set encapsulation to none in
|
@crisbeto thoughts? I could potentially see this as an option on the dialog-title |
It makes sense to have it on the title, but I'm reluctant to add a dependency between the toolbar and the dialog. I'd rather duplicate some styles and add a |
Yeah, I was thinking more of an option to not have any padding |
What is wrong with nagative margin on |
There's nothing inherently wrong with reusing |
Maybe the Dialog could load a component that has a toolbar and a portal to then load a template or component in that portal.
|
.mat-toolbar {
margin: -24px;
margin-bottom: 0;
width: auto;
}
.mat-dialog-content {
margin: 0 -24px;
padding:0 !important;
}
.mat-toolbar-row, .mat-toolbar-single-row {
height: 40px !important;
} |
I solved creating a simple new component like this: mat-toolbar-dialog.component.ts
mat-toolbar-dialog.component.scss
mat-toolbar-dialog.component.html
And just use like that:
|
I just started migrating from ng1 to ng2, and the lack of toolbar in dialog support out of the box is a bit of a surprise. How hard would it be to make this happen. |
Closing this since the Material Design 2018 spec update moved away from the idea of the colored "toolbar" at the top of content, so we're not doing much with it now. At the end of the day, though, the toolbar is little more than a div with a background color. |
Does that mean you will be retiring components like |
Will the |
I don't believe that is part of the spec. However, you can always add a |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Is there any support or planned support for
md-toolbar
in dialog/modal/popups? Inangularjs-material
this was a built-in feature:What I observe in
angular-material2
is a padding that applies to the whole dialog box which prevents the toolbar from properly extending from end to end:The text was updated successfully, but these errors were encountered: