Angular Material 2 : How to style an md-grid-tile?
To avoid messing with your whole project, use in the component:
HTML:
<mat-grid-tile [colspan]="8" class="script-menu"> </mat-grid-tile>
CSS:
.script-menu >::ng-deep .mat-figure{
justify-content: flex-start;
}
You can use ::ng-deep
to override the default css of md-grid-tile
.
css:
::ng-deep md-grid-tile.mat-grid-tile .mat-figure {
align-items: initial; /*vertical alignment*/
justify-content: initial; /*horizontal alignment*/
}
Plunker demo