W3C home > Mailing lists > Public > www-style@w3.org > January 2015

Re: [css-text-decor]: text-shadow should also apply to replaced content, like semi-transparent images

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 28 Jan 2015 19:17:53 -0800
Message-ID: <CAAWBYDDZsLDmfTGLqaw9QoUS2nOgfNE35G=uBounWSWdy2BQQw@mail.gmail.com>
To: Axel Dahmen <brille1@hotmail.com>
Cc: www-style list <www-style@w3.org>
On Wed, Jan 28, 2015 at 6:34 PM, Axel Dahmen <brille1@hotmail.com> wrote:
>> That cost is paid no matter what, no?
>
> Sorry, you've lost me here. Is this colloquial English? I don't know what it
> means.

Kinda.  You brought up the cost of animating a shadow, for some
reason.  That seems like a non-sequitur - you can animate any kind of
shadow, and it's all about the same cost, so what's the point of
bringing it up here?

>> They're not the same.  Text is a vector format,
>
> ... well, AFAIK, SVG is, too ...

Sorry, got distracted during that sentence and didn't finish it
correctly.  It's a pure-geometry vector format.  There's no colors or
transparency or whatever to it.  You just get some paths, and then
fill them as you desire, and that's that.  That means that you can
shadow text by just drawing the same paths again.

>> we can just redraw the text in the
>> desired shadow color, apply the desired blurring, then composite it in
>> the right place in the visual ordering.
>
> You've lost me here again. What would actually be the precise difference
> when adding a blurred shadow to vector/raster images?
>
> When you add shadows to images, you just redraw the image in the desired
> shadow color, apply the desired blurring, then composite it in the right
> place in the visual ordering.
>
> What else would you possibly apply to images?

"redraw the image in the desired shadow color" is not the same
operation as it is with text.  With text it's literally identical to
the original drawing operation, you just supply a different fill
color.  With an image, you've got a lot of stuff to fiddle with.  This
is why the drop-shadow() filter is a separate operation from
box/text-shadow - it only pays attention to the alpha channel of the
content.

~TJ
Received on Thursday, 29 January 2015 03:18:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:57 UTC