-
Notifications
You must be signed in to change notification settings - Fork 860
Sticky top bar causing page to spazz out #577
Comments
So I found some more evidence that might lead to solving the problem. It's actually when any post has been made 'sticky' within the index page. I might review the code to see if it's obvious how the sticky posts work, but for now I'll turn it off to keep my site smooth. Looking forward to anyone else's experiences. |
Haven't experienced this. Is there possibly a conflicting sticky class? |
Ya that's probably the issue:
|
Oh that would explain it. Sticky in the header and sticky in the post. Boom. I'll close this off as a workaround could be found without making this an issue with this repo. |
I wouldn't close it just yet. Since sticky posts are a part of WordPress core this could end up being a recurring conflict for FoundationPress users. I wonder if it's possible to add a hook to FP to make WordPress output a class called |
Okay, I guess so. However as we're just on the edge of foundation 6, the implementation is different. I've tried to use the 'sticky' within F6 however however this is for a different purpose. Instead, (I believe) the right implementation is Magellan Happy to reopen if you think I should :) |
They will be adding sticky functionality to the top-bar in a future release of F6. I asked them about it last week. I think as long as |
Convinced. Reopening. |
Thanks! If you get a chance to test it out with F6 and Magellan, please fill us in on your findings. IMO the ideal way to do this would be to change the class WordPress outputs so that FoundationPress remains consistent with Foundation docs. I opened a question on Stack Overflow: http://stackoverflow.com/questions/34150105/assign-a-class-other-than-sticky-for-sticky-posts Feel free to upvote it to increase the chance it gets answered 😉 |
Wow I got an answer on there fast. Would you mind testing it by adding the following to your function change_sticky_class($classes) {
$classes = array_diff($classes, array("sticky"));
$classes[] = 'sticky-post';
return $classes;
}
add_filter('post_class','change_sticky_class'); Thanks!!! |
Why would we strip down WordPress fuctionality? .sticky post class is a must in every WordPress theme. Could we create a new sticky mixin for the topbar, like .top-bar-container .fixed .sticky-noconflict? |
+1 on mixin instead of removing WordPress |
The name of that function may have been confusing, so I edited that post. It doesn't strip down WordPress functionality at all. It changes it so that WordPress uses |
True. I thought maybe there could be compatibility issues with core WordPress (css or js) if that name is changed, but that does not seem to be the case, it's all handled by the theme anyway. So the only issue would be backward compatibility with old FoundationPress (or css code copied from other themes), but then again changes in FP is constantly breaking backward compatibility anyway… 😄 (I don't know if there are plugins that rely on the sticky class name, though.) |
👍 |
@eccola, @Aetles, @josh-rathke, @toddheslin, @olefredrik: If I make a pull request that alters the classname for sticky posts, what do you guys think I should use for the classname? I was thinking |
I think since it's a WordPress theme it makes sense. I have seen several Josh Rathke On Fri, Dec 11, 2015 at 2:53 PM, Colin Marshall [email protected]
|
@colin-marshall : Would be awesome if you could make a pull request that alters the classname for sticky posts. I think it makes sense to add a |
@olefredrik PR submitted: #618. I fixed the build errors too. |
Awesome! |
I'm totally loving FoundationPress. However I've come across an odd circumstance where a fixed top bar that looks like this:
<div class="top-bar-container fixed sticky">
will have some serious issues with fast scrolling. I've noticed this across iOS, Chrome (Mac) and Safari (Mac). See video for example with the sticky on - problem, and sticky off - no problem.Any ideas?
https://www.dropbox.com/s/q3ufp6viaftivz0/Sticky%20Top%20Bar.mp4?dl=0
The text was updated successfully, but these errors were encountered: