Title: [211282] trunk/Websites/webkit.org
Revision
211282
Author
wenson_hs...@apple.com
Date
2017-01-27 07:58:05 -0800 (Fri, 27 Jan 2017)

Log Message

Unreviewed, update scroll snapping demos to use current Module 1 spec

* demos/scroll-snap/index.html:

Adopt the new CSS properties scroll-snap-type and scroll-snap-align.

Modified Paths

Diff

Modified: trunk/Websites/webkit.org/ChangeLog (211281 => 211282)


--- trunk/Websites/webkit.org/ChangeLog	2017-01-27 12:10:56 UTC (rev 211281)
+++ trunk/Websites/webkit.org/ChangeLog	2017-01-27 15:58:05 UTC (rev 211282)
@@ -1,3 +1,11 @@
+2017-01-27  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Unreviewed, update scroll snapping demos to use current Module 1 spec
+
+        * demos/scroll-snap/index.html:
+
+        Adopt the new CSS properties scroll-snap-type and scroll-snap-align.
+
 2017-01-26  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Unreviewed, add a demo page for an input events blog post

Modified: trunk/Websites/webkit.org/demos/scroll-snap/index.html (211281 => 211282)


--- trunk/Websites/webkit.org/demos/scroll-snap/index.html	2017-01-27 12:10:56 UTC (rev 211281)
+++ trunk/Websites/webkit.org/demos/scroll-snap/index.html	2017-01-27 15:58:05 UTC (rev 211282)
@@ -123,25 +123,30 @@
 
         #snap-scroll-container {
             -webkit-scroll-snap-type: mandatory;
-            scroll-snap-type: mandatory;
+            scroll-snap-type: x mandatory;
             -webkit-scroll-snap-points-x: repeat(100%);
             scroll-snap-points-x: repeat(100%);
         }
 
+        #snap-scroll-container > .child {
+            scroll-snap-align: start;
+        }
+
         #snap-scroll-container-coordinates {
             -webkit-scroll-snap-type: mandatory;
-            scroll-snap-type: mandatory;
+            scroll-snap-type: x mandatory;
         }
 
         #snap-scroll-container-coordinates > .child {
             -webkit-scroll-snap-coordinate: 0% 0%;
             scroll-snap-coordinate: 0% 0%;
+            scroll-snap-align: start;
         }
 
         #snap-scroll-container-coordinates-centered {
             width: 402px;
             -webkit-scroll-snap-type: mandatory;
-            scroll-snap-type: mandatory;
+            scroll-snap-type: x mandatory;
             -webkit-scroll-snap-destination: 50% 50%;
             scroll-snap-destination: 50% 50%;
         }
@@ -149,6 +154,7 @@
         #snap-scroll-container-coordinates-centered > .child {
             -webkit-scroll-snap-coordinate: 50% 50%;
             scroll-snap-coordinate: 50% 50%;
+            scroll-snap-align: center;
         }
 
         .snap-destination,
@@ -181,7 +187,7 @@
         #snap-scroll-container-2D,
         #snap-scroll-container-2D-rotated {
             -webkit-scroll-snap-type: mandatory;
-            scroll-snap-type: mandatory;
+            scroll-snap-type: both mandatory;
             -webkit-scroll-snap-destination: 50% 50%;
             scroll-snap-destination: 50% 50%;
             overflow: scroll;
@@ -196,6 +202,7 @@
             scroll-snap-coordinate: 50% 50%;
             width: 400px;
             height: 400px;
+            scroll-snap-align: center;
         }
 
         #snap-scroll-container-2D-rotated {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to