On Friday 2014-02-14 15:53 -0800, Patrick Walton wrote:
> So I just looked at the relevant piece of this spec and I'm confused:
> 
> http://dev.w3.org/csswg/css-overflow-3/#fragment-pseudo-element
> 
> Suppose that I have a document like this:
> 
>     <style>
>         .a { position: relative; }
>         .b {
>             position: absolute;
>             overflow: fragments;
>             top: 5%;
>             bottom: 5%;
>             right: 0;
>             width: 100px;
>         }
>         .b::nth-fragment(2) { position: static; }
>     </style>
> 
>     <div class=a>
>         Foo
>         <div class=b>
>             Four score and seven years ago blah blah blah...
>         </div>
>     </div>
> 
> So we lay out `a` to determine its height. Now we know the height of
> `b`. Then we lay out `b`. Because there isn't enough room for its
> multiple lines to fit given its height limit, we create some
> fragments. Fragment 2 has `position: static` (which is explicitly
> allowed by the spec), so now it has to be inserted as a block kid of
> `a`. So we go to reflow `a` again. Now it has a different, taller
> height, which of course affects `b`. Now `b` has a larger
> height--suppose that it's now tall enough to not generate any
> fragments! So we remove the static kid of `a`, making `a` is
> shorter. We go to reflow it again, and we're back where we started.
> The layout seems nonterminating...
> 
> Is there something I'm missing?

No.

The regions spec says that you do two passes and then stop.

The overflow:fragments spec should probably either (a) say the same
or (b) require fragments following an absolutely positioned fragment
to also be absolutely positioned.  I'm in favor of (b), I think.  (I
think there might also need to be a constraint about floats.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to