Skip to content

Properly calculating the variables computed value for dist folder#1423

Merged
jonrohan merged 2 commits intomainfrom
variables_updates
May 26, 2021
Merged

Properly calculating the variables computed value for dist folder#1423
jonrohan merged 2 commits intomainfrom
variables_updates

Conversation

@jonrohan
Copy link
Member

@jonrohan jonrohan commented May 25, 2021

This update fixes an issue with our /dist/variables.json file. We weren't properly computing the values, which creates a bug in our stylelint.

Example output from canary release

Before

"$spacer-1": {
  "values": [
    "round($spacer / 2)",
    "round(8px / 2)"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 36
  },
  "computed": "round(8px / 2)"
},
"$spacer-2": {
  "values": [
    "$spacer",
    "8px"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 37
  },
  "computed": "8px"
},
"$spacer-3": {
  "values": [
    "$spacer * 2",
    "8px * 2"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 38
  },
  "computed": "8px * 2"
}

After

"$spacer-1": {
  "values": [
    "round($spacer / 2)",
    "round(8px / 2)"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 36
  },
  "computed": "4px"
},
"$spacer-2": {
  "values": [
    "$spacer",
    "8px"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 37
  },
  "computed": "8px"
},
"$spacer-3": {
  "values": [
    "$spacer * 2",
    "8px * 2"
  ],
  "source": {
    "path": "src/support/variables/layout.scss",
    "line": 38
  },
  "computed": "16px"
}

@changeset-bot
Copy link

changeset-bot bot commented May 25, 2021

🦋 Changeset detected

Latest commit: 6f79bfa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jonrohan jonrohan enabled auto-merge May 25, 2021 21:44
@jonrohan jonrohan disabled auto-merge May 26, 2021 03:12
@jonrohan jonrohan merged commit efbd3a6 into main May 26, 2021
@jonrohan jonrohan deleted the variables_updates branch May 26, 2021 03:12
@primer-css primer-css mentioned this pull request May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant