Left Aligning the Text Within an Angular Material Button

--

Scenario

We have an Angular Material raised button and we want the within it to be left aligned rather than centered.

Approach

Since Angular Materials buttons use a flex layout, we need to add the justify-content: flex-start; style.

[mat-raised-button] {
justify-content: flex-start;
}

Demo

--

--

Ole Ersoy

Founder of Firefly Semantics Corporation