Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Syncing variables with Figma #16

Open
nekitk opened this issue May 5, 2021 · 3 comments
Open

Syncing variables with Figma #16

nekitk opened this issue May 5, 2021 · 3 comments

Comments

@nekitk
Copy link
Contributor

nekitk commented May 5, 2021

Another part of the project could be Figma page with color and size variables. We could either sync from config to Figma or read variables from Figma into config. Seems like it could be achived via Figma plugins.

References:

@nekitk nekitk changed the title Syncing with Figma Syncing variables with Figma May 5, 2021
@nekitk
Copy link
Contributor Author

nekitk commented May 12, 2021

Options if we want code to be the source of truth:

  1. Utilize Figma Tokens plugin
    Convert dsgen config to a JSON file compatible with Figma Tokens. We'll need to manually update this JSON in Figma or sync it via jsonbin.io integration.
  2. Selfmade plugin
    • We can make our own plugin similar to Tailwind and Theme UI ones. We'll accept dsgen config as json as an input and create color styles from it.
    • We may create type styles too but Figma's type styles include font, weight size, line height altogether so we'll need to create a style for each combination

@nekitk
Copy link
Contributor Author

nekitk commented May 14, 2021

Seems convenient to write dsgen config looking at design tokens page in Figma:
https://www.figma.com/file/VDUpuf2P6uHwUkEaFVTChsch/CSSSR.Tracker?node-id=2864%3A51194

Maybe we should consider design as the source of truth also.

@nekitk
Copy link
Contributor Author

nekitk commented Jun 18, 2021

It could be beneficial to not only import variables into Figma, but also autochange absolute values to variables (as we do with CSS). E.g. if text node has color #000 we can change it to use style Light/Text/Default

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant