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

Re: [css3-conditional] Where () are ok inside @supports?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 9 Aug 2011 17:34:47 -0700
Message-ID: <CAAWBYDDrDMG4r5Qnr3C=82Y0hKKKvGy2GGmi4o+AOEAz4Rz+9w@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: www-style@w3.org, Vitor Menezes <vmenezes@mozilla.com>
On Tue, Aug 9, 2011 at 5:28 PM, L. David Baron <dbaron@dbaron.org> 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))
>
> 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.

Yes, both of these seem reasonable.  Parentheses should be meaningless
beyond grouping (and thus excess grouping is fine), and omitting
parens for the simplest case should be allowed
("@supports(display:block) {...}" looks like it takes a parenthesized
argument, which will probably confuse people).

~TJ
Received on Wednesday, 10 August 2011 00:35:33 GMT

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