W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: The :min-width/:max-width pseudo-classes

From: Elliott Sprehn <esprehn@gmail.com>
Date: Fri, 29 Mar 2013 23:01:14 -0400
Message-ID: <CAPJYB1jfthYAHHNfFH-_2YHR9Ro1szpThP0TzJ+A6VhifBXObw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Fri, Mar 29, 2013 at 3:34 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Fri, Mar 29, 2013 at 11:19 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> > On 3/29/13 2:07 PM, Tab Atkins Jr. wrote:
> >> On Fri, Mar 29, 2013 at 10:40 AM, Boris Zbarsky <bzbarsky@mit.edu>
> wrote:
> >>> OK.  So this definitely requires that in my example above I have to do
> >>> layout on V2 before I do it on V3, yes?
> >>
> >> Yes.
> >
> > That's not great, really...
> >
> >>> This also requires that all incremental layout always start at the root
> >>> of
> >>> the tree and touch everything in it, as far as I can tell, so that
> these
> >>> global ordering invariants on when things are marked as "resolved" are
> >>> maintained.  Which, honestly, half-defeats the purpose of viewports;
> the
> >>> idea is that you can do layout inside a viewport WITHOUT having to
> worry
> >>> about touching anything outside it.
> >>
> >> Yes.
> >
> > Again, not great.
> Sure.
I still don't like this since it violates wanting to do layout and selector
matching in parallel all the way down a tree since given viewports A and B,
and nested viewports A1 and B2 we can't do layout or selector matching on
B2 without having done layout on A since A might have selectors which apply
outside of it in the adjacent viewport B. Instead of a run to completion
algorithm where given two viewports I can do layout on both of them
entirely in parallel I must do:

1. layout the page, except <viewport>'s and put them in the /viewport set/.
2. copy the /viewport set/ into the /layout set/ and clear the /viewport
3. for each <viewport> in the /layout set/:
  a. layout all descendants, except <viewport>'s and put them in the
/viewport set/.
4. if the /viewport set/ is not empty goto step 2.

I mean I can see ways to make that work with messaging between the threads,
but it's a lot of complexity which seems not terribly worth it since you
can only style adjacent nested viewports.

Do we have a real world use case for that? It seems almost accidental, I
doubt developers would even realize it works, and would be surprised when
it doesn't for things at the same "nesting level".

- E
Received on Saturday, 30 March 2013 03:02:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC