Closed daattali closed 4 years ago
I don't think it makes a whole heap of sense for this library. Scroll position is always measured in pixels, so it makes sense for headroom to speak that language.
You could of course write a function to do any conversion math for you, if you wanted to be able to supply relative units. But headroom itself will stick with pixels for the time being.
Thanks for the suggestion anyway, appreciate it!
This may not make sense or be feasible, but with the new best practices of using rem instead of px for spacing elements, would it make sense to allow rem to be used to specify offset/tolerance/etc?
My header is defined in rem, just as the rest of my page. It feels a bit dirty to mix in px from headroom alongside. Perhaps this doesn't make sense for headroom though.