Re: [community-group] grid type (#222)

My initial thought when seeing new token type proposals is to ask: can this be solved with groups? eg, without using a new token type, you might have this:

```json
{
  "grid": {
    "columns": {
      "count": {
        "$type": "number",
        "$value": 12
      },
      "gap": {
        "$type": "dimension",
        "$value": "10px"
      },
      "width": {
        "$type": "dimension",
        "$value": "100px"
      },
      "margin": {
        "$type": "dimension",
        "$value": "20px"
      }
    }
  }
}
```

I think this still captures the spirit of the design decision; you could even add more context in $description props. If there's value in having the translator "know" that these values should be used to calculate, say, css grid syntax, perhaps that's just a configuration of the translator rather than explicit in the token itself. Eg:

```js
generateCssGridSyntax({
  columnCount: tokens.grid.columns.count,
  columnWidth: tokens.grid.columns.width
}); 
// outputs something like
//  grid-template-columns: repeat(12, 100px);
```

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


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

Received on Wednesday, 3 January 2024 16:18:18 UTC