Skip to content

is there way to convert measurement to rem? #194

Answered by ChucKN0risK
toy-crane asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @toy-crane 👋

Thanks for your patience.

Yes you can convert your text styles and your measurement tokens in rem with the px-to-rem parser.

Your config currently asks Specify to generate both your text styles and your measurement tokens in a textStyles.json file.

However, the px-to-rem parser can only convert one token type at a time.

Here's your updated configuration:

{
  "repository": "@onthelook/design-system",
  "head": "specify",
  "base": "main",
  "rules": [
    {
      "name": "Design Tokens / Text Styles",
      "path": "textStyles.json",
      "filter": {
        "types": [
          "textStyle"
        ]
      },
      "parsers": [
        {
          "name": "px-to-rem",
    …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ChucKN0risK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants