Skip to content

Commit

Permalink
docs: add explanation for inconsistencies section
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaskuske committed Dec 14, 2018
1 parent 0565c4c commit cad093a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,23 +293,27 @@ <h4 id="no-regular-stylesheets"><span><code>scroll-behavior</code> is
the <a href="#font-family"><code>font-family</code>
workaround</a>.</p>
<h4 id="global-only"><span><code>scroll-behavior</code> is only
supported
as global setting</span></h4>
supported as global setting</span></h4>
<p>In browsers with native support, you can define <code>scroll-behavior</code>
at multiple points in your document, e.g. <code>auto</code> on
the document itself, but <code>smooth</code> on a slideshow
container that has separate scrolling. This polyfill does not
allow for that, either all anchors on the page scroll smoothly by
setting <code>scroll-behavior</code>
at document level, or none.</p>
<h4 id="no-javascript-scroll"><code>scroll-behavior</code> doesn't
affect scrolling triggered from JavaScript</h4>
<h4 id="no-javascript-scroll"><span><code>scroll-behavior</code>
doesn't affect scrolling triggered from JavaScript</span></h4>
<p>This polyfill only affects scrolling triggered by clicks on <code>&lt;a></code>
tags and through <code>hashchange</code> events. You'll still have to
pass <code>{ behavior: 'smooth' }</code> when using APIs like <code>window.scroll()</code>
unless your polyfill for these APIs has it's own CSS property check.</p>
<h4 id="native-inconsistencies"><span>Inconsistencies in native
implementations</span></h4>
<p>While Scroll Behavior has native support in a couple of browsers
already, they behave differently than expected in some situations.
The following are not bugs of this polyfill, but inconsistencies of
browsers' native behavior and workarounds you might want to know
about.</p>
<p><b>Blink (e.g. Chrome, Opera):</b><br>
While 'normal' scrolling is smooth, if you click a couple of links
and then navigate back and forth using the browser's
Expand Down

0 comments on commit cad093a

Please sign in to comment.