Skip to content

Conversation

@hzhu
Copy link

@hzhu hzhu commented Jun 14, 2019

The CSS value pre-wrap was a use case in my day to day work and I would like to add it to Tachyons. I think it others might find it helpful too. In this use case, I would like to preserve white space, but also wrap text so it doesn't extend out pass containing <div>s.

Using pre, notice the text extends beyond the containing element:
Screen Shot 2019-06-14 at 12 42 50 PM

Using pre-wrap, notice the text wraps:
Screen Shot 2019-06-14 at 12 43 29 PM

@orionrush
Copy link

+1

pre-wrap value allows sequences of white space to be preserved. Also the lines
are broken at new line characters, at `<br>`, and as necessary to fill line
boxes.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space#Values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants