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

Re: [css-shapes][css-images] Ellipse syntax(es) with a single radius

From: Alan Stearns <stearns@adobe.com>
Date: Sun, 6 Dec 2015 10:46:10 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "www-style@w3.org Style" <www-style@w3.org>, "rob.buis@samsung.com" <rob.buis@samsung.com>, "Eric A. Meyer" <eric@meyerweb.com>
Message-ID: <29D994A8-2DE2-4A1C-9303-BD4D572A0E54@adobe.com>
On 12/6/15, 2:10 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Sat, Dec 5, 2015 at 10:18 AM, Alan Stearns <stearns@adobe.com> wrote:
>> In a bug [1], it’s noted that the ellipse() function is defined to only accept 0 or 2 radius values. If one radius is provided, it’s an invalid shape function. Tab suggested in the bug that we allow a 1-radius ellipse, and just set the second radius to the same as the first.
>> As I recall [2], I defined the ellipse function to match what we have in radial-gradient(), where if an ellipse ending-shape is explicitly used, you can only use 0 or 2 radius values.
>> I don’t much care whether we allow one-radius ellipse syntax or not, but if we do I think we should also change radial-gradient() to match. I don’t think it’s terribly useful to have a one-radius ellipse that devolves to a circle, though. So I’m slightly inclined against the change because I don’t think the limited use warrants mucking around with gradients.
>Check radial-gradient() again - it requires 0 or 2 *length/percentage*
>values, or 1 keyword.  You have ellipse() accepting 0 or 2 keywords
>(along with 0 or 2 len/%).  You're not currently matching
>radial-gradient() at all. ^_^

I did note that discrepancy in the previous thread on this topic (that I linked with [2], and that you were part of). The main difference is that the shape functions have parameters that are always radius values, while the gradient syntax has a <size> argument that can either be radius value(s) or a more general sizing constraint (and the gradient syntax has additional keywords built to use in that general sizing constraint).

So I’m trying to match the case where the gradient syntax specifies radius values. The fact remains that if I change the ellipse() function to allow only one radius value, it probably makes sense to change the gradient syntax to allow that as well. But all this accomplishes is the ability to create circles with one less parameter in the ellipse() function.

[2] https://lists.w3.org/Archives/Public/www-style/2013Dec/0015.html

Received on Sunday, 6 December 2015 10:46:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC