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: Thu, 21 Mar 2013 20:31:35 -0400
Message-ID: <CAPJYB1imqP515FEw7XiwonTWhG+-YYREMB7Pak999dKUJySRyg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Fran├žois REMY <francois.remy.dev@outlook.com>, "www-style@w3.org" <www-style@w3.org>
On Thu, Mar 21, 2013 at 8:24 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Mar 21, 2013 at 5:14 PM, Fran├žois REMY
> <francois.remy.dev@outlook.com> wrote:
> >> !.foo .viewport .list:max-width(...)
> >
> > I don't know how this selector is evaluated in browsers, but my
> understanding of it is
> >
> >    .foo:has(:this .viewport .list:max-width(...))
> >
> > and it means that :max-width will match no ".list" element per rule 1
> (:min-width only matches elements that are the nearest viewport or one of
> its ancestors)
>
> Oh!  So your idea is that a :max-width() pseudo would, regardless of
> where in the selector it appears, match based on the nearest viewport
> element of the selector's subject?
>
> That kills the problems, but it's somewhat weird to have a pseudoclass
> which can be placed literally anywhere in the selector without
> changing what it matches.
>
>
Yeah that feels super weird. I'd much rather an at-rule that defined the
viewport scope.

- E
Received on Friday, 22 March 2013 00:32:43 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT