I'd like to indent the first line of paragraphs (exactly what the text-indent
CSS property does), but only for those paragraphs that take multiple lines. If a paragraph fits in a single line, I don't want it to be indented.
Is it possible to achieve a similar result?
p {
text-indent: 20px;
max-width: 350px;
}
<p>This is a pretty long paragraph which spans over a few lines. For that reason I wish its first line to be indented (as it should be).</p>
<p>These are short paragraphs.</p>
<p>I don't want them indented.</p>
<p>Unless they take multiple lines.</p>