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

On Tue, Dec 6, 2016 at 1:04 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Dec 1, 2016 at 2:28 AM, Alexander Shpack <shadowkin@gmail.com>
> wrote:
> >> Anyway, I don't think your proposal is doable because of infinite loops.
> >
> > Flexboxes also can lead to infinite loops, but we are seeing it in
> > specification. :)
>
> No, they can't. In degenerate cases nested flexboxes can cause a
> change to result in an exponential number of layouts, but it's
> absolutely not a loop.
>

What the difference for the end users between 10K rearrange iterations and
loops :)


> This proposal, unfortunately, causes loops in precisely the same way
> that :hover can cause loops, and browsers are loathe to repeat those
> issues.
>
> ~TJ
>

I've suggested the fast solution before.

Let's describe the definitions:
1. Frame - statement when browser has finished scrolling tick or layout
rearrangement
2. In-view Statement - one of the following statements (ordered): all,
partial, none, not none, not all, not partial

For each of in-view statements select elements and apply css rules *once
per frame*.

So, that's all. No loops :)

-- 
s0rr0w

Received on Monday, 5 December 2016 23:58:40 UTC