-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-inline-3Current WorkCurrent Work
Description
initial-letter does not inherit and applies to
::first-letterpseudo-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:
initial-letteronly applies to block containers that establish an inline formatting context, and affects the initial letter of the block container. But note that often the block container that establishes the IFC is an anonymous one, soinitial-lettershould inherit.initial-letteronly applies to innermost::first-letterpseudo-elements, but it inherits, so you can set it on a block-level, inline-level or::first-letterparent box.initial-letteronly applies to innermost::first-letterpseudo-elements. And that's all because it doesn't inherit.
Metadata
Metadata
Assignees
Labels
Closed Accepted by CSSWG ResolutionCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-inline-3Current WorkCurrent Work