- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Tue, 09 Aug 2011 21:18:54 -0700
- To: www-style@w3.org
On 08/09/2011 05:28 PM, L. David Baron wrote:
> I asked Vitor Menezes, an intern this summer at Mozilla, to work on
> implementing @supports (as @-moz-supports). He pointed out the
> following problem with the grammar: The grammar currently *attempts*
> to avoid allowing nesting extra sets of parentheses, e.g., to allow
> @supports (display:block) and (display:inline)
> but disallow:
> @supports (display:block) and ((display:inline))
> but it fails to do that in one case, which is that it allows double
> (but not more) parentheses around the argument to "not".
>
> On reflection, I think forbidding doubling of parentheses is a bad
> idea because it makes it harder for people to test things by
> commenting them out. In other words, since an author may want to
> experiment with:
> @supports not ((display:block) and (display:inline))
> by changing it to:
> @supports not ((display:block) /*and (display:inline)*/)
> it should be legal to write:
> @supports not ((display:block))
I don't mind this.
> Now, the one other thing I'm reconsidering is my idea of forbidding
> the declaration not being in parentheses. In other words, my
> current grammar attempts to allow these:
> @supports (display:block) {}
> @supports (display:block) and (display:inline) {}
> @supports not (display:block) {}
> but it disallows:
> @supports display:block {}
> I'm inclined to remove that restriction as well and allow the last
> of the above as well.
>
> Does this seem reasonable? If so, I'll attempt to restructure the
> grammar along these lines.
This I'm less comfortable with. I suppose the only thing it prevents
is using braces within a property declaration, but even then I'm not
sure we should be doing that just because we want to get rid of more
parentheses.
~fantasai
Received on Wednesday, 10 August 2011 04:19:33 UTC