This Git repo provides the code to resize text to be the max size possible without going outside of the element they are inside of.