Re: [csswg-drafts] [css-display-4] Add inner and outer display properties (#4729)

> can't people can already specify that combination?

No, `display: table-cell grid` is invalid syntax.

> Unless it's illegal, in which case what difference would having separate properties for `display-inside` and `display-outside` make?

If `display-inside` and `display-outside` are added, then
 - `display: table-cell` would seemingly expand to `display-outside: table-cell; display-inside: flow-root`, i.e. `table-cell` would need to be valid syntax for `display-outside`.
 - `display: grid` would seemingly expand to `display-outside: block; display-inside: grid`, i.e. `grid` would need to be valid syntax for `display-inside`.

So `display-outside: table-cell; display-inside: grid;` would be valid syntax, but nobody wants to implement it for now.

> Just specify that the combination of particular values is also illegal.

It's not that simple. There is no mechanism to treat a usually valid value as invalid syntax depending on the value of another property. Actually this can't be done at specified value time, since we may not know the resolved values of both properties until computed-value time (there might be a `var()` or `inherit`).

What could potentially be done is, at computed-value time, say that e.g. if `display-outside` computes to `table-cell`, then `display-inside` must compute to `flow-root` even if some other value was specified. Or maybe make both of them [invalid at computed-value time](https://drafts.csswg.org/css-variables-1/#invalid-at-computed-value-time) or something (there are various possibilities to prevent the combination at computed-value time, which one is better?).

However, if in the future browsers are willing to implement a `table-cell grid` combination, then it will be a breaking change. There might be some sites that rely on this combination not working, so they break once it works.

Is the risk worth it? I don't know, but if you think so, it may be better if you read the spec, come with a clear proposal, and try to convince the editors about that. Saying that they are disconnected from the reality of contemporary web development is not productive.

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

Received on Wednesday, 1 April 2020 22:06:15 UTC