Orphans & Long Lines

An experiment by @andr3, inspired by Daniel Mall

Of Beren and Lúthien (an excerpt)

The problem

Then Beren looking up beheld the eyes of Lúthien, and his glance went also to the face of Melian and it seemed to him that words were put into his mouth. Fear left him, and the pride of the eldest house of Men returned to him; and he said: 'My fate, O King, led me hither, through perils such as few even of the Elves would dare. And here I have found what I sought not indeed, but finding I would possess for ever. For it is above all gold and silver, and beyond all jewels. Neither rock, nor steel, nor the fires of Morgoth, nor all the powers of the Elf-kingdoms, shall keep from me the treasure that I desire. For Lúthien your daughter is the fairest of all the Children of the World.

Then silence fell upon the hall, for those that stood there were astounded and afraid, and they thought that Beren would be slain.

(…)

If needed, resize the browser until the word "World" is alone in the last line. That's what we want to avoid.

The Anti-orphan

Children of
<span class="anti-orphan">the World.</span>
.anti-orphan {
    white-space: nowrap;
}

Then Beren looking up beheld the eyes of Lúthien, and his glance went also to the face of Melian and it seemed to him that words were put into his mouth. Fear left him, and the pride of the eldest house of Men returned to him; and he said: 'My fate, O King, led me hither, through perils such as few even of the Elves would dare. And here I have found what I sought not indeed, but finding I would possess for ever. For it is above all gold and silver, and beyond all jewels. Neither rock, nor steel, nor the fires of Morgoth, nor all the powers of the Elf-kingdoms, shall keep from me the treasure that I desire. For Lúthien your daughter is the fairest of all the Children of the World.

Then silence fell upon the hall, for those that stood there were astounded and afraid, and they thought that Beren would be slain.

(…)

You can choose how many words you want inside the anti-orphan. They will always be together, but it may refuse to line-break on smaller screens.

The Multi-level Anti-orphan

<span class="anti-orphan long-line">Children of
<span class="anti-orphan">the World.</span></span>
.anti-orphan {
    white-space: nowrap;
}
.anti-orphan.long-line {
    white-space: normal;
}

@media only screen and (min-width: 40em) {
    .anti-orphan.long-line {
        white-space: nowrap; 
    }
}

Then Beren looking up beheld the eyes of Lúthien, and his glance went also to the face of Melian and it seemed to him that words were put into his mouth. Fear left him, and the pride of the eldest house of Men returned to him; and he said: 'My fate, O King, led me hither, through perils such as few even of the Elves would dare. And here I have found what I sought not indeed, but finding I would possess for ever. For it is above all gold and silver, and beyond all jewels. Neither rock, nor steel, nor the fires of Morgoth, nor all the powers of the Elf-kingdoms, shall keep from me the treasure that I desire. For Lúthien your daughter is the fairest of all the Children of the World.

Then silence fell upon the hall, for those that stood there were astounded and afraid, and they thought that Beren would be slain.

(…)

You can choose how many words you want inside the anti-orphan. They will always be together, but it may refuse to line-break on smaller screens.

The Oldschool whitespace

Children of&nbsp;the&nbsp;World.

Then Beren looking up beheld the eyes of Lúthien, and his glance went also to the face of Melian and it seemed to him that words were put into his mouth. Fear left him, and the pride of the eldest house of Men returned to him; and he said: 'My fate, O King, led me hither, through perils such as few even of the Elves would dare. And here I have found what I sought not indeed, but finding I would possess for ever. For it is above all gold and silver, and beyond all jewels. Neither rock, nor steel, nor the fires of Morgoth, nor all the powers of the Elf-kingdoms, shall keep from me the treasure that I desire. For Lúthien your daughter is the fairest of all the Children of the World.

Then silence fell upon the hall, for those that stood there were astounded and afraid, and they thought that Beren would be slain.

(…)

in The Silmarillion by J. R. R. Tolkien