[community-group] Leading/trailing white space in token names. (#194)

romainmenke has just created a new issue for https://github.com/design-tokens/community-group:

== Leading/trailing white space in token names. ==
```json
{
  "  foo  ": { "$type": "color", "$value": "#ff00ff" }
}
```

Token names are not defined in a similar way as ident tokens are in CSS.
There are no characters that indicate a start or end of a token name.

This implies that token names are defined by an "outside" boundary.
In the example above the token name is defined by the double quotes of the JSON string.

In this example the token name is defined by the enclosing curly braces :

```json
{
  "bar": { "$value": "{  foo  }" }
}
```

These examples are a bit forced, but a lone trailing space is more common :

- `Brand Color Background Green` -> remove `Green` -> `Brand Color Background<trailing invisible space>`
- typo's

This in turn can be confusing for users of these tokens because the visible name doesn't match the actual name.



Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/194 using your GitHub account


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

Received on Wednesday, 7 December 2022 07:46:19 UTC