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

Last component of variable names are always exported in lowercased #310

Open
mobrien-ghost opened this issue Jul 17, 2024 · 1 comment
Open

Comments

@mobrien-ghost
Copy link

Context:

We have variables for spacing and colors etc where the last component/portion of the variable name is camelCased.

For example

  • spacing/extraExtraSmall
  • spacing/extraSmall
  • colour/alert/mentalHealth
  • et

Issue:

when exported, the keys are all lower cased:

    "tokens-spacing": {
      "spacing": {
        "extraextrasmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.4}"
        },
        "extrasmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.8}"
        },
        ...
    "tokens-colour": {
      "dark": {
        "alert": {
          "safety": {
          "mentalhealth": {
              "type": "color",
                "value": "{primitives.dark.colours.yellow.01}"
          }

Expected:

was expecting them to be:

    "tokens-spacing": {
      "spacing": {
        "extraExtraSmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.4}"
        },
        "extraSmall": {
          "type": "dimension",
          "value": "{primitives.mode 1.digits.8}"
        },
        ...
    "tokens-colour": {
      "dark": {
        "alert": {
          "safety": {
          "mentalHealth": {
              "type": "color",
                "value": "{primitives.dark.colours.yellow.01}"
          }
@0m4r
Copy link
Collaborator

0m4r commented Oct 4, 2024

@mobrien-ghost isn't this something you can configure?
Have a look here: https://github.com/lukasoppermann/design-tokens?tab=readme-ov-file#name-conversion

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

2 participants