I also placed a lot of importance in media queries until I learned about the clamp function. It lets you specify a minimum and maximum sizes (in absolute size) and an ideal size between them (in relative size). It's good to be paired with minmax too.
Works great for responsive elements sizes, but where it excels is with making font sizes responsives. I was amazed that after learning this, I was able to reduce a lot of the rules that needed to vary per media query and I was able to cut my stylesheets by half.
Some comments have been hidden by the post's author - find out more
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.
I also placed a lot of importance in media queries until I learned about the
clamp
function. It lets you specify a minimum and maximum sizes (in absolute size) and an ideal size between them (in relative size). It's good to be paired withminmax
too.Works great for responsive elements sizes, but where it excels is with making font sizes responsives. I was amazed that after learning this, I was able to reduce a lot of the rules that needed to vary per media query and I was able to cut my stylesheets by half.