Bug 249918 - [WPT] css/css-lists/list-marker-symbol-bidi.html with "unicode-bidi: plaintext" may have incorrect expected rendering
Summary: [WPT] css/css-lists/list-marker-symbol-bidi.html with "unicode-bidi: plaintex...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://wpt.live/css/css-lists/list-ma...
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2022-12-27 20:49 PST by zalan
Modified: 2023-11-30 15:52 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2022-12-27 20:49:59 PST
<style>
ul {
  direction: rtl;
}
li {
  outline: 1px solid;
}
img {
  width: 10px;
  height: 10px;
  background-color: blue;
}
</style>
<div style="width: 200px; border: 1px solid;">
  <ul dir="rtl">
    <li style="unicode-bidi: plaintext"><img></li>
  </ul>

  <ul dir="rtl">
    <li style="direction: ltr; text-align: right"><img></li>
  </ul>
</div>

shouldn't both lines produce the list marker at the same (horizontal) position?
Comment 1 Radar WebKit Bug Importer 2023-01-03 20:50:17 PST
<rdar://problem/103859351>
Comment 2 Oriol Brufau 2023-01-04 03:35:47 PST
https://drafts.csswg.org/css-lists/#marker-side

marker-side defaults to match-self, i.e.

> The marker box is positioned using the directionality of the ::marker’s originating element.

So since the 1st <li> has direction:rtl, then its ::marker appears at the right. And since the 2nd <li> has direction:ltr, its ::marker appears on the left.

It sounds like you expect marker-side:match-parent

> The marker box is positioned using the directionality of the ::marker’s originating element’s parent element.

Then since the <ul> have direction:rtl, both markers would appear at the right.

I don't see why unicode-bidi:plaintext would make it different, given that the markers have outside position. https://drafts.csswg.org/css-lists/#list-style-position-outside

> CSS does not specify the precise location of the marker box or its position in the painting order, but does require that it be placed on the inline-start side of the box, using the writing mode of the box indicated by marker-side.
Comment 3 Ahmad Saleem 2023-11-30 15:52:43 PST
It is failing only in Safari / WebKit. Adding 'BrowserCompat' tag and also adding 'WPTImpact'.