W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-inline-3] initial-letters: interaction of shape-margin and regular margin (#5119)

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Fri, 12 Jun 2020 01:02:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-643007773-1591923738-sysbot+gh@w3.org>
Actually, thinking about this more... we've got several options here:

- Lines wrapped to the glyph use the `shape-margin` distance between the glyph outline and the line box edge, completely ignoring margin/border/padding on the initial letter box itself.
- Lines wrapped to the glyph use the maximum of the `shape-margin` distance and margin+border+padding distance between the glyph outline and the line box edge.
- Add a `none` initial value to `shape-margin`, and use `shape-margin` exclusively whenever it is not `none`.

Only honoring `shape-margin` rather than taking the maximum is simpler, but there is a definite advantage to honoring the margin/border/padding distances, since they can be controlled independently per axis. And anyone applying either margin or padding automatically gets some amount of spacing on all lines, and does not need to specify both `shape-margin` and `margin-inline-end` to get reasonable behavior. So I think I'm a bit biased against the first option, but either of the second two seem reasonable.

(The additive option, having `shape-outline` expand the size of the initial letter box, doesn't seem particularly useful since `padding` accomplishes the same thing; and `shape-margin` in general overlays the box decorations rather than affecting the box’s size, so that would be inconsistent with how it's interpreted for floats also.)

CC @dauwhe

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5119#issuecomment-643007773 using your GitHub account
Received on Friday, 12 June 2020 01:02:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:27 UTC