Skip to content

Add physical axes to scrollIntoView #12476

@emilio

Description

@emilio

https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions has logical members but not physical.

As per the discussion in #11796, it seems this might be useful on its own. I think the main question is how to resolve conflicts.

Probably the interface needs to become:

enum ScrollPosition { "start", "center", "end", "nearest" };
dictionary ScrollIntoViewOptions : ScrollOptions {
  ScrollPosition block;
  ScrollPosition inline;
  ScrollPosition x;
  ScrollPosition y;
  ScrollIntoViewContainer container = "all";
};

Then something along the lines of: If any logical side is specified, use them, otherwise use the physical ones (if specified), otherwise default to block: "start", inline: "nearest".

So a bit annoying to write in prose but I think fairly reasonable and easy to implement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Tuesday Afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions