I'm on Chrome 68.
Whenever I have filter: invert(xxx);
on the <body>
, anything positioned as fixed
doesn't stick to the screen, it scrolls with everything.
Demo with filter: invert(xxx);
body{
height: 8000px;
filter: invert(0.85);
}
div{
position: fixed;
top: 0;
left: 0;
height: 100px;
width: 100px;
border: 1px solid black;
}
<div></div>
Demo without filter: invert(xxx);
body{
height: 8000px;
}
div{
position: fixed;
top: 0;
left: 0;
height: 100px;
width: 100px;
border: 1px solid black;
}
<div></div>
EDIT: Works fine on Chrome 67, but not on Chrome 68.
filter
seems to be the issue - also experiencing this with adding dropshadows viafilter
.filter
creates a new position context for children withposition: fixed
at any sub-body level – Calyces