Using mat-sidenav
from Angular Material I have a problem with a fixed positioned element and centering it according to centered content within the mat-sidenav-content
element.
One possible solution might be to calculate the width of the scrollbar and use this to align the fixed element accordingly, but this seems to be a bit ugly.
I prepared a Stackblitz illustrating the problem: https://stackblitz.com/edit/angular-u9ucr6
The goal is to have both colored elements being centered in respect to the scrollbar of mat-sidenav-content
.
Any ideas?