Re: [community-group] Remove units from type definitions (#121)

Parsing numbers and units from a string is trivial and performant in every programming language. I personally quite like the readability of having one string represent amount + unit, and it doesn’t impact tooling. So I think this hurts readability without adding any benefit (I don’t think this is easier to implement).

Further, for duration, there’s only one unit (considering `ms` and `s` are just divisions of the same unit), so expanding it just seems to be verbose.

> A better sub type might be a general `Dimension` type

In a design system, time and space are distinct concepts. Numbers can quantify both, but since they have no direct relationship I don’t think there’s a point in tokenizing the number (e.g. `50ms` and `50px` have no relationship).

-- 
GitHub Notification of comment by drwpow
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/121#issuecomment-1085158981 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 31 March 2022 21:49:44 UTC