[css-inline] initial-letter appliance and inheritance · Issue #2184 · w3c/csswg-drafts (original) (raw)

initial-letter does not inherit and applies to

::first-letter pseudo-elements and inline-level first child of a block container

The problem is that the inline-level first child box of a block container is the root inline box, which cannot be targeted using selectors.

If the definition refers to the first child in the element tree then that's a problem with display: contents. And if you have <div><b><i>Text</i></b></div>, it's not clear why initial-letter applies to b but not to i.

In any case, since there is no inheritance, it's not clear what happens if you set initial-letter both to that first child and to the block container's ::first-letter, or to nested ::first-letters.

Instead, I think there are three reasonable possibilities: