Closed lpalmes closed 6 years ago
Thanks!
I think Js.Float.toString method is our friend here. To uses JS semantic and more lightweight. But if we stick with Printf.sprintf, why don’t we use it to write the whole string? Less string concatenation to do
makes sense, i just hotfixed the problem i was having, i like that idea
Trying to stay away from Js specific code fyi
hey @threepointone,
first of all great library, i'm finishing my jsxnice bindings, i'm pretty excited to use them on my own code, while using the library i found out that dimension were having a bit of trouble with string_of_float given that if i make this
string_of_float(100.)
it will output100.0
, so dimensions where like this on the csswidth: 100.%
and at least firefox was angry that 100. is not a proper valueso the fix is to change every
string_of_float
toPrintf.sprinf("%f", v)
that will output100.0000000
but i don't think that will be a problem, thanks a lot!