- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Wed, 29 Jan 2014 22:07:28 -0800
- To: "www-style@w3.org" <www-style@w3.org>
(That is actually not about Snap Points Module[1] per se but rather similar idea.) While ago I've implemented similar feature but in more generic fashion I would say. In order to define details of scrolling I've added functional value named `scroll-manner` that can be used in 'overflow' properties. Here is an example: overflow-x:auto scroll-manner( page-animation:true, step-animation:true, page:100%, step:25% ); (I am using peculiar syntax but concept can be expressed in more standard way) The above means: if scrolling is needed try to use animated scrolling for page-scroll and line-scroll events, page step will be of 100% of scrollable box width of the element, and single step will use 25% of its width. So to scroll view in full it will take four next line clicks. 'page-animation' and 'step-animation' accept: true | false | default, default value: default. 'page' and 'step' accept: <length> | <percent> | auto | default default value: default; 'auto' value means that scrolling engine shall made an attempt to use integral stops so scrolling shall end on content boundaries rather somewhere in between. 'Content boundaries' meaning is different for each layout manager used by the element. E.g. for horizontal flexbox these are left/right sides of margin boxes of children. For template/grid layout manager these are column/rows boundaries. Same is for table rows/columns and columns in multi-column layout. To summarize: 1. We should have mechanism of describing animation/discrete scrolling. 2. We should have a mechanism to define "scroll stops" more intelligently than just elements. 3. Each layout manager / mechanism shall define concept of "scroll stops". [1] http://dev.w3.org/csswg/css-snappoints -- Andrew Fedoniouk. http://terrainformatica.com
Received on Thursday, 30 January 2014 06:07:58 UTC