Re: [csswg-drafts] [css-text-3] Audit details of break-spaces value against use cases

Reposting a comment @fantasai accidentally made in the wrong issue:

----

Wanted to add some background: the proposal comes out of a discussion between me and Koji about the implementation of `overflow-wrap: break-spaces`.

The current syntax is `overflow-wrap: break-word || break-spaces` and Koji asked about splitting `overflow-wrap` into two longhands to simplify implementation. This was my response, which I'd advise everyone (regardless of interest in this particular property) to read since it's about principles that inform our decisions about property design.

> I think that adding properties is more overhead on the authors—there is more to learn and memorize—so while it might be a little more awkward for implementors, it's better for CSS overall to avoid adding properties when they aren't necessary, for the authors' benefit.
> 
> (We made a mistake in Flexbox by splitting some of the properties for implementors' convenience, and now authors frequently get themselves in trouble by using longhands when they needed the shorthands to perform appropriate resets.)
> 
> For authors, the reason to have separate properties is if it's needed to cascade the settings independently. If I think about that, then I would say that `break-word` and `break-spaces` are not very closely related, and probably should cascade independently.
> 
> However, this makes me think also that `white-space: pre-wrap` and `overflow-wrap: break-spaces` should _not_ cascade independently, so maybe it makes the most sense to shift the `break-spaces` value to the `white-space` property, e.g.
>
> ```
> white-space: normal | nowrap | pre | pre-lines | pre-wrap | break-spaces
> ```
>
> These are all mutually exclusive options on `white-space`: being able to combine `break-spaces` with any other value than `pre-wrap` is impossible, so the adjusted syntax reflects that structural relationship.
> 
> And this solves your implementation concern as well.


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

Received on Wednesday, 27 June 2018 00:43:18 UTC