- From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
- Date: Tue, 10 Jan 2017 23:02:35 +0000
- To: public-css-archive@w3.org
frivoal has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-line-grid] simplification to line-grid level 1 == One of the major source of complexity of the line grid is that in some cases, it can make the position depend on the size AND the size depend on the position, or (equivalently?) that it can make the intrinsic size depend on the position. For example, if you create the grid on a vertical flexbox, and snap to the grid in the flex items, you're in trouble. Because of flexbox, the position of the various items depends on their size. But because of the line grid snapping, their size depends on their position. Not all use cases for line grid depend on this problem being solved, but there are a number of use cases that do. For instance, using line-grid and grid together is desirable, and runs into the same issues. So we should solve it. At the same time, this is currently a large gap in the spec, and a big chunk of complexity that implementors are not enthusiastic about tackling immediately. So it would be good if we could solve that part later. Here is a proposal to simplify line-grid for level 1 in a way which postpones this problem, while being completely compatible with the current definition so that we can reintroduce it in level 2 when we're ready to tackle the complexity. 1. add an `auto` value to the line-grid property, and make it the initial value. It does the same as match-parent on all elements, except elements that establish a BFCs where it would instead do the same as create 2. In level 1, remove the explicit `match-parent` value (but keep the behavior, since it is invoke by auto on most elements). 3. In level 2, bring back `match-parent`, and define how to resolve the cases where that makes size and position interdependent. As far as I can tell, this is enough make sure that you never have situations (in level 1) where the size depends on the position AND the position depends on the size. The simplification comes from part 2 but we need part 1 to keep the line-grid usable without the explicit `match-parent` value. --- Side point: Even if an implementer was willing to bite the bullet and solve the interdependency problem now, I think the addition of the `auto` value would still be useful. In many cases it will create the grid on the right element without the author having to use the `line-grid` property manually, making it possible to merely use the line grid with the `line-snap` property without having to bother defining it. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/880 using your GitHub account
Received on Tuesday, 10 January 2017 23:02:41 UTC