-
Notifications
You must be signed in to change notification settings - Fork 166
stickybits element width in IE #66
Comments
@aitboudad thanks for the demo! Could you provide a quick Codepen example? I think/hope we can add a little css and make it all better 🙏 |
@aitboudad I will look as soon as possible. 🙏 |
@aitboudad https://codepen.io/yowainwright/pen/BZgeWN max-width: inherit;
width: 100%; I think that is on the right path ...? Could you hack at it a bit or close the issue if the fix works? 🙏 |
@yowainwright That's not fixing it (Tested on IE11, Edge 14 & 15). Only way i've managed it was applying your fix + |
it doesn't solve my issue as in my app I use the grid system (parent doesn't have a specific width). |
@aitboudad if you could post your solution here that would be awesome. I DO think this issue is very valuable for Stickybits to have s people can reference their solutions. Thanks for sharing! |
just tested with another alternative lib stickyfill and it appear that handle that issue by setting |
@aitboudad thanks for sharing. Those styles can be added be added with css: .js-is-sticky[style="postion: fixed"] {
left: <left val>;
top: <top val>;
bottom: <bottom val>;
width: <width val>;
} The benefit of not assuming what an interface needs (aka not If the interface requires the sticky element to be positioned at the bottom or not directly at the top of the browser window (see readme examples) there are a few issues with a full polyfill approach:
|
make sense and I'm totally agree with all arguments, I'll try to find a better approach to my use-cases. |
Hi all! For IE when sticky element is width: 100%
max-width: ...px Looks like workaround however anybody knows better solution? |
Hi, I understand that stickybits does not want to be a polyfill but it is also a library that should abstract the user from dealing with these issues. Sensible defaults for CSS classes or at least some snipet of js for the 99% of use case (stick at top / bottom) would have been great. I was just expecting to put the library and have things work but I'm pretty much in the same position than using position: sticky, it works in chrome not in IE. If I have to define JS and CSS myself, why even use an external library ? EDIT: I'm sorry, I was just frustrated with IE. The CSS fix actually works. Thanks for your work. |
Hi
When position: fixed is applied to the sticky element (in IE) it doesn't preserve it's width see bellow:
Thanks!
The text was updated successfully, but these errors were encountered: