RE: [CSS2.1 - Grammar] The clip property with rect function, allows combination of spaces and commas?

IE 6/IE 7 doesn't fully support the clip property currently.
IE 6/IE 7 have the clip: rect(92px); issue. We expand the 92px across the other fields just like we would extend margin: 5px into margin top/bottom/left/right etc...
IE 6/IE 7 doesn't support commas at all, but only spaces.

I'd lean toward not supporting mixed delimiters as well, but that has an impact for FireFox. We will only support the new syntax in our standards behavior and we never previously supported comma so the mixed delimiters is not an issue for legacy pages that rely on IE6/IE7 mode quirks or strict parsing. Since the code already has to be written to eat whitespace around the comma, avoid 2 commas, etc... it isn't hard to enforce a policy prohibiting mixed delimiters. The grammar for the <shape> construct (which is only currently mentioned in text form, not a formal grammar) becomes less compact but easier to write.

Justin [MSFT]

-----Original Message-----
From: fantasai [mailto:fantasai.lists@inkedblade.net]
Sent: Wednesday, January 09, 2008 6:32 PM
To: Justin Rogers
Cc: www-style@w3.org
Subject: Re: [CSS2.1 - Grammar] The clip property with rect function, allows combination of spaces and commas?

Justin Rogers wrote:
> CSS 2.1 standards supported grammar
>
>     clip: rect(96px, 96px, 96px, 96px);
>
> CSS 2.1 backwards compatible supported grammar
>
>     clip: rect(96px 96px 96px 96px);
>
> CSS 2.1 fuzz test variation with lack of cross browser parity
>
>     clip: rect(96px  ,96px 96px,  96px);
>
> The tests and verification I wanted to perform were (FireFox 3 B2 was
> used when finding the discrepancy):
>
> 1.       Does arbitrary whitespace matter between tokens or is it well
>          ignored. (All: yes)
>
> 2.       Since I support commas and I support spaces can I support a
>          mixture? (FireFox: yes, Safari and Opera: no)
>
> 3.       Out of range parsing (less/more than 4 dimensions). (All: yes)
>
> So the clarification needs to be on the item 2 where we mix and match
> commas and spaces as delimiters. Should the standards behavior be that
> of FireFox or Safari/Opera?

Added as CSS2.1 Issue 28:
   http://csswg.inkedblade.net/spec/css2.1#issue-28

I'd lean towards disallowing mixed delimiters, but what does IE6 do?

~fantasai

Received on Thursday, 10 January 2008 04:24:09 UTC