Re: [community-group] [Discussion]: How to transform composite tokens (#226)

nit:
> Or indeed a typography token which, at least in CSS, would have to be exploded into individual values because there's no shorthand property that covers them all:

[There is](https://developer.mozilla.org/en-US/docs/Web/CSS/font), the `font` property is a shorthand for all of these: 

- font-family
- font-size
- font-stretch
- font-style
- font-variant
- font-weight
- line-height

My concern for the spec would be that any point some new property that requires composite tokens to appear, would require the definition of that composite to exist and then distributed across tools in varying amounts of support. It is fairly clear the reason why shadow has been given a special composite status is because it is not a shorthand in CSS, making many of the values required and therefore standardized. In the font example, while none of those values are required, I would say it is common for them to be used together. As an example defining a typographic style commonly expects a family and size together at least. In fact, the `font` shorthand _requires_ family and size at minimum, and additionally has a special ordering of values afterward.

I'd also be concerned about misunderstanding of use, where the shadow token is applied to the CSS [`filter: drop-shadow()`](https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/drop-shadow) function which _does not accept the spread value_ like the [`box-shadow`](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) version. In the Token Operations would _we_ (the author) define what the final value should be for the platform to use instead of the platform waiting for a specification decision and backlogged implementation. So we may provide the CSS filter version of the value and box-shadow version of the value as needed. In this way, the destinations are only reading primitive values with no black boxes or backlogs.

-- 
GitHub Notification of comment by ddamato
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/226#issuecomment-1822012210 using your GitHub account


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

Received on Wednesday, 22 November 2023 02:58:42 UTC