W3C home > Mailing lists > Public > www-style@w3.org > June 2014

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

From: Kseso? <kseso9@gmail.com>
Date: Tue, 17 Jun 2014 23:50:46 +0200
Message-ID: <CAAQ7Nj5fd1j4Z8-Q1qygmqfzrSUVCVAogvttr_aVr2Objy6N7A@mail.gmail.com>
To: François REMY <francois.remy.dev@outlook.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Thanks, François
You're right, but that use would be "only" a bad practice, as if someone
declares:
      a:hover {display: none}
This will cause an eternal blinking if you don´t move the cursor.
In my example, the definition of the pseudo-class :hover is not the problem,
it's his way of use. (IMHO)

Kseso


2014-06-17 23:19 GMT+02:00 François REMY <francois.remy.dev@outlook.com>:

> 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:51:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC