Adjusts a text's font size to the maximum it can be, whilst still fitting onto a specified amount of lines.
~500 bytes minified.
<h1 class="ftol hero">
Some text that you want to exactly fit on a certain amount of lines
</h1>
then use the min-height
css attribute to specify how many lines you want the text to fit onto, 1px = 1 line
, 2px = 2 lines
, etc.
.hero {
min-height: 2px;
}
Tested in all major browsers, IE9, FF old, Chrome older, Safari 6, Android 4.4, iOS 6