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

The CSS Working Group just discussed `[css-display-4] reading-flow and mix of auto-flow and explicit items `, and agreed to the following:

* `RESOLVED: Add a source-order value to reading-flow.`
* `RESOLVED: reading-flow: source-order works on block containers. reading-order applies to block-level boxes, and not to inline-level boxes`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> TabAtkins: last time we discussed thre was a question about whether reading order is the one that explicitly sets an element to a particular spot<br>
&lt;kbabbitt> ... rather than relying on visual stuff<br>
&lt;kbabbitt> ... should work without opting into one of the other explicit reading flow values<br>
&lt;kbabbitt> ... whether it should be explicit or implict etc<br>
&lt;kbabbitt> ... authors had opinions in thread<br>
&lt;kbabbitt> ... the idea of having a reading-flow value that does no reordering by default but just gives side effects<br>
&lt;hober> fs<br>
&lt;kbabbitt> ... sounds perfectly reasonable<br>
&lt;kbabbitt> ... we didn't do this before because just tab-index was the side effect<br>
&lt;kbabbitt> ... but with reading order in display now it makes sense to have a reading-flow value that does no implicit reordering<br>
&lt;kbabbitt> ... just reordering that author asked for<br>
&lt;kbabbitt> ... we do however feel strongly that it needs to be a new keyword<br>
&lt;kbabbitt> ... rather than a default behavior that can trigger anytime an eleement has reading order<br>
&lt;kbabbitt> ... fantasai was suggesting that if any element has reading order it automatically makes parent into a reading flow container<br>
&lt;kbabbitt> ... emilio disagreed on perf implications<br>
&lt;kbabbitt> ... can't tell if something is a reading-flow container just from element itself<br>
&lt;kbabbitt> ... grid with a whole bunch of autoflow children can be an expenseive operation<br>
&lt;kbabbitt> ... I think becoming a reading flow container has side effects<br>
&lt;kbabbitt> ... having a child with reading order would implicitly apply side effects to siblings<br>
&lt;kbabbitt> ... this would happen if you have the same markup several times on a page or across multiple pages<br>
&lt;kbabbitt> ... only some have a reading order child or have a reading order child that is hideable<br>
&lt;kbabbitt> ... will change whether side effects apply to everything else<br>
&lt;kbabbitt> ... seems not great, just as hard for authors to predict as stated concern<br>
&lt;kbabbitt> ... that authors would not be able to predict whether reading flow works by default<br>
&lt;kbabbitt> ... so we are pretty strongly against reading flow working by default for these reasons<br>
&lt;kbabbitt> ... should instead opt into reading order<br>
&lt;kbabbitt> ... fantasai's third point in response was forward compatibility<br>
&lt;kbabbitt> ... if reading order automatically turns on reading flow containers, that only works if everything can be a reading order container<br>
&lt;kbabbitt> ... or if we fix the set of block types that can ever be reading order containers<br>
&lt;kbabbitt> ... otherwise others could set reading order on a block which would do nothing today<br>
&lt;kbabbitt> ... we could define it in the future and it would turn on suddenly causing side effects that they don't expect<br>
&lt;kbabbitt> ... fantasai suggested we could go ahead and define block-level reading flow right now in trivial case of no reordering<br>
&lt;kbabbitt> ... we're not super comfortable with that<br>
&lt;kbabbitt> ... display:block order is going to be complicated anyway<br>
&lt;kbabbitt> fantasai: I don't think so, we're not proposing to add new visual order<br>
&lt;kbabbitt> ... just saying you can have normal flow order and also apply reading order different from source order<br>
&lt;kbabbitt> ... you ahve an order that's the source order, you don't have a magic order, just saying reading order shoulda pply to source order like in a flexbox<br>
&lt;kbabbitt> ... don't think floats etc. introduce any more complexity<br>
&lt;kbabbitt> ... just as simple as a flexbox that doesn't have any order properties<br>
&lt;kbabbitt> chrishtr: almost a no-op?<br>
&lt;kbabbitt> fantasai: no because if you set reading order on... eg. I have a section with a heading and a couple of paragraphs<br>
&lt;kbabbitt> ... if I set reading order -1 on the heading it would pull up the heading above the paragraphs<br>
&lt;kbabbitt> ... no magic about floats, because that would require a new value for reading-flow<br>
&lt;kbabbitt> ... which would be magic block reordering something<br>
&lt;kbabbitt> ... we're not suggesting that<br>
&lt;kizu> present-<br>
&lt;emilio> q+<br>
&lt;kbabbitt> TabAtkins: it does sound like a potentially doable behavior for block but our opinion is still towards not triggering by defau;t<br>
&lt;kbabbitt> ... our ideal conclusion would be to add a no-op value that just makes something a reading flow container<br>
&lt;astearns> ack JoshT<br>
&lt;kbabbitt> ... and doesn't do anything else special<br>
&lt;kbabbitt> ... define that it works for everything<br>
&lt;kbabbitt> ... not everything because we still want tables to be handleable in a different way<br>
&lt;kbabbitt> ... so define it for blocks and call it a day<br>
&lt;kbabbitt> fantasai: this gets into another issue about initial value of reading-flow<br>
&lt;kbabbitt> ... next issue<br>
&lt;kbabbitt> ... having initial value being smarter than sort order<br>
&lt;kbabbitt> ... adding new value that is strict source order<br>
&lt;kbabbitt> ... with those two, the strict source order could be the value we use here<br>
&lt;astearns> q+<br>
&lt;kbabbitt> emilio: agree with TabAtkins<br>
&lt;kbabbitt> ... did we decide whether reading order affects a11y tree as well?<br>
&lt;kbabbitt> fantasai: yes<br>
&lt;kbabbitt> emilio: I don't know exact order of abspos and floats right now<br>
&lt;kbabbitt> ... but presumably that would get more tricky<br>
&lt;iank_> I think this property only applies to in-flow elements?<br>
&lt;kbabbitt> ... e.g. does the float get ordered... in source order?<br>
&lt;kbabbitt> fantasai: if we apply to blocks, when floats come out of flow that's a visual effect<br>
&lt;kbabbitt> ... does not affect reading order<br>
&lt;kbabbitt> ... would be there as if not floated<br>
&lt;kbabbitt> emilio: ok that seems fine<br>
&lt;kbabbitt> ... I would expect containing block to ? the order<br>
&lt;astearns> ack emilio<br>
&lt;astearns> ack astearns<br>
&lt;kbabbitt> fantasai: in the future maybe we want to do something fancy with floats<br>
&lt;kbabbitt> astearns: in the proposal where reading order works without reading flow, is it the case that if you set reading order on an element that will make the nearest block-level parent a reading flow container?<br>
&lt;kbabbitt> TabAtkins: yes<br>
&lt;kbabbitt> fantasai: yes<br>
&lt;kbabbitt> astearns: very limited utility with markup I'm used to working with where things can get wrapper elements<br>
&lt;kbabbitt> ... caption goes above picture until someone decides caption needs a wrapper element<br>
&lt;kbabbitt> ... then it stops working as intended<br>
&lt;kbabbitt> fantasai: don't think you can introduce a ? that hoists things out of the tree<br>
&lt;kbabbitt> astearns: yes. I think this is an argument for TabAtkins' position<br>
&lt;kbabbitt> fantasai: don't think that would change situation in your case<br>
&lt;kbabbitt> ... if reading order ?? it's still not going to move<br>
&lt;kbabbitt> ... you still have to set it on child that you're trying to reorder<br>
&lt;kbabbitt> ... if reading order is not set on the elements you want to reorder that are siblings<br>
&lt;kbabbitt> ... nothing is going to happen<br>
&lt;astearns> s/on child/on the direct child/<br>
&lt;kbabbitt> ... question is whether or not you need something on the container, not going to make a difference here<br>
&lt;kbabbitt> ... reason TabAtkins wants it is to make sure author is opted into the side effects<br>
&lt;fantasai> s/the side/the tabindex side/<br>
&lt;kbabbitt> TabAtkins: that's the big part, also if we go with your suggestion we could never introduce a more complex behavior<br>
&lt;kbabbitt> ... might be something we never need but I feel like if we explore block cases more we might want to do something like that<br>
&lt;kbabbitt> ... uncomfortable with shutting off that possibility<br>
&lt;kbabbitt> fantasai: if you were going to reshuffle the tree...<br>
&lt;kbabbitt> ... order property doesn't work like that<br>
&lt;kbabbitt> TabAtkins: but order property only works with flex and grid which are explicit about container child relationship<br>
&lt;kbabbitt> ... uncomfortable shutting off possibility of better block reordering strategy<br>
&lt;kbabbitt> fantasai: how would that work? extract element outside container?<br>
&lt;kbabbitt> TabAtkins: don't know<br>
&lt;kbabbitt> ...there's some meat on that bone though<br>
&lt;kbabbitt> ... because as astearns said, it's common to have wrapper elements<br>
&lt;kbabbitt> fantasai: if you introduce wrapper elements the reading order property will be on outermost wrapper<br>
&lt;kbabbitt> ... a number of properties that you want to set on outermost wrapper, reading order is one of them<br>
&lt;kbabbitt> TabAtkins: discussion got mixed with next issue<br>
&lt;kbabbitt> fantasai: swap issues or stay on this one?<br>
&lt;kbabbitt> TabAtkins: we can get some resolutions on this one<br>
&lt;kbabbitt> ... can resolve on a no-op container ? value, a source order value or something<br>
&lt;kbabbitt> fantasai: need that for both issues<br>
&lt;kbabbitt> chrishtr: not to choose a name, say there is a value<br>
&lt;kbabbitt> TabAtkins: happy to resolve on that<br>
&lt;kbabbitt> astearns: Proposed resolution is to add a source order value to reading-flow property<br>
&lt;fantasai> PROPOSED: Add a source-order value to reading-flow.<br>
&lt;kbabbitt> RESOLVED: Add a source-order value to reading-flow.<br>
&lt;kbabbitt> fantasai: Proposed: reading-order applies to block-level elements, does not apply to inline-level elements<br>
&lt;kbabbitt> TabAtkins: such that source-order value points to it?<br>
&lt;kbabbitt> fantasai: that's the third question<br>
&lt;kbabbitt> TabAtkins: not yet whether it applies by default or not<br>
&lt;fantasai> PROPOSAL: reading-order applies to block-level boxes, and not to inline-level boxes. (Note this will work under source-order, and not e.g. flex-*/grid-*)<br>
&lt;TabAtkins> reading-flow:source-order works on block containers. reading-order works on block children of those block containers that are opted in to reading-flow<br>
&lt;fantasai> PROPOSAL: reading-flow: source-order works on block containers. reading-order applies to block-level boxes, and not to inline-level boxes<br>
&lt;kbabbitt> astearns: objections?<br>
&lt;fantasai> RESOLVED: reading-flow: source-order works on block containers. reading-order applies to block-level boxes, and not to inline-level boxes<br>
&lt;kbabbitt> astearns: anything more we can resolve on?<br>
&lt;kbabbitt> chrishtr: that it has to be explicit?<br>
&lt;kbabbitt> astearns: that is the sticking point<br>
&lt;kbabbitt> TabAtkins: resolution as it stands says implict stuff doesn't work<br>
&lt;kbabbitt> ... right now only explicit works<br>
&lt;kbabbitt> fantasai: we can take that back to the issue<br>
&lt;kbabbitt> chrishtr: come back to this issue next week for 3rd point<br>
</details>


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


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

Received on Wednesday, 5 March 2025 18:00:16 UTC