Skip to content

[css-anchor-position] Should scroll-margin/padding have an effect on position-visibility: anchors-visible? #10410

Open
@kizu

Description

@kizu

Was playing with the position-visibility: anchors-visible (https://drafts.csswg.org/css-anchor-position-1/#position-visibility), and I think it might be useful to take the scrollable area's scroll-padding or the anchor's scroll-margin into consideration (https://drafts.csswg.org/css-scroll-snap/#propdef-scroll-padding). An example: https://codepen.io/kizu/pen/BaedPEB

Screen.Recording.2024-06-09.at.17.02.21.mov

Here we can see how if we have some fixed element reducing the effective visible area of our scrollable container, we'd want to consider it for the position-visibility. Hooking it onto scroll-margin and scroll-padding sounds logical, as this is very similar to other similar cases like scrolling or snapping to the targeted element.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Thursday Afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions