Reputation: 24462
I have one <md-toolbar>
and I want to change his height.
<md-toolbar color="primary">Cards</md-toolbar>
I simply tried this in my component.scss
:
md-toolbar {
height: 50px !important;
min-height: 50px !important;
}
But the text padding goes wrong (space from top is much bigger than the space from the bottom):
I tried to set the padding
and margin
to 0
but it didn't make any changes.
My questions
md-toolbar
height?Upvotes: 4
Views: 6705
Reputation: 21
I ended up adjusting the margin for the container that was below the toolbar to match the height of the toolbar which varied for desktop and mobile as below...
.mat-sidenav-container {
margin-top: 64px;
@media (max-width: 720px)
{
margin-top: 56px;
}
}
Upvotes: 2
Reputation: 117
If you use <mat-toolbar>
, you can add in the css file
mat-toolbar{
margin-top: -10px;
margin-bottom: -10px;
}
Upvotes: 0
Reputation: 1999
There's a default predefined row inside the toolbar. You also need to alter that row's height:
md-toolbar {
height: 50px !important;
min-height: 50px !important;
md-toolbar-row {
height: 50px !important;
}
}
Upvotes: 0
Reputation:
You could use the flex layout module from Angular :
<md-toolbar fxLayout="row" fxLayoutAlign="space-between stretch"></md-toolbar>
Upvotes: 0
Reputation: 948
Adding vertical-align: middle;
to the text should center in the middle vertically.
Upvotes: 0