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

Schemas: Standardize Token Names #370

Open
simeonoff opened this issue Dec 21, 2024 · 0 comments
Open

Schemas: Standardize Token Names #370

simeonoff opened this issue Dec 21, 2024 · 0 comments

Comments

@simeonoff
Copy link
Contributor

Currently, the names of the design tokens in the schema files for each component are randomly selected. One component can have a token like 'foreground' for describing the base or primary text color in a
component, while the next can have 'text-color' for the same purpose.

In an effort to have a more semantic meaning behind token names, we should create and follow a system for naming tokens in component schemas.

This effort will require a lot of work, migrations and refactoring that will trickle down in every product consuming the design tokens for each component. However, I believe it's worth it.

Proposal:

Come up with a naming convention and refactor all schema tokens to follow that convention.

Example:

$light-button: (
  color: (
    background: (
      base: (
        value: (
          color: (secondary, 500)
        ),
      ),
      hover: (
        value: (
          color: (secondary, 300)
        ),
      )
    ),
  )
);
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