[csswg-drafts] [css-text] Indent-preserving wrapping (#8733)

jakearchibald has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] Indent-preserving wrapping ==
Taking some preformated content like:

```
<div>
  <p>
    This is a really long paragraph so you'd expect some form of wrapping
    <span>
      but there are lots of different ways of handling that.
    </span>
  </p>
</div>
```

Currently, `white-space: pre-wrap` lets you wrap it like this:

```
<div>
  <p>
    This is a really long paragraph so
you'd expect some form of wrapping
    <span>
      but there are lots of different
ways of handling that.
    </span>
  </p>
</div>
```

But, with code and markup, wrapping like this is much better:

```
<div>
  <p>
    This is a really long paragraph so
    you'd expect some form of
    wrapping
    <span>
      but there are lots of different
      ways of handling that.
    </span>
  </p>
</div>
```

…where the indenting of each line is preserved.

This behaves as if each soft wrap repeats the whitespace from the start of the line (although this wouldn't appear in copied text).

It'd be nice if CSS could enable this.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8733 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 19 April 2023 11:03:40 UTC