Is it possible to scale font based on width of the container?

You can use the vw (viewport width) units to set font-size.

h1 {
   font-size: 5vw;
}

1vw = 1% of the screen width.

3 Likes