Re: [cssom-view] Add a "smooth" parameter to scrollTo and scrollBy functions

(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
i don't also like the idea of a global flag that enables or disables 
globally the smooth scrolling on cssom methods/properties

so what about something like this instead

html {  transition:scrolling 0.5s ease-in-out 0; }

this could be applied to any scrolling related event, for example when 
linking to a page.html#fragment , when set by scrollLeft|Top and co.

but, it's not easy determine how this should work... at a rough guess, 
here's some random ideas

         html { scrolling-x: 0;                 scrolling-y:400px; }
         html { scrolling-x: 100px;        scrolling-y: 
element(#fragment); }      /* this should not change the url's 
fragment... it just simulates a scroll */
         html { scrolling-x: 0;                scrolling-y: 
element(#content > p:nth-child(1) ); }

the default UA style could be:
        * { scrolling:target; }            /* that is calculated to the 
url's fragment or otherwise 0,0 (with possible exceptions for rtl 
languages) */

... and, for animating this:

          html {  transition: scrolling-x 0.5s ease-in-out 0, 
scrolling-y 1s linear 0; }
         !* *:target {  transition: scrolling 0.5s ease-in-out 0; }

maybe in a later moment, some more effort for this could be needed... 
for a better scrolling control

html {  transition: scrolling-delta-x 0.1s ease-in-out 0; }

hoping to be helpful...
Giorgio

(sorry for the possible double email... still not understanding why 
messages get filtered)

Received on Sunday, 19 May 2013 11:53:06 UTC