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

Color Formatting #183

Open
kristiandavid opened this issue Feb 1, 2023 · 1 comment
Open

Color Formatting #183

kristiandavid opened this issue Feb 1, 2023 · 1 comment

Comments

@kristiandavid
Copy link

I noticed that when I try using to-scss-variables or to-css-custom-properties the color formatting isn't working for border types. Works fine for color token types however.

For example, the following:

{
      "name": "Design Tokens / Borders - CSS",
      "path": "./output/styles/borders.css",
      "filter": {
        "types": [
          "border"
        ]
      },
      "parsers": [
        {
          "name": "sort-by",
          "options": {
            "keys": [
              "name"
            ]
          }
        },
        {
          "name": "to-css-custom-properties",
          "options": {
            "formatName": "kebabCase",
            "formatTokens": {
              "color": "hex"
            }
          }
        }
      ]
    }

outputs as:

--border-grey-100: 1px solid rgba(242, 242, 242, 1);

I'd prefer it to output a hex color value, is that doable?

@AMoreaux
Copy link
Member

AMoreaux commented Feb 2, 2023

Hi @kristiandavid, good suggestion 👍
Feel free to open a PR. Otherwise, we will do it when we will have the bandwidth.

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

No branches or pull requests

2 participants