Re: :scroll() A proposal for a new Css pseudoclass

> 2. There's still a bit of circular dependency possible, since whether
> or not :scroll() works on an element depends on if the element is
> scrollable at all.  You can set "overflow:visible" from a :scroll()
> rule, which is problematic.  This one's a bit more direct and easier
> to address, though - we could probably fix it in the way I outline at
> <https://tabatkins.github.io/specs/css-toggle-states/#checked-problems>,
> where "overflow" becomes a selector-affecting property and :scroll()
> is a property-affected selector.
>
> ~TJ

Well, I think the issue is way worse.

    div { width: 100px; height: 100px; }
    div > div { width: 50px; height: 120px; margin: auto; }
    div:scroll(more than 1px from the vertical axis) > div { display: 
none; }

I'm pretty sure I can imagine a case where the parent div does overflow of 
"N" pixels when ":scroll(Npx)" starts to match, but has only "N-1" pixels of 
overflow after it is matched, so the scroll is moved automatically to the 
new maximum (N-1) then the rule doesn't match and another rule starts to 
match (only N-1 pixels scrolled) which may cause the element to only have 
"N-2" pixels of overflow, so the scroll is automatically adjusted, etc. You 
can create a loop that is as long as you wish, by making sure that when the 
element finally reaches no scroll at all, it starts to have a "N" scroll 
zone again. The size of the loop would be "N".

Is that right?
François 

Received on Tuesday, 17 June 2014 21:20:03 UTC