Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
More information surrounding lack of support on overflow for #16.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jan 29, 2014
1 parent b76a154 commit 2d1dbfb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ Next, add the events and initialize your sticky nodes:

## Native `position: sticky` Caveats

* `sticky` elements are constrained to the dimensions of their parents. This plugin behaves the same.
* iOS (and Chrome) do not support `position: sticky;` with `display: inline-block;`.
* `sticky` elements are constrained to the dimensions of their parents.
* This plugin (and Chrome’s implementation) does not (yet) support use with `thead` and `tfoot`.
* Native `sticky` anchors to parent elements using their own overflow. This means scrolling the element fixes the sticky element to the parent dimensions. This plugin does not support overflow on parent elements.

### Using the polyfill instead of native

Expand All @@ -46,7 +47,6 @@ If you’re having weird issues with native `position: sticky`, you can tell fix

* [`demo-opt-out-native.html`](http://filamentgroup.github.com/fixed-sticky/demos/demo-opt-out-native.html) shows this behavior.


## Installation

Use the provided `fixedsticky.js` and `fixedsticky.css` files.
Expand Down
10 changes: 10 additions & 0 deletions demos/demo-control.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ <h3>Header Level 3</h3>
<li>Aliquam tincidunt mauris eu risus.</li>
</ul>

<h2>Sticky with overflow</h2>

<p>The following demo does not behave the same in the plugin as it does with native sticky. We do not support overflow on parent elements in fixed-sticky.</p>

<div class="container" style="height: 600px; overflow: auto;">
<div class="top fixedsticky" style="top: 3.2em;">
Fixed to overflow div top.
</div>
<div style="height: 1000px"></div>
</div>

<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>

Expand Down
10 changes: 10 additions & 0 deletions demos/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ <h3>Header Level 3</h3>
<li>Aliquam tincidunt mauris eu risus.</li>
</ul>

<h2>Sticky with overflow</h2>

<p>The following demo does not behave the same in the plugin as it does with native sticky. We do not support overflow on parent elements in fixed-sticky.</p>

<div class="container" style="height: 600px; overflow: auto;">
<div class="top fixedsticky" style="top: 3.2em;">
Fixed to overflow div top.
</div>
<div style="height: 1000px"></div>
</div>

<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>

Expand Down

0 comments on commit 2d1dbfb

Please sign in to comment.