chanzuckerberg / sci-components

2021 Science Design System Component Library
https://chanzuckerberg.github.io/sci-components/
MIT License
25 stars 7 forks source link

Add design token functions #544

Open tihuan opened 1 year ago

tihuan commented 1 year ago

Design token functions are much easier to use!

Example:

  1. The theme.ts file change
  2. Subsequent whole app refactor https://github.com/chanzuckerberg/single-cell-data-portal/pull/5329

Requirements:

  1. Create token functions for all theme tokens
  2. Create documentation around usage and examples. NOTE: there are commonly 3 ways to use the token functions:
    1. The most common one. Just use it as is E.g., color: ${textPrimary};
    2. Using it inside a function
    3. Using it to export a css function
tihuan commented 1 year ago

@cathystoli this is the token function ticket I was talking about the other day 😄 Thank you!!