Re: [csswg-drafts] [css-text-3] Should preserved white space overflowing be visible ? (#4038)

@javifernandez both behaviors are currently allowed by the spec:
> If white-space is set to pre-wrap, the UA must hang this sequence if it does not otherwise fit prior to justification. It may also visually collapse the character advance widths of any that would otherwise overflow. 

This is intentional: there was a theoretical preference for not allowing the spaces to be collapsed (i.e. for what is currently the Chrome behavior), as it makes editing/selecting etc easier, but there is currently no interop on this (as you are pointing out in this bug), and browser vendors said they did not plan on changing this in the short term. So we decided to allow both, thinking that me may later be able to come to an agreement in level 4.

Interestingly, when we made that decision, Chrome and Safari used to collapse the spaces that overflow, and Firefox and Edge did not. Since then, Chrome and Firefox have swapped behavior. However, Chrome continues to collapse the spaces that overflow if the element is editable (using `<textarea>` or the `contenteditable` attribute). Despite that change, we continue to have multiple behaviors, so I don't think we're closer to resolving on a single one (although I'd be happy only allow hanging and no collapsing if browsers were willing).

----
PS: in the second example, your fix for the chrome's bug has been landed, and it now looks like this:

 <img width="78" src="https://user-images.githubusercontent.com/113268/60903980-93229780-a272-11e9-820f-c02466fd6c59.png">

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

Received on Tuesday, 9 July 2019 15:57:24 UTC