Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept array of shadow from Token Studio #252

Open
rlebascle opened this issue May 15, 2024 · 0 comments
Open

Accept array of shadow from Token Studio #252

rlebascle opened this issue May 15, 2024 · 0 comments

Comments

@rlebascle
Copy link

rlebascle commented May 15, 2024

The Token Studio parser/converter doesn't accept an array of shadows as a valid value.

{
  "layered-shadow": {
        "value": [
          {
            "x": "0px",
            "y": "62px",
            "blur": "37px",
            "spread": "0px",
            "color": "#42250505",
            "type": "dropShadow"
          },
          {
            "x": "0px",
            "y": "27px",
            "blur": "27px",
            "spread": "0px",
            "color": "#42250508",
            "type": "dropShadow"
          },
          {
            "x": "0px",
            "y": "7px",
            "blur": "15px",
            "spread": "0px",
            "color": "#4225050a",
            "type": "dropShadow"
          }
        ],
        "type": "boxShadow"
      },
     "$themes": [],
  "$metadata": {}
}

is giving me the following CSS

--layered-shadow: 0 0 0 0 #000000;

The issue seems to be around here
https://github.com/drwpow/cobalt-ui/blob/main/packages/core/src/parse/tokens-studio.ts#L323

Let me know if you want me to try to do a fix.

Anyway thanks for your awesome library !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant