Re: Gradient syntax proposal

On Mon, Aug 17, 2009 at 3:32 PM, Brad Kemper<brad.kemper@gmail.com> wrote:
> On Aug 17, 2009, at 11:07 AM, fantasai <fantasai.lists@inkedblade.net>
> wrote:
>
>> Brad Kemper wrote:
>>>
>>> On Aug 15, 2009, at 11:49 AM, Tab Atkins Jr. wrote:
>>>>>
>>>>> What I am against is adding complexity and confusion to the grammar
>>>>> just to
>>>>> serve some extreme edge cases.
>>>>
>>>> It only adds complexity when you want it.  In the simple, common cases
>>>> it has no effect at all.
>>>
>>> It adds unnecessary complexity to the grammar. That's a bad thing.
>>
>> It is, in fact, simpler to re-use existing syntactic constructs
>
> Simpler for who? Implementors? I'm talking about simpler to read,
> understand, etc.
>
> A single key word is simpler to parse mentally than five, or than a string
> of measurements that are based on a completely different coordinate system
> than the color-stop measurements that need to be in the grammar anyway.

I agree with fantasai, though, that having to remember that you use
top-left for this one property and "top left" elsewhere makes it
*more* complex.  I consider it a larger loss, actually.

Even if I were to drop the full <bg-position> notation, I'd still keep
the corners specified as two keywords to parallel the fuller syntax.

Here's an idea, though:  would we lose much of anything if we dropped
the second point?  Just automatically apply the current omitted-point
rule (rotate the starting-point 180deg around the center of the box).
This would have the side-effect of encouraging use of the simple
keywords further, since there are only a fairly limited set of ways to
express a point that will make a vertical, horizontal, or
corner-to-corner keyword.  If you want your stops to start/end inside
the box rather than on the edges, it'll generally be easier to express
that on the stops themselves, like you want.

~TJ

Received on Monday, 17 August 2009 20:43:44 UTC