Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 910833 of scroll-snap-destination

  • Revision slug: Web/CSS/scroll-snap-destination
  • Revision title: scroll-snap-destination
  • Revision id: 910833
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{CSSRef}}{{SeeCompatTable}}

Summary

The scroll-snap-destination CSS property defines the position in x and y coordinates within the scroll container's visual {{Glossary("viewport")}} which element snap points align with.

{{cssbox("scroll-snap-destination")}}

Syntax

/* <position> value */
scroll-snap-destination: 400px 600px;

/* Global values */
scroll-snap-destination: inherit;
scroll-snap-destination: initial;
scroll-snap-destination: unset;

Values

<position>
Specifies the offset of the snap destination from the start edge of the scroll container’s visual viewport. The first value gives the x coordinate of the snap destination, the second value its y coordinate.

Formal syntax

{{csssyntax2}}

Specification

Specification Status Comment
{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-snap-destination", "scroll-snap-destination")}} {{Spec2("CSS Scroll Snap Points")}} Initial definition

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatUnknown}} {{CompatGeckoDesktop("39.0")}} {{CompatNo}} {{CompatNo}} {{CompatNo}}
Feature Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support {{CompatNo}} {{CompatGeckoMobile("39.0") }}[1] {{CompatGeckoMobile("39.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}

[1] On Firefox Mobile, available since Gecko 39, but behind the preference layout.css.vertical-text.enabled, disabled by default.

Revision Source

<div>{{CSSRef}}{{SeeCompatTable}}</div>

<h2>Summary</h2>

<p>The <strong><code>scroll-snap-destination</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> property defines the position in x and y coordinates within the scroll container's visual {{Glossary("viewport")}} which element snap points align with.</p>

<p>{{cssbox("scroll-snap-destination")}}</p>

<h2 id="Syntax">Syntax</h2>

<pre class="brush: css">
/* &lt;position&gt; value */
scroll-snap-destination: 400px 600px;

/* Global values */
scroll-snap-destination: inherit;
scroll-snap-destination: initial;
scroll-snap-destination: unset;
</pre>

<h3 id="Values">Values</h3>

<dl>
 <dt><code>&lt;position&gt;</code></dt>
 <dd>Specifies the offset of the snap destination from the start edge of the scroll container’s visual viewport. The first value gives the x coordinate of the snap destination, the second value its y coordinate.</dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

<pre class="syntaxbox">
{{csssyntax2}}</pre>

<h2 id="Specification">Specification</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS Scroll Snap Points", "#propdef-scroll-snap-destination", "scroll-snap-destination")}}</td>
   <td>{{Spec2("CSS Scroll Snap Points")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop("39.0")}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>Firefox OS</th>
   <th>IE&nbsp;Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatGeckoMobile("39.0") }}<sup>[1]</sup></td>
   <td>{{CompatGeckoMobile("39.0") }}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] On Firefox Mobile, available since Gecko 39, but behind the preference <code>layout.css.vertical-text.enabled</code>, disabled by default.</p>
Revert to this revision