w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.46k stars 658 forks source link

[css-inline-3] shape-margin on initial-letters-wrap: first #5117

Closed fantasai closed 4 years ago

fantasai commented 4 years ago

In https://github.com/w3c/csswg-drafts/issues/4171 we resolved to apply 'shape-margin' to the glyph outline for initial-letters-wrap: all. What about the first line of initial-letters-wrap: first?

CC @dauwhe @faceless2

fantasai commented 4 years ago

Another related case to consider: the glyph outline of descenders that expand outside the initial-letter’s box.

faceless2 commented 4 years ago

I think it needs to apply to any case where the margin is derived from the outline of the letter - so yes, it should apply to the first line of initial-letters-wrap: first and around the descenders.

fantasai commented 4 years ago

SGTM. Let's ask the WG. :)

css-meeting-bot commented 4 years ago

The CSS Working Group just discussed shape-margin on initial-letters-wrap: first, and agreed to the following:

The full IRC log of that discussion <heycam> Topic: shape-margin on initial-letters-wrap: first
<heycam> github: https://github.com/w3c/csswg-drafts/issues/5117
<heycam> fantasai: we resolved to allow shape-margin that wraps around the glyph, and wrapps all the lines around the shape
<heycam> ... the other values of initial-letter. one is first, which pulls the first line in and wraps it
<heycam> ... the suggestion was if we apply a shape margin to all lines when wrapping to the glyph shape, shouldn't you also allow it when wrapping the first line to it
<jensimmons> +1 from me to this
<heycam> ... proposal is to make shape-margin apply whenever you are wrapping to the glyph shape
<heycam> Rossen_: currently it's defined only to apply to floats
<heycam> fantasai: we should probably update to say it also applies to initial letter boxes
<astearns> +1 from me
<heycam> ... then define exactly how that works in initial-letter-wrap
<heycam> dbaron: presumably you want the same wording that you have for 'all'?
<heycam> ... [reads some spec text]
<heycam> fantasai: makes sense to me. apply shape-outside and shape-margin, and use that as a replacement of the glyph shape
<heycam> faceless2_: I agree that makes sense
<florian> +1
<dbaron> What I read was "If the value of shape-outside is not none, shape-outside is used instead of the glyph outline. In both cases, shape-margin is applied to expand the outline."
<dbaron> ... from https://drafts.csswg.org/css-inline-3/#valdef-initial-letters-wrap-all
<heycam> RESOLVED: shape-margin and shape-outside apply to initial letter wrapped inline boxes, modifying or replacing the shape of the glyph
fantasai commented 4 years ago

Turns out no edits are necessary, since first defines itself in terms of none and all. ^_^

fantasai commented 4 years ago

Filed https://github.com/w3c/csswg-drafts/issues/5160 on updating the css-shapes-1 propdefs (not directly about this issue, but mentioned in the WG discussion).