dollarshaveclub / stickybits

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

Override class and style application to manually control how they are applied #598

Closed mbark closed 4 years ago

mbark commented 4 years ago

Requested Update

I would like a way to override how the styles and classes are applied to the elements. A good example is applyeStyle in popper.js which you can use to take control of the actual attribute rendering.

Why Is This Update Needed?

We use Elm to render our frontend and Elm is really picky about others modifying elements it has rendered. This means that if we want something to have styles or classes applied we need to pass this information to Elm and not set them directly on the dom element.

Are There Examples Of This Requested Update Elsewhere?

See link to applyStyle in popper.js above. We use that to render popups in Elm and that works fine. Something similar would be great.

If this seems like a possible and good idea I would be willing to write a PR for this.

yowainwright commented 4 years ago

@mbark would love that! Thank you!