- From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
- Date: Thu, 05 Jul 2012 08:31:50 +0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: WWW Style <www-style@w3.org>
(12/07/05 7:51), Tab Atkins Jr. wrote: > On Wed, Jul 4, 2012 at 9:02 AM, Kang-Hao (Kenny) Lu > <kennyluck@csail.mit.edu> wrote: >> # 9. Collapse ‘visibility:collapse’ items. If any flex items have >> # ‘visibility: collapse’, note the cross size of the line they're >> # in as the item's strut size, and restart layout from the >> # beginning. >> >> I am not sure why this need to go back to the beginning, why can't we >> just make collapsed + uncollapsed items fixed in any flex line. That is, >> just jump to right after >> >> # 5. Resolve the flexible lengths of all the flex items to find their >> # used main size, and determine their hypothetical cross size from >> # this main size. > > Because then you can have either ragged or uneven lines. In many > cases, I think it will be better to rerun line-breaking, which is why > I specified it that way. I think with the current specced behavior the condition for 'visibility: collapse' to be useful for a multi-line flex container is significantly complex to be worth written down. The condition, as far as I can tell is, either * The collapsed item has a bigger cross-size than most of other items. or * The collapsed item doesn't go into another line (it shouldn't bring the strut size of one line to another) and an item with the biggest cross-size in a flex line doesn't go into another line if there's an item to be collapsed in the same line. Am I right here? Not rerunning line-breaking would have a easier condition for 'visibility: collapse' to be useful: the lines with items to be collapsed are positively flexible. I can't tell if this condition is often met though. Cheers, Kenny
Received on Thursday, 5 July 2012 00:32:19 UTC