Re: [csswg-drafts] [css-text-decor-4] Composition of inset shadows (#7251)

The CSS Working Group just discussed `Composition of Inset Shadows`.

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: Composition of Inset Shadows<br>
&lt;fantasai> astearns: Some additional discussion and a few attempts at mockups<br>
&lt;fantasai> astearns: trying to figure out what to do wrt text-shadow inset and text decorations<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/7251<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7251<br>
&lt;fantasai> Sebo: Discussing paint order and compositing fill/stroke/shadow<br>
&lt;fantasai> Sebo: lot of discussion around that<br>
&lt;fantasai> Sebo: My point of view was that composition should be done so that the inset shadow is between fill and stroke<br>
&lt;miriam> present_<br>
&lt;fantasai> Sebo: but fantasai said that this could lead to some perf issues ...<br>
&lt;fantasai> fantasai: not perf issue<br>
&lt;smfr> q+<br>
&lt;emilio> fantasai: One issues is that the stroke comes between the text and the text-decoration, so if you have a strike through you are going to stroke text then strike-through, so if you want to shadow between text and fill you are going to also need to shadow the text decoration<br>
&lt;emilio> ... the point of shadows is to create an inset / outset effect<br>
&lt;emilio> ... so you if you have text and decorations with their shadows it looks super weird<br>
&lt;emilio> ... for text that's decorated makes more sense to shadow text + decoration at the same time<br>
&lt;emilio> ... so you we can't shadow between fill and stroke<br>
&lt;emilio> ... that is also an issue because if you don't strike together a semi-transparent shadow will look darker on the decoration<br>
&lt;astearns> ack smfr<br>
&lt;emilio> smfr: for outset shadows I agree we want to composite + shade text and decoration together<br>
&lt;bradk> Issue link, please? Sorry, I arrived late<br>
&lt;emilio> ... does any of the illustrations in the example match what fantasai is proposing?<br>
&lt;bradk> Thanks<br>
&lt;emilio> fantasai: I don't think any of them are<br>
&lt;emilio> smfr: can we get an illustration of what the behavior should be?<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/7251#issuecomment-1145287101<br>
&lt;emilio> fantasai: if we ignore the stroke on the second one that's the effect you'd get<br>
&lt;emilio> ... if you consider the stroke because the text decoration has its own independent stroke, but the shadow effect in that comment is what you'd get<br>
&lt;emilio> smfr: so you want stroking behavior of first line and shadowing behavior of the second?<br>
&lt;emilio> fantasai: yes<br>
&lt;Sebo> q+<br>
&lt;astearns> I think it would be weird to have a stroke on the decoration but no shadow cast by that stroke<br>
&lt;emilio> fantasai: I think most cases would have either stroke or text-decor<br>
&lt;emilio> ... the top rendering doesn't quite work<br>
&lt;emilio> ... you still have two things that are cut out but flat<br>
&lt;emilio> ... the second one seems like you pushed the text into the canvas which is somewhat consistent with the effect<br>
&lt;emilio> ... it's also consistent between inset and outset shadows<br>
&lt;emilio> ... there's cases where drawing the inset shadow between fill/stroke looks better but the effect is that when you have decorations it'd look wrong<br>
&lt;emilio> smfr: if we stroke using top and shadow using the bottom one it's going to look very weird too<br>
&lt;emilio> fantasai: let's say you have strokes that are similar color for shades of yellow/orange<br>
&lt;emilio> ... you cut that out and shade it behind the canvas<br>
&lt;emilio> smfr: maybe Sebo or fantasai can illustrate the behavior in a drawing tool<br>
&lt;emilio> ... if it's hard to do in a drawing tool it's possibly hard to do programmatically too<br>
&lt;emilio> astearns: hard to do for me in a drawing tool doesn't mean hard to do in a drawing tool :)<br>
&lt;emilio> fantasai: we can try to work on that tomorrow<br>
&lt;emilio> astearns: whenever we can have them it'd be great to have pictures of what fantasai is trying to express<br>
&lt;astearns> ack Sebo<br>
&lt;emilio> ... I'm having a hard time following<br>
&lt;smfr> q+<br>
&lt;astearns> ack smfr<br>
&lt;emilio> smfr: one more q and one more statement. Inset shadows are going to require masking on the text, so lots of texts with inset shadows are going to get pretty expensive<br>
&lt;emilio> ... and authors can have very small text with very large blur radius<br>
&lt;emilio> ... so not sure we need some limits here<br>
&lt;emilio> astearns: if you have a shadow with a big offset does it mean that the shadow appears in another line? That sounds tricky<br>
&lt;emilio> smfr: potentially? Good point<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7251#issuecomment-1156675574 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 June 2022 16:20:04 UTC