- From: Connor Smith via GitHub <sysbot+gh@w3.org>
- Date: Thu, 23 Mar 2023 14:31:20 +0000
- To: public-design-tokens-log@w3.org
> Today for theming we just add a new theme file with the tokens defined in the theme file overriding said tokens in the base file. This allows product teams to create custom themes without messing with the core token file. With the modes proposal, I do not see a mechanism for defining a mode outside the main token definitions, or would it work the same way? Define the same tokens a second time with just the additional mode value? Depends on the heuristic we'd want to use for what constitutes an "extension" of the base theme (either via some sort of `$extends`, or just via name matching), but I'd think that defining more modes would be something like this File 1 ```json { "$name": "Figma UI Colors", "$modes": { "light": {}, "dark": {}, "increased-contrast": {} "decreased-contrast": {} }, // tokens ... } ``` File 2 ```json { "$name": "Figma UI Colors Extended", "$extends": "Figma UI Colors", // Alternatively tools just batch accept files and try to combine them blindly "$modes": { "extra-dark-mode": {"$fallback": "dark-mode"} }, // tokens (can overwrite values for light and dark mode, as well as define new values for the added extra-dark-mode) } ``` -- GitHub Notification of comment by connorjsmith Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/210#issuecomment-1481303649 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 23 March 2023 14:31:22 UTC