- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Wed, 19 Aug 2009 09:19:19 -0700
- To: Brad Kemper <brad.kemper@gmail.com>
- CC: www-style <www-style@w3.org>
Brad Kemper wrote:
>
> On Aug 18, 2009, at 11:28 PM, Andrew Fedoniouk wrote:
>
>> background-color: linear-gradient(
>> start:0% 0%,
>> stop: 100% 100%,
>> color-stop: 0% white,
>> color-stop: 50% red ,
>> color-stop: 100% blue );
>
> I think that is way too verbose.
>
>
But human readable and machine parse-able.
Proposed syntaxes I've seen so far in linear-gradient() are
not readable (that is subjective of course) and not
unambiguously parseable.
That use of '/' as a some kind of separator with absolutely non-clear
grammatic nature is very bad.
For example here:
p { font: x-large/110% "New Century Schoolbook", serif }
'/' is an operator combining two atomic values.
Operator precedence in grammar: slash, comma, space.
And here:
background: linear-gradient(top left to bottom left / yellow, blue);
'/' is an operator combining two lists. It assumes
operator precedence as: comma, space, slash.
That means in different contexts this operator has different precedence.
Which is extremely bad as for the human as for the machine.
I believe that having three operators aimed to glue list (space, comma
and the slash ) is just too much to be practically useful.
Side-note: the same conflict we observe in border-radius attribute now.
'/' there makes almost impossible to create context free parser for the CSS.
--
Andrew Fedoniouk.
http://terrainformatica.com
Received on Wednesday, 19 August 2009 16:19:52 UTC