W3C home > Mailing lists > Public > public-design-tokens-log@w3.org > March 2020

Re: [community-group] [RFC] Format specification (#1)

From: Miriam Suzanne via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Mar 2020 21:00:59 +0000
To: public-design-tokens-log@w3.org
Message-ID: <issue_comment.created-594166208-1583269258-sysbot+gh@w3.org>
@kevinmpowell I think it may be a mistake to look for a "best" color-format or unit. If that were possible, everyone would already be using a single approach. In order to build something truly cross-platform, I think we have to embrace the complexity/flexibility of that problem. That's the entire underlying vision of the web, but a problem most native tools are able to simplify or restrict.

I often hear "cross-platform" used as a reason to avoid CSS – but I think it might be the reason to look at CSS as the *most relevant* prior art. CSS is explicitly designed to work across media, adapting to any context. All the JSON/YAML solutions I've seen hand-wave away that complexity, in favor of simple units like `px` or hex colors.

With both colors and sizing, the latest CSS specs are pushing hard in the other direction: support for muliple color spaces (like CIE LAB/LCH), and different display gamuts, in addition to the existing formats for sRGB color (hex/hsl/etc). For sizes, we get physical values (in/cm/etc), digital-but-static (px), relative (%, vh, vw, em, rem, ch, etc), and even totally dynamic, contextual sizes (fr, flex). And it is often the least definable/convertible units that provide the most powerful _systems_ – because they communicate dynamic relationships between tokens.

Conversion can happen between some color formats, and some unit types, but not all – and those conversions can be lossy if you cross between color-spaces or unit-types. The different formats/unit-types exist because they carry different meanings & metadata, which can't simply be discarded for the sake of simplicity. It's a hard problem to solve, and the results are complicated because they rely on consistent adaptability rather than total uniformity.

It's my main concern with this project: Will non-web tools be able to interface with a token spec that is truly flexible/contextual/systematic enough to work on the open web? If so, does CSS provide a useful baseline? Or are people hoping we can limit ourselves to a single type of static unit that is easy to define, like most YAML/JSON solutions do?

GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/1#issuecomment-594166208 using your GitHub account
Received on Tuesday, 3 March 2020 21:01:01 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 3 March 2020 21:01:02 UTC