[community-group] Progressive Token Variant Specificity (#135)

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

== Progressive Token Variant Specificity ==
In build systems like Flutter (likely Android, as well), convention for variants is to add specificity when a variant differs from the default.  If `foo` is the default, `foo-dark` is its `dark` variant.

I'm finding it difficult to adhere to this naming convention, given the current specifications.

To illustrate, consider the following example:

## Desired Tokens
Say you need to define the following SCSS vars from your design tokens:

1. `$color-background`
2. `$color-background-highContrast` (high-contrast variant of `$background`)
3. `$color-background-dark` (dark variant of `$background`)
4. `$color-background-dark-highContrast` (high-contrast variant of `$background-dark`)

## Problem
Unless I'm misinterpreting the spec, there is no way to define the desired tokens.

It would require a JSON property to be a group name, token name, _or_ both.

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


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

Received on Monday, 6 June 2022 22:18:22 UTC