Re: [css-values-4] String concatenation

On Tue, Jul 22, 2014 at 9:47 AM, François REMY
<francois.remy.dev@outlook.com> wrote:
>> 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)

Already completely true - calc() can represent a <number>, an
<integer>, a <length>, etc depending on its contents.

~TJ

Received on Tuesday, 22 July 2014 21:15:43 UTC