<div class="scroll-element-content" [ngStyle]="{'width.px': (this.width + this.trackWidth)}">
With this.width set to 400 and this.trackWidth set to 8:
The combined width of .scroll-element-content will be 4008 (since the sum is treated as a string).
Both this.width and this.trackWidth are declared as numbers.
height: number;
width: number;
trackWidth: number;
An alternative solution I found for adding them together is:
<div class="scroll-element-content" [ngStyle]="{'width.px': (this.width - (-this.trackWidth))}">
However, this solution may not be aesthetically pleasing. Does anyone have a better fix?