Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-wrap value to the white-space CSS property #625

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

None yet

2 participants