W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

[csswg-drafts] [css-lists] Should marker obey text properties? (#4447)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 24 Oct 2019 15:35:56 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-512024672-1571931355-sysbot+gh@w3.org>
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-lists] Should marker obey text properties? ==
CSS Text properties don't apply to ::marker.

However, they are inheritable, so you can set them to the list item and observe the effect.

```html
<ol class="type-roman"><li>content</li></ol>
<ol class="type-fixed"><li>content</li></ol>
<ol class="marker-roman"><li>content</li></ol>
<ol class="marker-fixed"><li>content</li></ol>
```

```css
li { text-transform: uppercase }
.type-roman { list-style-type: lower-roman }
.type-fixed { list-style-type: 'i. ' }
.marker-roman ::marker { content: counter(list-item, lower-roman) '. ' }
.marker-fixed ::marker { content: 'i. ' }
```

Firefox renders it as

```
i. CONTENT
i. CONTENT
 I.CONTENT
 I.CONTENT
```

So it seems ::marker's `content` obeys `text-transform` just like a ::before would do, but `list-style-type` does not. But I guess https://bugzil.la/1542807 may make `list-style-type` obey `text-transform`.

(Also note that `list-style-type` behaves like there were `white-space: pre`, ::marker's `content` does not. Is this expected?).

Note that Chromium doesn't support ::marker yet, but recently I implemented `list-style-type: <string>`. With LayoutNG, the result looks like

```
I. CONTENT
I. CONTENT
1. CONTENT
1. CONTENT
```

So `list-style-type` obeys `text-transform`. But in legacy, `list-style-type` behaves like in Firefox:

```
i. CONTENT
i. CONTENT
1. CONTENT
1. CONTENT
```

What's the expected behavior?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4447 using your GitHub account
Received on Thursday, 24 October 2019 15:35:58 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC