RE: [css3-background] Default shadow color

Brad Kemper wrote:
>> I don't get how black is better than currentColor given that it is the default color for text in most browsers; why pick a >>default that's will be wrong the most often ? 
>Black or translucent black would be wrong less often. Shadows that stayed black when the author changes the text color to red >would be less surprising. Having the box shadow turn red just because you turn set the color of the text to red would be >totally surprising to almost anyone.

Almost is the key word.

We have at least 3 implementations to do exactly that.  It's unlikely that all 3 implementations accidentally do that.  It's also unlikely that the code is writing itself.

That suggests that there is at least 1 person.

Drawing your conclusions from "everyone probably agrees with me, there's a minority that don't" is a statistics game that leads to all kinds of fun results.


Perhaps if you felt so strongly about this, then the original edit that added box-shadow or the re-edit that introduced it should have said something like...

"When color is not specified for <shadow>, the default must be a fixed color that is not completely transparent (alpha > 0).  Exactly which color is UA-defined but here's a list of colors that we think are bad choices ...."


But that's not where we are.


It sounds like we're going in circles, so I guess CSS3 should just leave it defined as is and CSS4+ should gain some teeth so that we clearly indicate that (a) transparent as default color is not conformant and (b) any other desirable aesthetic for the default color be expressed explicitly rather than left as UA-defined.


The current state is that we apparently have a "totally surprising to almost anyone" implementation across at least 3 browsers, even though at least one person is depending on that behavior already.

Received on Saturday, 5 March 2011 22:20:30 UTC