On fixed elements and backgrounds

1 · CSS-Tricks · June 4, 2020, 8:25 a.m.
After just playing with apsect-ratio and being pleasantly surprised at how intuitive it is, here’s an example of CSS acting unintuitively: If you have a fixed element on your page, which means it doesn’t move when you scroll, you might realise that it no longer acts fixed if you apply a CSS filter on its nearest ancestor. Go ahead, try it on the CodePen. This is because applying a filter on the fixed element’s immediate parent makes it … Read article “On fixed elements and backgrounds” The ...