Re: [csswg-drafts] [css-text] pre-wrap and tabs at the end of the line (#3869)

I'll go with the assumption @fantasai was making: no breaking between tabs (or spaces) in a sequence of them. So the remaining question seems to be: hang or no hang. Here's an example:

Let's assume a Tab Separated Value file like this:
```
<style>.tsv { white-space: pre-wrap; }</style>
<pre class=tsv>Field1&#9;Field2&#9;Field3&#9;Field4
A&#9;B&#9;&#9;
1&#9;2&#9;3&#9;4
</pre>
```
It would render something like that ("_" mark tab-induced shifts)
```
Field1__Field2__Field3__Field4
A_______B_______________
1_______2_______3_______4
```
Now, let's say we set `pre { width: 16ch; }`.

If Tabs hang, it looks like this:
```
|Field1__Field2__|
|Field3__Field4  |
|A_______B_______|________
|1_______2_______|
|3_______4       |
```
If they don't:
```
|Field1__Field2__|
|Field3__Field4  |
|A_______        |
|B_______________|
|1_______2_______|
|3_______4       |
```

And for what it's worth, if we did allow wrapping between tabs and disallow hanging, we'd get this:
```
|Field1__Field2__|
|Field3__Field4  |
|A_______B_______|
|________        |
|1_______2_______|
|3_______4       |
```

Here's a live demo of that example:
https://jsbin.com/regoquzame/edit?html,css,output

* Firefox does behavior 2 (don't hang)
* Safari and Chrome do behavior 1 (do hang)

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3869#issuecomment-509811620 using your GitHub account

Received on Tuesday, 9 July 2019 21:13:22 UTC