Replies: 5 comments 6 replies
-
Great idea! Did this at my last company wherein we managed our tokens in a JSON file then had a build script that would generate CSS classes, CSS variables, and SASS variables and published that all to our internal NPM registry. As a building block, this allowed lots of teams to opt in across the organization and across tech stacks:
Anyway, just wanted to share some anecdotal experience on this topic. |
Beta Was this translation helpful? Give feedback.
-
These are all great points! Currently, only colors are available as JSON and that's used for internal development. You can view that here. This is something we'd like to offer in the future. Are there any tools that you found useful when converting tokens to JSON and then generating CSS/SASS? |
Beta Was this translation helpful? Give feedback.
-
I thought this article was useful in outlining why distinguishing between a Design System and Component Library is helpful: |
Beta Was this translation helpful? Give feedback.
-
Love the "New hotness" category. Surely someone has looked at building digital assets for XR in the .gov space and wondered how they would align. Makes sense to try to be technology agnostic. |
Beta Was this translation helpful? Give feedback.
-
This tool might be useful for this work: I've also previously posted here about Style Dictionary which has a similar function I believe: |
Beta Was this translation helpful? Give feedback.
-
USWDS currently has design tokens. Well sorta. USWDS is built to be as neutral and themable as possible, but the design tokens aren't actually included in the SASS files, from what I understand. They seem to more like key variables intended to be used to theme on top of the USWDS after the fact.
I think it would be worthwhile considering actually building out the design tokens in a more tech agnostic fashion, as the true root of the USWDS and not merely an optional utility.
When I say as a "true root" and tech agnostic I mean like this:
https://specifyapp.com/blog/introduction-to-design-tokens
I've been doing a lot of work trying to get USWDS as a standard adopted within my organization under USCIS, and I think that pulling out design tokens in a more abstracted and robust way would do a lot for making it easier for orgs to organize this stuff.
As it exists currently, the USWDS is a design system with a very specific implementation in a Component Library. And the devs pay attention to the Component Library and nothing else, confusing the two. Some companies have done very basic ports of the styles from that Component Library to React implementations etc, but all this is pretty hacky. With truly tech agnostic design tokens this would be much easier to handle and the foundation of design decisions -> design tokens -> implementation would be much cleaner.
Beta Was this translation helpful? Give feedback.
All reactions