figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Documentation Tokens: Support for CSS/SCSS/JS...

Open derekluciani opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. The current documentation tokens only support:

  • Name
  • Raw Value
  • Value
  • Description

Describe the solution you'd like I'd be nice if documentation could generate names specific to a codebase:

  • CSS variable
  • SCSS variable
  • JS variable

Additional context Our design team uses SCSS variables and it'd be nice to document our tokens in Figma in this format.

derekluciani avatar Nov 03 '21 12:11 derekluciani

So for a token named colors.bg.default we'd expose var(--colors-bg-default), right? I like that! Makes me wonder if we'd be able to do that dynamically so it could be a primitive that you'd be able to format/transform on your own

six7 avatar Nov 03 '21 20:11 six7

Isn't this what tools like style-dictionary are for? I guess you need to run the Figma Tokens output through the transformer first, but adding these types of things as first class features of the plugin feels nice, too.

dmackerman avatar Feb 05 '22 02:02 dmackerman

Update on this: We initially wanted to tackle it in the next iteration, but I'm removing it again as I couldn't come up with a good enough solution. If someone has one that doesn't clutter the UI I'd appreciate it.

six7 avatar Sep 15 '22 20:09 six7

@six7 suggest to close b/c it's stale and we can reimagine when we focus on documentation in a future epic.

SamIam4Hyma avatar Mar 21 '24 19:03 SamIam4Hyma