I used the Angular Material Theming Guide (https://material.angular.io/guide/theming) to match the Style of components to our Branding. Now, I want to change a single instance of a (for exmaple) MatSelect. A MatSelect that is part of the Header and should be smaller than a regular MatSelect. Smaller in Dimension and smaller in Font Size. What is the official way of doing that?
Example:
<div class="translator">
<mat-select id="languageMenu" [(ngModel)]="selectedLang"
(selectionChange)="changeLanguage($event)">
<mat-option *ngFor="let lang of languages" [value]="lang.value">
{{lang.viewValue}}
</mat-option>
</mat-select>
</div>
You can now define the density:
https://material.angular.io/guide/theming#customizing-density
And found that solution:
"Styling the buttons less complicated since $button is a default property in typography-config. Yet for the input-fields I needed to create a custom-property in typography-config and then manually assign it via @mixin to the class-selector of the material-input-fields (.mat-mdc-form-field)"