W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-values-4] String concatenation

From: François REMY <francois.remy.dev@outlook.com>
Date: Tue, 22 Jul 2014 18:47:41 +0200
Message-ID: <DUB130-DS1230C1AB17E7397687364BA5F10@phx.gbl>
To: Christoph Päper <christoph.paeper@crissov.de>, "www-style list" <www-style@w3.org>
> IIRC, back when ‘calc()’ was being proposed
> someone suggested to use some kind of
> brackets, ‘(’/‘)’ or ‘{’/’}’ or ‘[’/‘]’ or ‘<’/‘>’, to
> establish a special context inside values
> wherein the usual symbols ‘+’, ‘-’, ‘*’ and
> ‘/’ could be used to combine values.
>
> The plus sign could have been used with
> length and string values differently.

We can however do the exact same thing within "calc".

    calc("a" + "b") // "ab"

But it means that calc() may end up having different types depending on its 
content (albeit it is possible to know it at parse time) 
Received on Tuesday, 22 July 2014 16:47:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC