Closed
Description
Bug, feature request, or proposal:
Bug. mat-form-field-outline gap not being calculated when the outline appearance is set using MAT_FORM_FIELD_DEFAULT_OPTIONS.
What is the expected behavior?
The mat-form-field-outline start/gap/end being calculated with the outline appearance being set using MAT_FORM_FIELD_DEFAULT_OPTIONS the same as if it were set by the appearance="outline" attribute.
What is the current behavior?
The mat-form-field-outline gap is not calculated and the outline line is drawn through the mat-label.
What are the steps to reproduce?
providers: [
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }
],
<mat-form-field>
<mat-label>Test field</mat-label>
<input matInput value="message">
</mat-form-field>
Reproducer example here: https://stackblitz.com/edit/angular-ajuprg
What is the use-case or motivation for changing an existing behavior?
Not having to manually set all mat-form-fields appearance="outline" in my application.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.1.3
Angular Material 6.4.6
Firefox 61, Chrome 68
Is there anything else we should know?
This seems related to #12555