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

Re: [css3-images] 2011/12/01 ED section 4.2 review notes

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 5 Dec 2011 11:56:03 -0800
Message-Id: <DD276978-AA81-4FE0-9B1D-A64EF546D44E@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
To: Brian Manthos <brianman@microsoft.com>

On Dec 5, 2011, at 9:15 AM, Brian Manthos <brianman@microsoft.com> wrote:

> As per discussion with Tab -- I recommend the Editors start getting in the habit of "horizontal then vertical" when <position> is involved, because of the quirks in its grammar related to ordering.  As such...
> 
> 1a. radial-gradient(15px at right bottom, red, blue);
> 1b. radial-gradient(at right bottom 15px, red, blue);
> 
> 2a. radial-gradient(15px at right, red, blue);
> 2b. radial-gradient(at right 15px, red, blue);
> 
> 3a. radial-gradient(15px at 2px, red, blue);
> 3b. radial-gradient(at 2px 15px, red, blue);
> 
> For 1b/2b/3b, it's unclear whether 15px belongs to the <position> or not.

Those are good reasons why the current grammar doesn't allow that sort of reordering. 

>> We can't ... Now that we've dropped the 'to', the parsing of
>> <position> is ambiguous if it's allowed to be followed by <size>
> 
> The unstated assumption is that the removal of "to" is more valuable than reordering support.  I disagree with that assumption.
> 
> Either reordering is the primary concern or removing "to" is.  If reordering is primary, then keeping "to" (or another keyword if we could find agreement on one) is preferred so that full reordering is supported.  If removing the "to" is primary, then we should dump reordering entirely.

I think readability is more primary than reordering. Reordering is, at best, a nice-to-have. 
 
> The current grammar characteristic of "you can reorder some of it for what seems like arbitrary reasons because it's not documented" has both bad properties: -1- confuse authors and -2- an overly complicated parser.

I don't think it will confuse authors to exclude grammatically confusing or ambiguous combinations. 

> Further, one of the concerns with the prior grammar was that you could do...
>    radial-gradient(...<position>...<size>, ...)
> but you could not do
>    radial-gradient(...<size>...<position>, ...)

Was it? As I recall, that was not a concern, as much as that you could combine position and size, or have size by itself, but could not have position by itself. I don't know why it would be important to be able to do <size>...<position> in that order.


> Again, another valuable reason for doing the grammar change in the first place was so that the grammar is extensible in the future.  It's clear that the removal of "to" has already hampered reordering support in the grammar of today, and thus will likely present extensibility problems in the future.

How so?
Received on Monday, 5 December 2011 19:56:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT