Trying to figure out how to set font size of mat-tab-label based on screen size (below 400px).
I tried putting custom configs in different media queries like this @include mat-tabs-typography($tabs-typography-mobile); without success.
I also tried experimenting with BreakpointObservers, but not sure how to target that specific property as I understand Sass very little:
this.observer.observe('(max-width: 400px)').subscribe(result => {
if (result.matches) {
document.documentElement.style.setProperty(???);
}
});
Also tried to target specific element with "View Encapsulation" method, but that just messes up entire layout of the page, so its probably last resort.
Here is the code, I'm trying to change the font size of "label-one", "label-two" and "label-three":
<mat-tab-group mat-stretch-tabs dynamicHeight>
<mat-tab label="label-one">
<div class="tab"></div>
</mat-tab>
<mat-tab label="label-two">
<div class="tab"></div>
</mat-tab>
<mat-tab label="label-three">
<div class="tab"></div>
</mat-tab>
</mat-tab-group>