W3C home > Mailing lists > Public > www-style@w3.org > October 2010

Re: Positioned Layout proposal

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 19 Oct 2010 14:29:50 +1300
Message-ID: <AANLkTikgad0ewjzijaQUDa6u=s2K_AUDkcg4PV1W0Ryx@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Tue, Oct 19, 2010 at 1:56 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> This problem is a much more general one, and cycles of this nature are
> possible to create with existing CSS.  For example, percentages in
> padding-top refer to the width of the box.  In some cases this can
> create a box which is tall enough to create overflow vertical overflow
> in its parent.  Generating the scrollbar reduces the width, though,
> which will reduce the amount of padding as well, possibly making the
> element short enough to no longer generate overflow in its parent.
>
> I believe there are other methods that can do similar things.
>
> In this case, I don't think the behavior is defined, but I think
> Firefox has a good answer - generate the scrollbars, but make them
> inactive.  That reveals the full content while reducing the WTF to a
> minimum.
>
> Is this behavior something we can specify in CSS?  If so, then at
> least some of the cycle behavior can be dealt with.
>

You're right that it's an existing problem, but your proposal makes it
significantly worse, so I think it's something we need to deal with now.

> Even if we do that, the size of a positioned element still affects the
> > layout of its descendants, and therefore with your spec you can have
> cycles
> > where some dependencies are explicit positioning constraints and some are
> > implicit layout constraints.
>
> Can you expand on this?  I know that, in general, you can create
> cycles by referring to descendants; I'll go ahead and add a note so I
> don't forget that.  This can only happen when the element() function
> is being used to specify a root edge.
>

Consider elements E1 and E2 with descendants D1 and D2, where E1's position
depends on D2 and E2's position depends on D1.

I think that all the cycle problems not dealing with scrollbars are
> enabled by the element() function?  The other values dont' seem like
> they should create any problems that don't already exist with
> positioning.
>

You're probably right.

If we added a requirement that the referenced element be earlier in the
document than the positioned element, how many of your use-cases would be
adversely affected? That requirement would help a lot.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
Received on Tuesday, 19 October 2010 01:30:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:33 GMT