[css-inline-3] initial-letters: interaction of shape-margin and regular margin · Issue #5119 · w3c/csswg-drafts (original) (raw)

@fantasai as you're working on these.

p::first-letter { initial-letters: 3; margin-right: 20px; shape-margin: 10px; initial-letters-wrap: all; }

Do we add the 20px margin to whatever the 10px margin around the shape is calculated to be at that point, or do we use the maximum of the two values?

We've implemented using the maximum of the two margins, which seems to work better - you can set shape-margin to ensure the shape isn't adhered to too closely, and margin-right to push the content along. This also makes more sense with initial-letters-wrap: first, where both properties apply to the first line but only margin-right on subsequent lines.