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

Proposal for a unified shadow property

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Wed, 29 Dec 2010 14:58:58 +0100
Message-ID: <AANLkTinkrBZoeLhNU0U2BpDtH9hmGKnJpy2+Spg4iKaR@mail.gmail.com>
To: www-style@w3.org
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.

Best regards,
-- 
Jeremie Patonnier
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Wednesday, 29 December 2010 13:59:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT