Parent (window) width:

CSS clamp() function?

width: clamp(350px, 50%, 500px);

Element actual width: