If I distort a container with the skew property, then the short corners are inside the original dimensions and the long corners are outside. This can be seen in diagram 1 with the blue box.
diagram 1 :
However, I would like the outer corners not to exceed the original width, as in diagram 2 with the red box.
diagram 2 :
I could basically solve this with margin, but the protruding width depends on the length of the container.
Is there a way not to exceed the original width?
I have tried to work with margin, but since the height of the box is not known, I cannot calculate the margin