Facing problem with the font-size setting issue. for sake of better readability I am changing my font-size for different devices i.e mobile,tablets and extra small devices in this way my css is increasing that is fatal for page speed and optimization as well.I just want to adjust my font-size automatically according to container size.
Here is my example code which i am writing for different devices and images for output to understand the problem
.heading{font-size: 50px;}
@media all and (min-width: 768px) and (max-width: 800px){
.heading{font-size: 40px;}
}
@media all and (min-width: 400px) and (max-width: 480px){
.heading{font-size: 30px;}
}
@media all and (min-width: 320px) and (max-width: 375px){
.heading{font-size: 20px;}
}
<h1 class="heading">Font size issue for different devices</h1>