- From: Adenilson Cavalcanti <a.cavalcanti@samsung.com>
- Date: Mon, 21 Sep 2015 17:50:40 +0000
- To: "www-style@w3.org" <www-style@w3.org>
First, I must say thanks to everyone that commented on the issue. There seems to be some agreement towards suggesting a non-normative algorithm, which could be referenced by spec-ing lighten()/darken() in Color. I see the whole subject taking 3 steps, as follow: a) make it explicit the black case; b) defining a general algorithm (that may be a bit tricky); c) spec-ing lighten()/darken() in Color. The reason why I think it makes sense to make the black border case explicit is that 3 different web engines (WebKit, Blink, Servo) got it wrong. I would say that is strong evidence that the spec may be unclear. As such, Iıve opened the merge request to add to the css-backgrounds spec: https://github.com/w3c/csswg-drafts/pull/52 Adenilson >On 14/09/15 19:15, Simon Fraser wrote: >>> On Sep 14, 2015, at 8:24 AM, Adenilson Cavalcanti >>> <a.cavalcanti@samsung.com <mailto: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ım in favor of suggesting a non-normative but well-defined algorithm in >the spec. > >> 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. > >Would color( lightness()) from >https://drafts.csswg.org/css-color/#modifying-colors work? > >-- >Simon Sapin >
Received on Monday, 21 September 2015 17:51:11 UTC