Closed
Description
Currently, the ident() function is defined to accept <string> | <integer> | <ident>
, and serializes these before concatenating them.
This means that ident("foo" 1)
is valid (producing the ident foo1
), but ident("foo" 1.2)
isn't, and ident("foo" calc(1.2))
produces foo1
. That seems odd.
Is there a good reason to exclude <number>
, and with that, <dimension>
? The serialization for numbers is inherently a bit less predictable, of course, due to floating-point, but in common cases it should do what the author expected. (Especially with CSS's "no more than 6 digits after the decimal point", so we avoid things like JS's .1 + .2
yielding 0.30000000000000004
.)