- From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
- Date: Wed, 08 Jun 2022 22:48:00 +0000
- To: public-css-archive@w3.org
> @SebastianZ You have to consider what's more common: using text-shadow on text with a stroke and no decorations, or on text with decorations and no stroke. You're trying to optimize the former at the expense of the latter, but I think the latter is far more common. I can't tell what will be used more often. Of course, text with decorations is far more common than text with strokes. Though I assume that strokes will be much more common in combinatino with other stylistic ways to emphasize text like inset shadows. > And for decorated, unstroked text, I think the right answer is pretty clear: we want the decoration and the text composited before being shadowed. Drawing the shadows independently over the text and the line decoration looks weird and wrong. I don't agree with you that there's a clear preference for one of the variants. Especially when the decoration has a different color than the text, it might look better the to shadow text and decoration independently. And again, this is for inset shadows. Outset shadows should definitely be drawn after compositing text and decorations to avoid the overlapping shown in the example of your initial post. Though I believe we should provide some more renderings for that to show the differences. With them it will probably be easier to decide on that. > Since text stroke is sandwiched between the decoration (which is drawn over it) and the text fill (which is drawn under it), getting the common cases right requires compositing the stroke with the text before shadowing it. From that and the previous paragraph, I guess the rough rendering steps you suggest are 1. fill of text 2. stroke of text 3. fill of decoration 4. stroke of decoration 5. composite everything 6. outset shadows and above them everything composited 7. inset shadows Is that correct? (Note that these steps don't fully reflect the paint order. They outline the order in which rendering happens.) > As for whether for stroked, undecorated text the shadow should be inside the stroke or over it: @jensimmons asserts that both renderings could be desirable. And I assert that only that only the rendering with stroke above the shadow is desirable. Though we should provide some renderings for that as well, so the differences become obvious. Sebastian -- GitHub Notification of comment by SebastianZ Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7251#issuecomment-1150488940 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 8 June 2022 22:48:01 UTC