Qaisa Qaisa - 2 months ago 5x
Javascript Question

Using CSS3 font-stretch instead of wrapping

I have a div with a text that overflows when viewed from a phone. Is it possible to detect that the text is overflowing and change the font-stretch property automatically?


I could not detect wrapping, and ended up using a @media rule to condense the text:

 @media screen and (max-width: 800px) {
     body {
        font-stretch: condensed;
     } }