drwpow / cobalt-ui

Use W3C Design Token Community Group tokens in CI and code

Home Page:https://cobalt-ui.pages.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modes can't begin with numbers

snicol21 opened this issue · comments

I created a "fontSize" dimension with a variety of modes, but I was surprised to find out that mode names can't be prefixed with numbers

Screenshot 2023-08-28 at 5 15 08 PM

Is this expected? Or is this a bug?

Oh no that’s just JavaScript: you have to surround the keys with quotes. Identifiers can’t start with a number character (but they can have a number character elsewhere in the identifier).

But let me know if when generating code if there’s an error.

Oh I see this is a bug with generation. Will post a fix to this (sorry didn’t mean to close)

Fixed! Published new versions of everything. But bumping @cobalt-ui/plugin-js specifically should fix your issue