I want to add some spacing in between the matPrefix and matInput of mat-form-field in angular. How can I targed them in css?
here's my code:
.html:
<mat-form-field appearance="outline">
<mat-label>Username</mat-label>
<input matInput required>
<span matPrefix class="prefix"><mat-icon>person</mat-icon></span>
</mat-form-field>
css:
.prefix{
color: rgb(0,0,0,0.45);
margin-right: 20px;
}
As you can see, I tried adding class and then selecting the matPrefix with a class, it works fine with left margin, but now with right margin.