Re: [css3-values] nesting calc()

(12/06/20 15:45), François REMY wrote:
> I'm not an expert in CSS syntax but it seems to be a dangerous idea. Is
> there a way in CSS to distinguish a function from an identifier followed
> by parenthized expression? Example:
> 
>    animation: attr(anim);
> 
> and:
> 
>    animation: myAnim (15s - 3s);
> 
> ?

Probably no, but I am not exactly sure what your concern is.

Are you saying that people would be tempted to do

  margin: auto(100% - 1em);

and get wrong? If that's the case, why wouldn't people get wrong by thinking

  margin: auto1em;

would work? Is is the parenthesis notation that allures the authors to
drop the whitespace in the middle?

(In your example, "animation: attr(anim);" isn't valid because
"attr(anim)" is a <string>.)


Cheers,
Kenny

Received on Wednesday, 20 June 2012 07:58:42 UTC