The white-space
property in CSS-3 offers the pre-wrap
value, which maintains whitespace and line breaks while wrapping as needed, along with the pre-line
value that collapses whitespace but retains line breaks and wraps when necessary.
However, there is currently no option to both preserve whitespace and collapse line breaks while also wrapping text otherwise.
Are there any combinations of other CSS properties that can achieve this desired effect?
For instance:
This example code should render on one line but with spaces intact.