According to angular style guide , the style should not flow from parent to child
ie -> the component that has your < component-selector > should not take care of child's style.
What you should do is, make use of host-context.
Apply a class to the parent (let's say widht-mid). In the child's css you need to check that does my parent has a class widht-mid, if yes then it should change it's width.
In the child's css file ->
:host-context(.width-mid) table{
width: 50px
}
You should not transfer styles from parent to child essentialy because it spoils the ViewEncapsulation goodness that Angular is proud of. Here is some refrence . :Style Guide (also the above answers are deprecated, and angular team is thinking of removing them entirely)
Also, the child component should be responsible for how does it table looks. The parent should be concerned about itself. In the future, if you will have two children to your parent (it two < component-selector > . in one parent), it will be difficult to manage what style to pass to what child. Using this method, altering style is not only easy but also manageable.
Upvote and mark as solved if I was able to help.Cheers.