- From: Drew Powers via GitHub <sysbot+gh@w3.org>
- Date: Fri, 07 Feb 2025 21:33:16 +0000
- To: public-design-tokens-log@w3.org
> But, do we intend to allow "partial aliasing" within the array value 👇 ?
>
> ```json
> "layeredShadow": {
> "$type": "shadow",
> "$value": [
> "{simpleShadow}",
> {
> "color": "#CCCCCC",
> "offsetX": "2px",
> "offsetY": "2px",
> "blur": "6px",
> "spread": "6px"
> }
> ]
> }
> ```
That’s a great question! Agree this does need to be clarified in the spec. Because this example is valid syntax as far as I know; `{simpleShadow}` resolves to a complete, correct token type thus this should work.
But we do need to be explicit about the boundaries of this, e.g.:
```jsonc
"$value": [
"{layeredShadow}",
{
// …
```
If aliasing an array, do the arrays [flatten](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat) together?
Further, does the `gradient` type allow aliasing like this, since that also has array values?
This is worth clarifying; I’ll add it to the TODO items for gradients.
--
GitHub Notification of comment by drwpow
Please view or discuss this issue at https://github.com/design-tokens/community-group/issues/250#issuecomment-2644169032 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 7 February 2025 21:33:17 UTC