Truncated text

The text below in green boxes should be magically truncated so that it only occupies one line of text; the remaining text should be chopped off. Resize the window to see it dynamically add and remove words from the text to maintain this state of affairs.

This is a pure CSS technique.

A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on. A short text section with text truncation turned on.
A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation. A short text section without text truncation.
A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation. A page-width text section with truncation.
A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation. A page-width text section with no truncation.