Hi @adrianmarkperea !
I think you should def check the clamp() function, so you don't need to use min(max({MIN_SIZE}, 4vw), {MAX_SIZE}) but just clamp({MIN_SIZE}, 4vw, {MAX_SIZE}) 😉
clamp()
min(max({MIN_SIZE}, 4vw), {MAX_SIZE})
clamp({MIN_SIZE}, 4vw, {MAX_SIZE})
h1 { /* font-size: clamp(MIN_SIZE, 4vw, MAX_SIZE)}; */ font-size: clamp(2rem, 4vw, 4rem); }
h1 { /* font-size: min(max({MIN_SIZE}, 4vw), {MAX_SIZE}); */ font-size: min(max(2rem, 4vw), 4rem); }
It has the same browser support, too. MDN Reference
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @adrianmarkperea !
I think you should def check the
clamp()
function, so you don't need to usemin(max({MIN_SIZE}, 4vw), {MAX_SIZE})
but justclamp({MIN_SIZE}, 4vw, {MAX_SIZE})
😉It has the same browser support, too.
MDN Reference