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

Re: [cssom-view] scope of the 'scroll-behavior' property

From: Simon Pieters <simonp@opera.com>
Date: Mon, 26 May 2014 10:37:32 +0200
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style@w3.org
Message-ID: <op.xggkwuyjidj3kv@simons-mbp>
On Fri, 23 May 2014 14:09:52 +0200, L. David Baron <dbaron@dbaron.org>  
wrote:

> On Friday 2014-05-23 02:41 +1000, Simon Pieters wrote:
>> On Thu, 22 May 2014 10:52:36 +0900, L. David Baron
>> <dbaron@dbaron.org> wrote:
>> >First, the spec doesn't seem to say how the two interact:  for the
>> >methods that have ScrollOptions parameters, which of the
>> >'scroll-behavior' or ScrollOptions wins?
>>
>> It does, see http://dev.w3.org/csswg/cssom-view/#perform-a-scroll
>>
>> However, I'm open to changing the default from "auto" to "instant"
>> and also maybe removing the "auto" value from the API.
>
> Oh, I had assumed that 'auto' represented the user/system default,
> not backstop to 'scroll-behavior'.  Is it intentional that those are
> completely ignored?

The user preferences should be honored when the spec says to perform a  
"smooth" scroll. When the spec says to perform an "instant" scroll, user  
preferences are ignored. Then the author has a few ways to opt in to the  
"smooth" behavior:

* User navigates to a fragment id; 'scroll-behavior' is "smooth"
* Script invokes a scrolling API and omits the dictionary (or provides the  
value "auto"); 'scroll-behavior' is "smooth"
* Script invokes a scrolling API and provides the value "smooth" in the  
dictionary ('scroll-behavior' is ignored)

Otherwise, scrolling is "instant" for script-initated scrolls or navigate  
to fragment id scrolls.

Does that help?
-- 
Simon Pieters
Opera Software
Received on Monday, 26 May 2014 08:38:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC