Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Div 'skips' with non-zero margin #15

Open
camjackson opened this issue Dec 14, 2015 · 1 comment
Open

Div 'skips' with non-zero margin #15

camjackson opened this issue Dec 14, 2015 · 1 comment

Comments

@camjackson
Copy link
Contributor

It seems that the sticky state does not kick in until the top-most element's border hits the edge of the screen.

That seems to make sense, except that if the first element inside the sticky div has non-zero margin, then it 'jumps' when the stickiness begins. I.e.:

  1. The element's margin does not trigger the sticky state
  2. The sticky state is triggered once the element's border hits the edge
  3. The element then gets wrapped in a fixed position div
  4. It's margin then causes it to be bumped down into the page, hence the 'jump' as it becomes sticky.

I think the fix needs to happen in your dom-find package, but I'm reporting the bug here because this is where the bug exhibits itself.

@camjackson camjackson changed the title Div 'skips Div 'skips' with non-zero margin Dec 14, 2015
@robbestad
Copy link
Owner

Thanks for report, I'm looking into it now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants