Skip to content

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

@mobrien-ghost

Description

@mobrien-ghost

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}"
          }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions