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

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Thu, 1 Dec 2016 06:35:09 +0100
To: www-style@w3.org
Message-ID: <a19d5e7f-8508-4ab2-c5f1-05f623f4428d@disruptive-innovations.com>
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 05:35:43 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:15:02 UTC