scale text to fit container size

HTML

<div class="kotainer">
    <svg width="100%" height="100%" viewBox="0 0 500 100" preserveAspectRatio="none">
        <foreignobject x="10" y="10" width="480" height="90">
            <div class="kotainee">
                hello, world!
            </div>
        </foreignobject>
    </svg>
</div>
<div class="kotainer">
    <svg width="100%" height="100%" viewBox="0 0 500 100" preserveAspectRatio="xMidYMid meet">
        <foreignobject x="0" y="0" width="500" height="100">
            <div class="kotainee">
                hello, world!
            </div>
        </foreignobject>
    </svg>
</div>
<div class="kotainer short">
    <svg width="100%" height="100%" viewBox="0 0 500 100" preserveAspectRatio="xMinYMin meet">
        <foreignobject x="10" y="10" width="480" height="90">
            <div class="kotainee">
                hello, world!
            </div>
        </foreignobject>
    </svg>
</div>

CSS

.kotainer {
    width: 60%;
    height: 200px;
    border: 1px solid teal;
}
.kotainee {
    font-size: 80px;
}
.kotainer.short {
    height: 50px;
}