I have an h1
<h1>Title Of Thing<h1>
The h1 is 200px width
h1{width:200px;}
While the h1 is indeed 200px wide, the text inside of the h1 does not fit that entire width.
I would expect to be able to make font-size 100%
h1{font-size:100%;}
But of course that only makes the font-size 100% of the default and has nothing to do with the h1 container.
I need the font size inside of the h1 to dynamically fit the width of the H1 because I want to change the width of the h1 sometimes. This means that the hight of the h1 of course needs to adapt so that the text does not get clipped.
I am disappointed that this is not the default behavior of H tags.
There is something called fit-content which does the exact opposite of what I need.
h1{width: fit-content;}
This makes the h1 shrink to the size of the text inside of it. But I need the text to expand to the size of the H1.