It took me the whole day to find a workaround for a problem I just wonder why it is not more commonly discussed here. I am facing a problem with Safari 13.1.1. when try to resize the browser window. It just does not dynamically resize (based on calculated viewpoint width) the font-size as it should:
html {
font-size: calc(1em + 1vw); /* not working when resizing */
}
My workaround works fine:
html {
font-size: 1vw; /* initialise first without calc() */
}
body {
font-size: calc(1em + 16px); /* now working fine when resizing */
}
As you can see you need to first initialise viewpoint width without calc(). The default font-size needs to be added in px. Now it works fine and the text resizes as it should when the window is resized.
My question: Why this strange behaviour? Any explanation? Or just a bug?