I use webcomponents to create a library of components which should be reusable by my team.
I can add style to my components to be responsive and adapt themselves to the viewport.
My problem now is that in some cases, a component can be placed either as an aside of the app or in the main part. So for the same viewport, the component can have a small width container or a full width depending where it's placed.
Is there a way to make "media queries" relative to the parent ?
Note: this question is not only for the size of the element which can be set easily with em or % units, but it can be for colors or display type.