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

On Mon, 26 May 2014 11:50:50 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

>> It was the API's "auto" value that was under discussion. Currently the  
>> CSS
>> property does not have an "auto" value.
>
>
> Yes, I was referring to the CSS property. It seems to me having an 'auto'
> value for that property that falls back to UA/platform defaults would be
> better than making 'smooth' do that. In particular it seems that  
> currently
> "smooth" in the JS API overrides UA defaults but CSS  
> scroll-behavior:smooth
> does not override UA defaults. It would be better if they were  
> consistent.

No, the API "smooth" honors user preferences just like the CSS property.

In particular, the spec allows the UA to ignore the 'scroll-behavior'  
property, which makes both navigation scroll and API scrolls be instant.  
See http://dev.w3.org/csswg/cssom-view/#perform-a-scroll step 2.

Technically, the spec also allows the UA to follow the "smooth scroll"  
steps and let that be a zero-time no-animation scroll, since it's  
UA-defined.


>>  But then I'm not sure what the use-cases are for the "initial" and
>>> "smooth"
>>> values of scroll-behavior.
>>>
>>
>> "instant" is the initial value, and gives the same behavior as we have
>> today.
>>
>> "smooth" allows the UA to do the scroll over a period of time in a
>> UA-defined manner for scrolls triggered from navigation and from the
>> scrolling APIs (unless the script specified "instant" or "smooth"
>> explicitly).
>>
>
>> For use cases, please see http://www.w3.org/mid/op.
>> ww4mdlp2idj3kv@simons-macbook-pro.local
>>
>
> Thanks. I guess that makes sense though it means scroll-behavior is a  
> very
> narrowly-useful property. I'm not sure it's worth having to be honest,
> assuming we add the JS API.

OK. I thought the CSS property was worth having, but if implementors  
disagree then there's not much point having it in the spec.

-- 
Simon Pieters
Opera Software

Received on Monday, 26 May 2014 10:52:08 UTC