You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the anchor creates a containing block that is an ancestor of the positioned element, which fails the existing algorithm at ... positioned el’s containing block is an ancestor in the flat tree to that of possible anchor’s containing block.
In both cases, the containing block of the anchor has identical dimensions, but because of the DOM order of the elements that generate the containing blocks, the second works while the first fails. Is there a reason why the first couldn't work as well?
In other words, could a positioned el's containing block be generated by the anchor? Could we change the algorithm to read positioned el’s containing block is not a descendant in the flat tree to that of possible anchor’s containing block?
The text was updated successfully, but these errors were encountered:
Yeah, I'm pretty sure this is basically just an off-by-one error in the anchor-determining restrictions. The CB is already sized and positioned by the time you're laying out abspos children (modulo the presence/absence of scrollbars, which is already handled due to its inherent cyclicness), so you should be able to depend on it, and the use-cases for it are pretty clear and obvious.
After a conversation with @tabatkins, it seems like we may be able to loosen the algorithm for an acceptable anchor.
Currently, given
the anchor creates a containing block that is an ancestor of the positioned element, which fails the existing algorithm at
... positioned el’s containing block is an ancestor in the flat tree to that of possible anchor’s containing block.
However, this works:
In both cases, the containing block of the anchor has identical dimensions, but because of the DOM order of the elements that generate the containing blocks, the second works while the first fails. Is there a reason why the first couldn't work as well?
In other words, could a positioned el's containing block be generated by the anchor? Could we change the algorithm to read
positioned el’s containing block is not a descendant in the flat tree to that of possible anchor’s containing block
?The text was updated successfully, but these errors were encountered: