Re: [csswg-drafts] [css-display-4] reading-flow and mix of auto-flow and explicit items (#11208)

A very simple example is as I described previously, and you can see in [this demo](https://chrome.dev/reading-flow-examples/grid-order.html). This uses `reading-flow: grid-order`, with `order: -1` on one item. The ordered item is then visited first and the others then in DOM order.

In something like https://webkit.org/demos/grid3/museum/  however you might want to visit that side item first (or last) but also perform `grid-row` type ordering on the masonry items. The two options I can think of are as follows.

To add back the property on items (which we didn't do initially but the door is open to do that), which would allow for an explicit reading-flow order to be set on some items, with any items that don't have an order set using the value as set on the parent with `reading-flow`. I think if we want to do that it could be deferred to the next level of the spec as it's an addition and it would be good to see what real use cases there are.

The other thing is, the examples like this I can think of only really apply to automatic layout methods in grid (masonry and dense packing). If that's the case, could this be part of the decision we make about automatically applying reading-flow in those layout methods? So, with masonry for example. We make it so by default we follow the masonry-flow (as I describe in https://github.com/w3c/csswg-drafts/issues/5675#issuecomment-2565155995) AND also take the `order` property into account, for reading flow purposes. That feels like what you are trying to achieve in that demo, though it might be that just pushes the problem down the road and there are more cases better solved by adding in a property for the children.

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


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

Received on Tuesday, 31 December 2024 11:37:32 UTC