IgxGrid layout issue with global font settings
Question
I want to set font-size globally – e.g. 11px. Then the header layout of IgxGrid becomes broken. As you can see from the screenshot, the header cell height is not enough and there is a space underneath. How can I set font-size globally and use IgxGrid without issue?

You can see it on this sample. https://stackblitz.com/edit/angular-timgrc?file=src/styles.scss
- igniteui-angular version: 7.2.4
- browser: n/a
@ymita In general, the igx-typography should be used to change the fonts for the components.
https://www.infragistics.com/products/ignite-ui-angular/angular/components/themes/typography.html
@ymita This is not an issue with the theming. The issue lies with how we calculate the height for multicolumn headers. Since the height is calculated using javascript, it doesn't care about font size, thus not resizing when everything else changes scale. The themes use relative units, so changing the global font size should generally scale every component in your app.
@zdrawku Hi How much effort will this be ?
Hi @simeonoff , here is a workaround I figured out.
Can you apply fix based on this workaround?
:host::ng-deep {
// Workaround for #4519
// change display from block to flex
.igx-grid__thead-item {
display: flex;
flex-flow: column nowrap;
}
.igx-grid__thead-item {
// void auto sizing
> .igx-grid__thead-title {
flex: 0 0 auto;
}
> .igx-grid__thead-group {
flex: 1 1 auto;
}
}
.igx-grid__thead-item {
// auto sizing header height
> .igx-grid__th {
flex: 1 1 auto;
}
}
// In addition,
// if you want to shrink header height according to font size,
// you need to apply the following styles.
.igx-grid__thead-wrapper {
height: 10rem !important;
}
.igx-grid__th {
height: auto !important;
}
}
@kdinev @mpavlinov @simeonoff Can you add the bug fix to 7.3.x as well?
@ymita Done
@rkaraivanov Thanks!