dollarshaveclub / stickybits

Stickybits is a lightweight alternative to `position: sticky` polyfills 🍬
https://github.com/yowainwright/stickybits
MIT License
2.19k stars 168 forks source link

`noStyles` no longer applying `position` style attributes #646

Closed Cherry closed 4 years ago

Cherry commented 4 years ago

A recent change has caused the noStyles option to no longer set position: sticky or fixed.

As per the README, noStyles should still apply position: sticky or fixed, but this is no longer the case. Removing noStyles applies the positioning as expected.

Here's a codepen illustrating the issue, forked from a basic example. https://codepen.io/cherryjimbo/pen/YzPvPKR

You can see the js-is-sticky etc. classes being applied, but the position: sticky is never set until you remove noStyles: true.