W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

Re: [csswg-drafts] [css-grid] Can the sizing algo be made to deal with this

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Tue, 26 Jun 2018 22:39:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-400485843-1530052793-sysbot+gh@w3.org>
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 fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2356#issuecomment-400485843 using your GitHub account
Received on Tuesday, 26 June 2018 22:40:02 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 2 July 2022 03:21:09 UTC