fakefix

turn absolute elements into fixed ones, relatively (not actually)

Usage no npm install needed!

<script type="module">
  import fakefix from 'https://cdn.skypack.dev/fakefix';
</script>

README

fakefix

Call fakefix on an HTMLElement that is absolutely position, when you want it to be fixed. I have my reasons, maybe you have yours. My reason is that I use absolute positioning all the time, but I ran into a case using document.elementFromPoint, which does not work on fixed elements.

With fakefix, your element will be restored to a relative fixed like absolute position.

usage

npm install fakefix
var fakefix = require('fakefix')
fakefix(myAbsolutePositionedElement)

example

npm install -g st // or ecstatic
$clone this repo
st || ecstatic

open web browser scroll