[csswg-drafts] [css-position-3] Coordinates of Containing Blocks of Positioned Boxes from Inline Boxes with Mixed Bidi Direction Text Content are Unclear (#7917)

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

== [css-position-3] Coordinates of Containing Blocks of Positioned Boxes from Inline Boxes with Mixed Bidi Direction Text Content are Unclear ==
["css-position-3: 2.1. Containing Blocks of Positioned Boxes"](https://drafts.csswg.org/css-position-3/#absolute-cb) says:
> If the ancestor is an inline box, the containing block is formed by the block-start and inline-start content edges of the **first box fragment** of the ancestor, and the block-end and inline-end content edges of the **last box fragment** of the ancestor.

When taking into account bidi (see ["css-writing-modes-3: 2.4.5. Reordering-induced Box Fragmentation"](https://drafts.csswg.org/css-writing-modes-3/#bidi-box-model)) it is unclear whether **first** and **last** are meant _logically_ or _visually_.

While we consider _visual_ the only useful and expected interpretation in this case, we normally would assume _logical_ when nothing is specified.

Chrome and Firefox have different interpretations:

Source:
```html
<p dir="rtl"><span style="position: relative;">abc&#x5d0;def<span style="position: absolute; left: 0; top: 0; bottom: 0; border-left: 0.1em solid red"></span></span></p>
```

Chrome (_visual_):
![image](https://user-images.githubusercontent.com/43403851/196694766-55b605a7-d9eb-48a1-bf2c-c7da517a7ecd.png)

Firefox (_logical_):
![image](https://user-images.githubusercontent.com/43403851/196694840-5f1e5246-110d-475c-978c-a861e73dc22e.png)

This also demonstrates how unexpected the _logical_ version is.

Whether extending the paragraph is enough or the processes requires more detailed specification we are not sure.

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


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

Received on Wednesday, 19 October 2022 12:50:46 UTC