W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: Proposal for a unified shadow property

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 29 Dec 2010 10:07:04 -0800
Message-ID: <AANLkTik1d=Jmzuj+3NhHv+Vg4r54XRg6C1fJu0WvkODX@mail.gmail.com>
To: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Cc: www-style@w3.org
On Wed, Dec 29, 2010 at 5:58 AM, Jeremie Patonnier
<jeremie.patonnier@gmail.com> wrote:
> Hello CSS WG
> I was recentlly digging into the diffrents shadows property available with
> CSS : text-shadow and box-shadow
> There are very similar except for some little glitch you know.
> I also looked at some ideas and proposal that make me think about those
> shadows property :
> The -webkit-svg-shadow that give a very good solution to deal with alpha
> transparency of elements (especially images with alpha transparancy)
> The awesome drop-shadow proposal :
> http://www.bradclicks.com/cssplay/drop-shadow/Drop-Shadow.html
> In a webdesigner point of view, it could be very usefull to have a single
> set of properties to deal with every type of shadows
> Those new properties (possibly simply called shadow-* and shadow for the
> shorthand property) could be the same as the box-shadow' set of properties
> except for one new property that will target the graphical source used to
> compute the shadow.
> So this new source property could be named "shadow-source" and could take
> the following values :
> box : to acte exactly the same as box-shadow (and that could be the default
> value)
> text : to acte exactly the same as text-shadow
> alpha : to use the alpha transparency of the whole box (basically to produce
> the same shadow as the -webkit-svg-shadow does)
> Anything else that could be relevant, the drop-shadow proposal has some
> interesting though here.
> It's maybe a little naïve but, I think it could be easier for both users and
> implementors. For users, it would be simpler because they'll have to learn
> only one property to produce any type of shadow. for implementors, the idea
> is to expose a single property (well a single set of properties) that can
> share common mechanisms and that can be extensible by adding some new shadow
> sources instead of building a whole new set of properties to create a new
> type of shadows.
> Can you see any technical or practical problem about such a unification?
> I don't know what's happen behind the scene of the different CSS rendering
> engines and maybe these proposal is unrealistic. Let me know.

You're not thinking large enough.  ^_^

box-shadow and text-shadow are both specializations of a more general
property/set of properties that will be introduced in the CSS Filters
module.  This module will let you select what effect to apply to an
element, and what parts of the element to apply the effect to.
Shadows are definitely one of the effects.

The Filters module hasn't been written enough yet to publish as an
editor's draft, but I expect progress on that front sometime in the
coming year.

Received on Wednesday, 29 December 2010 18:07:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:54 UTC