- From: Mattia Astorino via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 Jul 2023 07:34:55 +0000
- To: public-design-tokens-log@w3.org
Sticking to the first post/request and [the original issue](https://github.com/design-tokens/community-group/issues/187), we should ignore tools/figma/third-party implementations and requests since the spec must be agnostic and work for everyone. Now, as the author of the original issue, in my opinion, theming and aliasing are the same thing. What I mean, once you can create an alias, you can create as many themes as you want, the only difference is the token name. There is no need to add a "specific way" to do theming... and "modes" is really a misleading name and a concept that IMHO should not be bound to the token itself. **Design token should be simple, and hold a single raw value.** I'm posting here this really explanatory screenshot: ![](https://user-images.githubusercontent.com/10454741/203501971-c8cfdf60-834b-4064-b4bf-c55f46b7e87a.png) Following this important screenshot and the theming concept, we can achieve this with the current spec just with aliasing. `colors.tokens.json` ```json { "$name": "Color Tokens", "red": { "$type": "color", "$value": "#ff0000" }, "blue": { "$type": "color", "$value": "#0000ff" } } ``` `light-theme.json` ```json { "$name": "Color Tokens", "global": { "background: { "$type": "color", "$value": "{colors.red}" }, "foreground: { "$type": "color", "$value": "{colors.blue}" } }, } ``` `light-theme.json` is just a set of semantic-named tokens that is transformed by the author for required platforms (transformation is a required step but outside the spec). For the web, for example, it could just be: `light-theme.css` ``` :root { --global-background: #ff0000; --global-foreground: #0000ff; } ``` The only issue is interoperability and alias resolving here, no modes, no "theming" feature, or whatever. The fact of having "modes" bound to the token is only a technical requirement for the Figma team and should not be the focus of the spec. -- GitHub Notification of comment by equinusocio Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/210#issuecomment-1633721916 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 July 2023 07:34:57 UTC