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: Sat, 19 Jul 2014 13:21:04 +0200
Message-ID: <DUB130-DS26AECC0C9065F49C008F26A5F20@phx.gbl>
To: "Tab Atkins Jr." <jackalmage@gmail.com>, "Lea Verou" <lea@verou.me>
Cc: "www-style list" <www-style@w3.org>
> I'm weakly in favor of a concat() function, but given that we already
> have math relegated to the calc() function, I don't think I'm opposed
> to a naked + character doing string concatenation, as it won't be
> ambiguous.  It would need to be strict about its types; that is,
> actually requires <string> values on either side, but I think that's
> just fine.

I'll admit I'm scratching my head over this one. Concatenating strings is a 
fringe use case on a layout system like CSS, while adding numbers is 
something really common. Optimizing one and not the other [1] looks to be a 
huge prioritization mistake to me. If mathematics are not worth more than a 
"calc" function, I see no reason explaining string concatenation would be 
worth an inline syntax.

[1] http://lists.w3.org/Archives/Public/www-style/2014Jun/0411.html

PS: I also believe it would be a first (in CSS) that generic tokens can be 
combined together using a non-whitespace separator but no grouping at all. 
That looks strange to me. 
Received on Saturday, 19 July 2014 11:21:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:34 UTC