Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

DEPRECATED: A position: sticky polyfill that works with filamentgroup/fixed-fixed for a safer position:fixed fallback.

License

NotificationsYou must be signed in to change notification settings

filamentgroup/fixed-sticky

Repository files navigation

🚨🚨 This plugin is Deprecated 🚨🚨

In our own designs we use sticky sparingly and as an enhancement, which means that fallback positioning behavior is acceptable. Withnative browser support forposition: sticky expanding, we must weigh the diminishing cross-section of browsers that require this polyfill against this plugin’s own maintenance costs. Therefore, we’ve decided that now is the right time to retirefixed-sticky. Theprevious documentation can be found at v0.1.7. NPM will report a deprecation warning. If you want to maintain a fork of this package, send me a message (@zachleat on Twitter) and I’ll add a link to it below.Thank you!

Filament Group

Great alternatives

Native position: sticky

The most overlooked thing aboutposition: sticky is thatsticky elements are constrained to the dimensions of their parent elements. This means if asticky element is inside of a parent container that is the same dimensions as itself, the element will not stick.

Here’s an example of what asticky element with CSStop: 20px behaves like:

Scrolling down. The blue border represents the dimensions of the parent container element. If the element’s top is greater than20px to the top of the viewport, the element is not sticky.

Scrolling down. When the element’s top is less than20px to the top of the viewport, the element is sticky.

Here’s an example of what asticky element with CSSbottom: 20px behaves like:

Scrolling up. Not sticky.

Scrolling up. Sticky.

Demos

Nativeposition: sticky Caveats

  • Any non-default value (notvisible) foroverflow,overflow-x, oroverflow-y on the parent element will disableposition: sticky (via@davatron5000).
  • iOS(and Chrome) do not supportposition: sticky; withdisplay: inline-block;.
  • This plugin(and Chrome’s implementation) does not support use withthead andtfoot.
  • Nativesticky 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.

About

DEPRECATED: A position: sticky polyfill that works with filamentgroup/fixed-fixed for a safer position:fixed fallback.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp