Re: [csswg-drafts] [css-grid] Resolution of percentage row tracks and gutters with indefinite height (#5566)

We discussed this briefly over email, but I'm bringing this discussion back to GitHub as requested. Here's a summary as to where this issue currently stands amongst a few important goals:

1. Interop - right now we don't have interop. Since Firefox already implemented this behavior, this proposal would bring interop if Blink/WebKit implement it, and another option would be for Firefox to revert to matching the existing spec. The good news is that per Rego's investigations, very few live sites will change with either proposal.

2. Spec philosophy/symmetry - grid was designed with different goals than flexbox. While grid and flexbox share many similarities, this proposal lies in one of the main differentiations between the two.

I think the clearest explanation as to the differences between grid and flexbox is this paragraph from the the grid spec introduction - https://www.w3.org/TR/css-grid-1/#intro

"Although many layouts can be expressed with either Grid or Flexbox, they each have their specialties. Grid enforces 2-dimensional alignment, uses a top-down approach to layout, allows explicit overlapping of items, and has more powerful spanning capabilities. Flexbox focuses on space distribution within an axis, uses a simpler bottom-up approach to layout, can use a content-size–based line-wrapping system to control its secondary axis, and relies on the underlying markup hierarchy to build more complex layouts. It is expected that both will be valuable and complementary tools for CSS authors."

The "Grid enforces 2-dimensional alignment" part implies that grid has symmetry between row/column behavior, while "Flexbox focuses on space distribution within an axis" implies that inline/block behavior is expected to differ in flexbox.

3. Least surprise for web developers - we want to follow the behavior that web developers expect. Rego's investigations suggest that the proposal would be less surprising than the current behavior for developers porting old layouts to grid (and would mirror flexbox's behavior). However, the above quote from the grid spec implies that it could be surprising to developers who are familiar with grid, or for someone who explicitly chooses grid over flexbox for symmetry. So where we currently stand on this goal is less clear to me. I think the working group's guidance would really help in making a decision here.

4. Implementation - This proposal has some benefit in performance. However, as noted in Rego's interop/regression investigations, % grid columns and gaps on auto-sized grids aren't commonly used by web authors, so this benefit would not be universal. I can confirm that the proposed behavior would reduce some complexity in implementation, but I don't think it's significant enough to be a deciding factor.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 29 October 2020 23:24:04 UTC