- From: Netmosfera <netmosfera@gmail.com>
- Date: Mon, 20 May 2013 18:11:19 +0200
- To: Simon Pieters <simonp@opera.com>
- CC: www-style@w3.org, "Tab Atkins Jr." <jackalmage@gmail.com>, Lea Verou <lea@w3.org>, Nat Duca <nduca@google.com>, James Simonsen <simonjam@chromium.org>, Tony Gentilcore <tonyg@google.com>, Tom Wiltzius <wiltzius@google.com>
Il 20/05/2013 13:58, Simon Pieters ha scritto:
> On Sun, 19 May 2013 13:52:16 +0200, Netmosfera <netmosfera@gmail.com>
> wrote:
>
>> (i didn't read the whole discussion)
>>
>> here's my opinion... some months ago i've suggested something similar
>> on mozilla's bugzilla
>>
>> i don't actually like the idea of the "smooth scrolling" argument of
>> scrollTo and scrollBy methods, because i think this should be applied
>> also to scrollTop and scrollLeft properties
>
> With scrollTop and scrollLeft, I see these options:
>
> * Don't support smooth scrolling (except when set by CSS)
> * Introduce new methods e.g. scrollTopSmooth and scrollLeftSmooth
> * Introduce a new attribute on Element that acts as a flag for
> scrollTop and scrollLeft
> * Let scrollTop and scrollLeft take an object as value e.g.: {
> value:10, smooth:true }
>
> The last option could work for scroll() et al, too.
>
>> i don't also like the idea of a global flag that enables or disables
>> globally the smooth scrolling on cssom methods/properties
>
> Why not? (The proposed CSS property would be per-element, not global.)
isn't this enough?
el.style.scrolling = "normal";
el.scrollTop = 200;
el.style.scrolling = "smooth";
i mean, the "cssom flag" or any "additional func parameter" would only
reflect the css value... so, is it really necessary?
>
> This seems equivalent to the proposed CSS property to enable smooth
> scrolling for an element (or viewport for the root element), except
> this supports setting time and timing function and doesn't support
> using the platform's native time/timing function. It also means we
> can't add a CSS property called 'scrolling'.
>
> It's not clear to me what problem you're trying to solve here that a
> single CSS property dedicated to enabling smooth scrolling doesn't solve.
>
i'm not trying to solve any problem actually, just supposing what css
users would need!
for me it's an injustice that scrolling offset can't be controlled
within css
html{scrolling:100px 100px;} == docel.scrollTo(100,100);
html{scrolling: to-element(#body > p:nth-child(5)) ;} ==
document.querySelector("#body > p:nth-child(5)").scrollIntoView();
html{scrolling: to-target } ==
document.querySelector(location.hash).scrollIntoView();
and, animation should be fine-tunable in my opinion, means duration,
transition function and possibly delay...
(sorry for double mail, Simon Pieters, still not experienced with
mailing lists :( )
Received on Monday, 20 May 2013 16:12:23 UTC