Login
You're viewing the ruby.social public feed.
  • Nov 18, 2026, 11:04 AM

    This css tries to work in Safari. Sadly the positioning only updates in relation to the scroll position upon window resize. Chrome and Firefox stick with the scroll position at initial page load.

    ```
    position: fixed;
    position-anchor: --anchor;
    inset-inline: anchor(inside);
    inset-block-start: max(0px, anchor(0%));
    inset-block-end: max(0px, anchor(100%));
    ```

    💬 1🔄 0⭐ 1

Replies

  • Nov 18, 2026, 11:10 AM

    Unsurprising really. Resizing an element is potentially fairly expensive. Not what you want while scrolling.

    💬 0🔄 0⭐ 0
  • Nov 18, 2026, 1:16 PM

    @ollicle Yeah, currently anchor positioning can be pretty weird in scrollable edge cases. I think this is the case where using both scroll-driven animations and anchor positioning together _is_ a less hacky way to go, where you could use SDA to understand the elements’ and viewport’s respective positioning, and adjust the anchor positioning based on that.

    💬 0🔄 0⭐ 0