diff --git a/css-snappoints/Overview.bs b/css-snappoints/Overview.bs index 9c838b43da96..8cf014780cee 100644 --- a/css-snappoints/Overview.bs +++ b/css-snappoints/Overview.bs @@ -64,7 +64,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain sizes vary. Using mandatory element-based snap positions, scrolling will always complete with an image centered in the scroll container's visual viewport. -
+img { /* Specifies that the center of each photo should align with the center of the scroll @@ -83,7 +83,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain }-+<div class="photoGallery"> <img src="img1.jpg"> <img src="img2.jpg"> @@ -110,7 +110,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain to snap one page at a time). However, if a scrolling operation would finish near a snap position, then the scroll will be adjusted to align the page as specified. -+.page { /* Defines the top of each page as the edge that should be used for snapping */ @@ -129,7 +129,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain }-+<div class="docScroller"> <div class="page">Page 1</div> <div class="page">Page 2</div> @@ -194,7 +194,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain@@ -219,11 +219,15 @@ Ignored Terms: scroll-snap-positions-*, containing block chainScroll Snap Types: the 'scroll-snap-type' property
- The ''scroll-snap-type'' property defines how strictly a scroll container's visual viewport should rest on snap positions. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap position; this is left up to the user agent. + The ''scroll-snap-type'' property defines how strictly a scroll container's visual viewport should rest on snap positions. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap positions; this is left up to the user agent.Open issue on whether to enhance the scroll-snap-type property for specifying the axis or adding a second property. We have resolved that this functionality be added once the issue is resolved. @@ -208,7 +208,7 @@ Ignored Terms: scroll-snap-positions-*, containing block chain Inherited: no Percentages: n/a Media: interactive - Computed value: specified value + Computed value: as specified Animatable: no
img {
- /* Specifies that the center of each photo
- should align with the center of the scroll
- container in the X axis when snapping */
- scroll-snap-align: center none;
-}
-.photoGallery {
- width: 500px;
- overflow-x: auto;
- overflow-y: hidden;
- white-space: nowrap;
- /* Requires that the scroll offset always be
- at a valid snap position when the scrolling
- operation completes. */
- scroll-snap-type: mandatory;
-}
-
-<div class="photoGallery"> - <img src="img1.jpg"> - <img src="img2.jpg"> - <img src="img3.jpg"> - <img src="img4.jpg"> - <img src="img5.jpg"> -</div> -+
img { + /* Specifies that the center of each photo + should align with the center of the scroll + container in the X axis when snapping */ + scroll-snap-align: center none; +} +.photoGallery { + width: 500px; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; + /* Requires that the scroll offset always be + at a valid snap position when the scrolling + operation completes. */ + scroll-snap-type: mandatory; +}+
<div class="photoGallery"> + <img src="img1.jpg"> + <img src="img2.jpg"> + <img src="img3.jpg"> + <img src="img4.jpg"> + <img src="img5.jpg"> +</div>
.page {
- /* Defines the top of each page as the
- edge that should be used for snapping */
- scroll-snap-align: none start;
-}
-.docScroller {
- width: 500px;
- overflow-x: hidden;
- overflow-y: auto;
- /* Specifies that each element’s snap area should
- align with a 100px offset from the top edge. */
- scroll-snap-padding: 100px 0 0;
- /* Encourages scrolling to end at a snap position when the
- operation completes, if it is near a valid snap position */
- scroll-snap-type: proximity;
-}
-
-<div class="docScroller"> - <div class="page">Page 1</div> - <div class="page">Page 2</div> - <div class="page">Page 3</div> - <div class="page">Page 4</div> -</div> -+
.page { + /* Defines the top of each page as the + edge that should be used for snapping */ + scroll-snap-align: none start; +} +.docScroller { + width: 500px; + overflow-x: hidden; + overflow-y: auto; + /* Specifies that each element’s snap area should + align with a 100px offset from the top edge. */ + scroll-snap-padding: 100px 0 0; + /* Encourages scrolling to end at a snap position when the + operation completes, if it is near a valid snap position */ + scroll-snap-type: proximity; +}+
<div class="docScroller"> + <div class="page">Page 1</div> + <div class="page">Page 2</div> + <div class="page">Page 3</div> + <div class="page">Page 4</div> +</div>
The scroll-snap-type property defines how strictly a scroll container’s visual viewport should rest on snap positions. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap position; this is left up to the user agent.
+The scroll-snap-type property defines how strictly a scroll container’s visual viewport should rest on snap positions. It intentionally does not specify nor mandate any precise animations or physics used to enforce those snap positions; this is left up to the user agent.
Open issue on whether to enhance the scroll-snap-type property for specifying the axis or adding a second property. We have resolved that this functionality be added once the issue is resolved.
| Computed value: - | specified value, with lengths made absolute + | as specified, with lengths made absolute | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Animatable: | yes
@@ -387,7 +445,7 @@ Pro
| scroll-snap-padding | <length>{1,4}
@@ -638,7 +696,7 @@ Pro
| scroll-snap-area | [ border-box | margin-box ]? <length>{1,4}
@@ -648,7 +706,7 @@ Pro
| scroll-snap-align | [ none | start | end | center ]{1,2} |