Skip to content

Color Formatting #183

Description

@kristiandavid

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions