CSS Variables and Angular 5
I know this is old, but a better solution than ::ng-deep is to use :host instead. This will avoid issues later on when ::ng-deep is deprecated.
:host {
--width: 43.75%;
}
Your root selector probably gets also attribute with angular component id.
Try this
::ng-deep :root {
--width: 43.75%;
}