It appears that the 64px setting is being overridden by a default value, as you mentioned.
To address this issue, we can use the syntax left: 64px !important to ensure our desired value takes precedence.
However, it's important to note that using '!important' is not compatible with ngStyle in this scenario.
As a solution, we can create a new CSS class within our stylesheet:
.leftMargin {
left: 64px !important;
}
Then, within the ngFor loop, we can apply this newly defined class only when the column name matches 'customer':
<ng-container *ngFor="let c of COLUMNS" matColumnDef="{{c.toUpperCase()}}" [sticky]="isSticky(c)">
<mat-header-cell [ngClass]="{'leftMargin': c=='CUSTOMER'}" [ngStyle]="styleHeaderCell(c)" *matHeaderCellDef mat-sort-header>
{{c.toUpperCase().split('_').join('')}}
</mat-header-cell>
<mat-cell *matCellDef="let row;">{{row[c.toLowerCase()] ? row[c.toLowerCase()] : row[c.toUpperCase()]}}
</mat-cell>
</ng-container>
You can view an example implementation on this StackBlitz page: Click here for the demo.