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

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

From: Brian Manthos <brianman@microsoft.com>
Date: Mon, 5 Dec 2011 17:15:39 +0000
To: fantasai <fantasai.lists@inkedblade.net>, 'Tab Atkins Jr.' <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D1704511FE8@TK5EX14MBXC264.redmond.corp.microsoft.com>
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:

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?


> -----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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:11 UTC