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

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 UTC