- From: Lukas Oppermann via GitHub <sysbot+gh@w3.org>
- Date: Thu, 01 Oct 2020 07:21:57 +0000
- To: public-design-tokens-log@w3.org
## Concerning token names Currently the interface defines names as `string`. ```ts interface Token { name: string; value: any; description?: string; data?: Data; // What other properties are needed? (type, category, group…) } ``` However I am wondering if this should be more strict? Since I guess most of us have worked with tech a lot, the examples "accidentally" seem to all follow conventions. However I have seen names like this: - `button login` - `buttonLogin` - `Button-Login` - `button_login` - `button+login` Also there are many languages with special characters like `äüöß`. I think this is something to consider and specify, either by restricting it to a certain format and character set or by explicitly allowing any string. ### Case 1: restricted E.g. `lower case with dash` = `button-login`. This makes it much easier to work with from a tech side, as you know what you are getting. Kebab case can be transformed to camel case to make items referencable using dot notation or usable in iOS or css. However it does restrict the user or at least the users output. ### Case 2: unrestricted This would allow very expressive names. However this makes it complex to use references in dot notation or use the names in code. They need to be converted and special attention needs to be put on how the names are converted to be still easily readable. -- GitHub Notification of comment by lukasoppermann Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/1#issuecomment-701942523 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 1 October 2020 07:21:59 UTC