forked from jackmoore/sticky-position
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure position of sticky element stops at container bottom
This fix sets the top to a maximum of the wrapper's container height, minus the height of the primary element. In other words, the primary cannot move beyond its parent container. This is truer to the behaviour of `position: sticky` in browsers that support it. Fixes jackmoore#4
- Loading branch information
Showing
1 changed file
with
10 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters