- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 02 Aug 2022 14:54:55 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `last remembered size if no principal box`, and agreed to the following: * `RESOLVED: If an element doesn't have a principal box, we do not record a last remembered size` <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: last remembered size if no principal box<br> <fantasai> s/Topic/Subtopic/<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/7527<br> <fantasai> oriol: In a note, when the element gets display:none, then the last remembered size is supposed to be preserved<br> <fantasai> oriol: if the elmeent doesn't have 0x0, and the box is distroyed when you apply 'display:none', then the last remembere size will be zero<br> <fantasai> oriol: if c-i-s is auto, then need to remember this last size<br> <fantasai> oriol: so we override the last size with 0x0<br> <fantasai> oriol: and then I guess we should ad the condition that the element at that point is not generating a principal box, shouldn't record the size<br> <fantasai> TabAtkins: correct, if it doesn't have a principal box shouldn't record the size<br> <fantasai> TabAtkins: agree we should fix that<br> <fantasai> oriol: if there's no box, shouldn't we be able to remove this last remembered size?<br> <fantasai> oriol: we resolved that if it's removed from the tree, we clear the size<br> <fantasai> oriol: I guess if it doesn't have a box, the size doesn't change, but my understanding is even if the size doesn't change, if you remove c-i-s: auto you remove last remembere size<br> <fantasai> TabAtkins: lacking a principal box shouldn't remove the remembered size<br> <fantasai> TabAtkins: as long as you still have c-i-s: auto<br> <emilio> q+<br> <fantasai> oriol: Consider a case where we have a box, but let's say that we have c-i-s: auto and we remmeber the size<br> <fantasai> oriol: and then we remove c-i-s: auto<br> <fantasai> oriol: but box size doesn't change<br> <fantasai> oriol: should we remove the last remembered size?<br> <fantasai> TabAtkins: yes<br> <fantasai> TabAtkins: this is not tied to ResizeObserver, it's tied to ResizeObserver timing<br> <fantasai> oriol: if you lose c-i-s: auto, but this doesn't trigger a size change, then we still remove the last remembered size<br> <fantasai> fantasai: okay<br> <fantasai> oriol: in this case, we wouldn't get an observation because the size didn't chnage<br> <fantasai> oriol: but if we can remove the size when c-i-s: auto is lost, what if we first add display:none<br> <fantasai> oriol: and then remove c-i-s: auto<br> <fantasai> oriol: by consistency, we need to remove the last remembmered size as well<br> <fantasai> oriol: but most browsers don't recompute style during 'display: none'<br> <fantasai> TabAtkins: so that's an implementation difficulty with matching the spec<br> <emilio> q- (was going to mention this)<br> <emilio> q-<br> <vmpstr> fantasai: if it's display: none you can flip things on and off<br> <fantasai> s/if/suppose if/<br> <fantasai> fantasai: and when you remove 'display: none', you check if cis:auto is there and either clear the last remembered size or not/<br> <fantasai> emilio: but you need to do that not at ResizeObserver time, but as soon as you get a box that is not cis:auto<br> <fantasai> emilio: so you go display:none, at ResizeObserver time we dont' know what to do because don't have a box<br> <fantasai> emilio: if when you come back, you need to check cis:auto<br> <fantasai> TabAtkins: that seems fine to me<br> <fantasai> emilio: It's weird to update this in different places<br> <fantasai> TabAtkins: I also think it's weird to do that, but it's apparently problematic to do it while display is none<br> <fantasai> TabAtkins: So we check for cis:auto when the element begins generating a principal box again<br> <fantasai> TabAtkins: if it doesn't ahve cis:auto at that point, forget its last remembered size<br> <fantasai> emilio: yeah, ok<br> <fantasai> TabAtkins: if you're doing anything weird switching cis while you're display:none it's your fault<br> <fantasai> emilio: consider CQ, might flip things dpeneding on container<br> <fantasai> emilio: if you're already compute CQ, you may need to create a box for asize that isn't your final one<br> <fantasai> emilio: you may clear the remembere dsize,<br> <fantasai> emilio: ...<br> <fantasai> TabAtkins: why would you clear it at that point<br> <fantasai> emilio: imagine without CQ matching, you don't have cis:auto<br> <fantasai> emilio: and once you know that you have a container of a given size, the box gets cis:auto<br> <fantasai> TabAtkins: easiest solution is to put cis:auto less conditionally<br> <fantasai> emilio: yes, I agree, but its a sketchy case<br> <fantasai> emilio: because it depends on how precisely you implement queries<br> <fantasai> TabAtkins: I think it's okay<br> <fantasai> TabAtkins: it seems ok for it to be less certain<br> <fantasai> TabAtkins: there's an easy solution: don't make it conditional in your styles<br> <fantasai> TabAtkins: so proposed resolution is that we add new condition to forget last remembered size<br> <fantasai> TabAtkins: which is if an element goes from not generating a principal box to generating one, we check cis and if it's not auto we forget the size<br> <fantasai> oriol: and ???<br> <fantasai> Rossen_: any objections to first one?<br> <emilio> s/???/for storing the size the element should have a box<br> <TabAtkins> s/???/and only storing the size if it has a principal box/<br> <fantasai> REOSLVED: If, when an element goes from not generating a principal box to generating one, it does not have cis:auto, forget any last remembered size<br> <fantasai> s/REOSLV/RESOLV/<br> <fantasai> TabAtkins: if an element doesn't have a principal box, we do not record a principal size<br> <fantasai> RESOLVED: If an element doesn't have a principal box, we do not record a last remembered size<br> <fantasai> Rossen_: anything else on this issue?<br> <fantasai> oriol: nope<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7527#issuecomment-1202748701 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 2 August 2022 14:54:57 UTC