design-tokens / community-group

This is the official DTCG repository for the design tokens specification.
https://tr.designtokens.org
Other
1.56k stars 63 forks source link

Error in Font Weight example in spec? #219

Closed nateclicks closed 1 year ago

nateclicks commented 1 year ago

UPDATE: Nevermind, I see now that "350" is a valid value and the example is demonstrating two valid values not two invalid values. Having the text preceding the example discuss invalid values and having the first example (with a value of "350") not match one of the listed values threw me off.

--- Original text---

I'm happy to create a Pull Request to fix this, just wanna confirm it is an error before doing so.

In the font weight section there is an example that is intending to demonstrate invalid tokens. Example 19.

While the first token (using a value of 350) seems invalid, the second token matches an alias (extra-bold). To demonstrate an invalid aliased token, it should be updated to "Extra-Bold" or something like that.

Please let me know if I am misinterpreting or misunderstanding something in that example.

If it does need update, I'm happy to make that edit. Just let me know. Thanks.

{
  "font-weight-default": {
    "$value": 350,
    "$type": "fontWeight"
  },
  "font-weight-thick": { 
    "$value": "extra-bold", <---- I think this is a valid string
    "$type": "fontWeight"
  }
}

Screenshot of current Font weight section

screenshot of current Font weight section in draft spec