question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cant Export Spacing as Single Value

See original GitHub issue

We are using Tailwind. For things like spacing, we only need the following json schema to configure it for tailwind.

{
   "4": "4px",
   "8": "8px",
   "16": "16px"
}

and so on.

Right now, the spacing export exports with the assumption we need tokens for top, left, right, bottom. We end up with this after running style dictionary

{
  "4": {"top":4,"bottom":4,"left":4,"right":4},
  "8": {"top":8,"bottom":8,"left":8,"right":8},
  "12": {"top":12,"bottom":12,"left":12,"right":12},
  "16": {"top":16,"bottom":16,"left":16,"right":16},
  "24": {"top":24,"bottom":24,"left":24,"right":24},
  "32": {"top":32,"bottom":32,"left":32,"right":32},
  "40": {"top":40,"bottom":40,"left":40,"right":40},
  "48": {"top":48,"bottom":48,"left":48,"right":48},
  "64": {"top":54,"bottom":54,"left":54,"right":54},
  "96": {"top":96,"bottom":96,"left":96,"right":96}
}

Could there possibly be an option to export spacing with just the spacing value? so instead of…

"4": {
    "description": null,
    "type": "custom-spacing",
    "value": {
      "top": 4,
      "bottom": 4,
      "left": 4,
      "right": 4
    },
    "extensions": {
      "org.lukasoppermann.figmaDesignTokens": {
        "exportKey": "spacing"
      }
    }
  }

We’d be able to get…

"4": {
    "description": null,
    "type": "custom-spacing",
    "value": 4,
    "unit": "px",
    "extensions": {
      "org.lukasoppermann.figmaDesignTokens": {
        "exportKey": "spacing"
      }
    }
  },

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sir-captainmorgan21commented, Jun 30, 2022

@lukasoppermann sorry. Been swamped with standing up our design system, but gonna hopefully start on this soon

1reaction
lukasoppermanncommented, Apr 6, 2022

Hey, I merged the changes now. Android is done, so you can use that as an example.

I also added a transform:android script that runs the example.

We still need to add it for iOS and web and of course for your examples. And we need to adjust the documentation on this project and the transformers to tell people about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export data to a text file - Microsoft Support
This topic explains how to export text files by using the Export Wizard in Microsoft Access. What do you want to do? Understand...
Read more >
Export to CSV using SAVE TRANSLATE but empty values are ...
The exported csv file will be used as input for another system, and it cannot handle the , , empty values. I know...
Read more >
Guide to exports in Figma
In a bitmap image, each pixel or "bit" represents a single color. These bits are rendered on a" ... It's not possible to...
Read more >
File format options for PDF export - Adobe Support
To view the various formats to which you can export the PDF in Acrobat, see Tools > Export PDF.
Read more >
XML Backups and Space Export/Import Troubleshooting
XML Backups and Space Export/Import Troubleshooting ... Cannot Restore XML Backup due to Value too Large for Column. Page: Confluence Space ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found