
Adapttext.js is a dependency free and simple javascript solution capable to fit your text inside the parent element.
It calculates the maximum font-size possibile in order to keep the text’s width and height inside the parent.
It’s very useful in responsive situation and where we don’t know in advance the text’s length (text pulled from a CMS?). It is also very handy when we need to display text along an image and we want to avoid overlaps.