Is there a way to prevent the scaled inner width from exceeding 50px when the outer width is dynamic?
Basically, looking for a max-width equivalent for scaling.
.outer {width: 200px; height: 100px; background-color: yellow; position: relative}
.inner {transform: scale(0.5); background-color: red; transform-origin: center center;}
<div class="outer">
<div class="inner"> </div>
</div>