Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design tokens as Sass variables and JS/JSON #6

Open
Tracked by #7
eliot-akira opened this issue Sep 23, 2024 · 0 comments
Open
Tracked by #7

Design tokens as Sass variables and JS/JSON #6

eliot-akira opened this issue Sep 23, 2024 · 0 comments

Comments

@eliot-akira
Copy link
Contributor

eliot-akira commented Sep 23, 2024

Ideally, there should be a single source of truth that generates the Sass variables used in the library.

For live documentation (and in the future an admin UI), the design tokens need to be in JS/JSON format.

Consider Style Dictionary.

A Style Dictionary is a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation

There's a W3C working group that's standardizing the JSON format for design tokens.

The Design Tokens Community Group includes companies like Adobe and Figma, as well as Amazon where Style Dictionary was created.


Another consideration is if/how to integrate with WordPress block builder's theme.json.

It seems to be loosely based on the design token "standard", but quite limited in scope so far.

@eliot-akira eliot-akira changed the title Define design tokens as Sass variables and JS/JSON Design tokens as Sass variables and JS/JSON Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant