W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css3-values] nesting calc()

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Tue, 26 Jun 2012 06:06:11 +0800
Message-ID: <4FE8E0D3.1000300@csail.mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Fran├žois REMY <fremycompany_pub@yahoo.fr>, fantasai <fantasai.lists@inkedblade.net>, WWW Style <www-style@w3.org>
(12/06/26 5:38), Tab Atkins Jr. wrote:
> However, I don't want to do that.  We already use parens as the more
> general "grouping" construct elsewhere in CSS (media queries), 

which then can be a good comparison to using bare parenthesis as calc().
Calculation is a very general "grouping" construct at the "value" level,
and the reason why it wouldn't work directly at the top level of a
mediaText is because at that location UA expects a declaration-like
thing instead of a value. A way to think about this is perhaps to think
about this like the parenthesis after "for" in C/JavaScript, where some
special syntax in it is expected.

(And of course C/JavaScript has no problem treating bare parenthesis as
"calc()")

> and I think it would be weird to have paren-groups imply calc in some
> places and not others.

So it seems that this boils down to a matter of personal preference. If
there are good examples showing how bare-parentheses-as-calc might be
confusing, I might change my mind.

> I'd just like #1, to allow calc() inside of calc(), with the same
> meaning parens inside of calc().

which means that we'll have two syntax for calc() in a calc(). That can
be confusing.


Cheers,
Kenny
Received on Monday, 25 June 2012 22:06:43 GMT

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