W3C home > Mailing lists > Public > www-style@w3.org > December 2016

Re: [css3-selectors]: Proposal: :in-view() selector for better visibility control

From: Alexander Shpack <shadowkin@gmail.com>
Date: Thu, 1 Dec 2016 09:29:23 +0200
Message-ID: <CAK4xKX=smoYzdv6wdpdZO2qWzKsYnFy+dXQuP8eiAUSj9Df-gQ@mail.gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Cc: www-style <www-style@w3.org>
Thank you, Daniel!

As I see, partial parameter is not clear and not necessary. I think, we can
remove it.

On Dec 1, 2016 7:39 AM, "Daniel Glazman" <
daniel.glazman@disruptive-innovations.com> wrote:

> On 30/11/2016 20:27, Alexander Shpack wrote:
> > Hi folks!
> >
> > It would be perfect if we get the next pseudo class: :in-view() with a
> > different parameters
> > :in-view(all) - selected node is 100% visible in viewport
> > :in-view(partial) - selected node is partially visible in viewport
> > :in-view(none) - selected node is outside of viewport
> >
> > And inverted logic using :not()
> > :not(:in-view(all)) - synonym of :in-view(none)
> > :not(:in-view(partial)) - selected node is partially INvisible in
> viewport
> > :not(:in-view(none)) - synonym of :in-view(all)
>
> No, sorry, this is not how negated selectors work.
>
> :not(:in-view(all)) means "not totally in the viewport" so it's really
>   :in-view(partial) OR :in-view(none)
>
> :not(:in-view(partial)) means "not partially in the viewport" so it's
>   "totally or not at all in the viewport" hence
>   :in-view(all) OR :in-view(none)
>
> :not(:in-view(none)) means "not totally outside of the viewport" so it's
>   "at least partially in the viewport" hence
>   :in-view(all) OR :in-view(partial)
>
> The above is not saying I agree or disagree with a proposal that can
> introduce infinite loops, I am just fixing the selector interpretation
> mistake.
>
> </Daniel
>
>
Received on Thursday, 1 December 2016 07:29:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:05 UTC