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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 21 Mar 2013 17:24:58 -0700
Message-ID: <CAAWBYDDWRxUF-iMrA8AnoTUpBHO3HrPpKoOH6vrFUy9zrLWEYA@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: Elliott Sprehn <esprehn@gmail.com>, "www-style@w3.org" <www-style@w3.org>
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.

~TJ
Received on Friday, 22 March 2013 00:25:47 GMT

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