Re: [css-backgrounds] Clarification proposal for border colors

> On Sep 14, 2015, at 8:24 AM, Adenilson Cavalcanti <a.cavalcanti@samsung.com> wrote:
> 
> The border style spec (http://dev.w3.org/csswg/css-backgrounds/#the-border-style <http://dev.w3..org/csswg/css-backgrounds/#the-border-style>) is implemented in probably all browsers and has being around for quite a long time.
> 
> I observed that the description of the behavior for 'groove’ value (and the complementary 'ridge') is a bit vague about what the UA is
> supposed to do.
> 
> Quoting: "Looks as if it were carved in the canvas. (This is typically achieved by creating a “shadow” from two colors that are slightly
> lighter and darker than the ‘border-color’.)"
> 
> I think the 'two colors' part could be more descriptive.
> 
> What if we changed it to be clearer and write something like: 
> “The light color should be a percentage of the darker color, between 20% to 50% of its absolute value. And the darker color a percentage in a range of 70% to 90% of border color."
> 
> Another issue is that the behavior for black border could be explicit. I think we could follow up with: "In case the border color is black, a shade of gray must be used as the lighter color.”

I think a good way to spec this would be to spec lighten() and darken() color functions, which you could then refer to in the groove/inset border spec.

Simon

Received on Monday, 14 September 2015 17:15:33 UTC