Closed romainmenke closed 1 year ago
@romainmenke can you provide an example for -0
usage?
calc(1 / -0)
I'm really curious now. I've never come across the concept of negative zero before. What would be a practical application of calc(1 / -0)
in a UI / deisgn system? And what would be the result of that calculation? Infinity? Negative infinity?
In any case, I suppose this could be a limitation of our choice to build on top of JSON, so at a minimum we might want to call that out in the spec.
What would be a practical application of calc(1 / -0) in a UI / deisgn system
I think that is the wrong way to look at this :) The current direction/trend of design tokens is to be a subset of different platform capabilities.
This is just one aspect where the design tokens file format will be able to do less than one of the target platforms.
When teams decide to adopt design tokens they should be aware of all the limitations that are signing up for.
at a minimum we might want to call that out in the spec.
That would be great, but it doesn't scale well, there are so many aspects where design tokens just can't match the capabilities of individual platforms.
Maybe a general notice is better?
If no meaningful example of how -0 is useful for designing and building products, and why it should be captured in design tokens, can be given then it seems, to me, there isn’t much risk in not including it in the spec.
there isn’t much risk in not including it in the spec.
I agree.
@romainmenke any objections to closing this one?
Nope :)
I only left it open in case @c1rrus wanted to add a note to the specification about certain platform specifics like this one that can not be represented.
-0
vs.0
is useful in calculations.But
JSON.stringify(-0)
removes the sign :0
I think the specification needs to adopt specific serialisation and parsing steps for edge cases likes these.Tools will need to implement custom JSON serialisers and parsers if this is to be done correctly.