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

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.  The spec would need to clarify, using language like the 09/08 WD:
# If ... it could be interpreted as either a position or an explicit size ..., it must be interpreted as a position.


Getting back to your conclusion ...
> 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.

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.


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>, ...)

The new grammar introduces the opposite concern.  I don't see that as progress.  It seems like the "size goes first" faction "won" (for undocumented reasons) rather than that the original problem (reordering) was addressed.

I'm still curious to here the rationale for killing this reordering support, as it haven't found anywhere where that discussion was documented:
http://dev.w3.org/cvsweb/csswg/css3-images/Overview.src.html.diff?r1=1.230;r2=1.231;f=h


The reordering *was* supported before the "rushed edit and publish" at the last TelCon.


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.


Is it really worth all this pain?  If so, why haven't we documented somewhere *why* it trumps all these other concerns?


-Brian



> -----Original Message-----
> From: fantasai [mailto:fantasai.lists@inkedblade.net]
> Sent: Monday, December 05, 2011 12:41 AM
> To: www-style@w3.org
> Subject: Re: [css3-images] 2011/12/01 ED section 4.2 review notes
> 
> On 12/01/2011 02:01 PM, Brian Manthos wrote:
> >
> > I would prefer either we allow full reordering (and we can, without
> > ambiguity) or no reordering.
> 
> We can't, actually. Now that we've dropped the 'to', the parsing of
> <position> is ambiguous if it's allowed to be followed by <size>
> 
>    bottom right 15px
> 
> Is that
>    <position> = bottom right
>    <size> = 15px
> or
>    <position> = bottom 0px right 15px
>    <size> = [not specified]
> ?
> 
> Otherwise I wouldn't mind allowing reordering.
> 
> ~fantasai
> 

Received on Monday, 5 December 2011 17:16:38 UTC