You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tokens have a variety of built-in states based on CSS pseudo selectors.
What if there was a "Token State" type for data variables?
These data variables would add a new option to each token's list of possible states.
(The asterisk * is added to separate custom states from built-in ones, but could be any other visual indication you want.)
When a Token State variable exists, its data-* attribute also exists.
When editing styles within this token state, the following CSS would be generated:
/* If this layer has data-enabled set to true... */.c1234567[data-enabled="true"]{/* ... */}
One question would be how we could use a parent layer's Token State variable to style a descendant. For example, the following CSS might be desirable in certain cases:
/* If any parent has data-enabled set to true... */
[data-enabled="true"] .c1234567 {
/* ... */
}
Motivation
This feature would allow my designer to set arbitrary, domain-specific, data-driven styles.
The text was updated successfully, but these errors were encountered:
Tokens have a variety of built-in states based on CSS pseudo selectors.
What if there was a "Token State" type for data variables?
These data variables would add a new option to each token's list of possible states.
(The asterisk
*
is added to separate custom states from built-in ones, but could be any other visual indication you want.)When a
Token State
variable exists, itsdata-*
attribute also exists.When editing styles within this token state, the following CSS would be generated:
One question would be how we could use a parent layer's
Token State
variable to style a descendant. For example, the following CSS might be desirable in certain cases:Motivation
This feature would allow my designer to set arbitrary, domain-specific, data-driven styles.
The text was updated successfully, but these errors were encountered: