- From: Ryan Johnson via GitHub <sysbot+gh@w3.org>
- Date: Wed, 01 Jun 2022 16:51:45 +0000
- To: public-design-tokens-log@w3.org
# Idea # 1: path type What if we had a `{ "$type": "path" }`? This could be used to reference any type of "file" (directory or otherwise), _relative_ to the `*.tokens.json` file. ## Requirements: 1. `$value` MUST begin with `./` (relative) ## Example ```json { "assets": { "$type": "path", "icons": { "alert": { "$value": "./assets/images/icons/alert.svg" }, "bookmark": { "$value": "./assets/images/icons/bookmark.svg" } } } } ``` ## Advantages 1. Doesn't restrict directory structure for token package authors. ## Challenges 1. Allows variations between token package file structure. ## Questions 1. Are absolute paths necessary? - Given the intended portability of the design tokens spec, I can't think of a scenario where I'd need to reference a machine-specific absolute path. 2. What if I want to publish assets using a CDN or other remote location? -- GitHub Notification of comment by CITguy Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/132#issuecomment-1143870146 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 1 June 2022 16:51:46 UTC