[csswg-drafts] Add physical axes to scrollIntoView (#12476)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== Add physical axes to scrollIntoView ==
https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions has logical members but not physical.

As per the discussion in https://github.com/w3c/csswg-drafts/issues/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:

```webidl
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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12476 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 11 July 2025 21:41:50 UTC