Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Part of the reason I like design tokens is that they are a middle ground between the chaos of utility classes[0] and impracticality of pure semantics, while being in a way better defined than either of them.

Want a token for a colour with negative semantics? Sure! A token for chartreuse-200? Be my guest! At least, chartreuse-200 on your page will be the same as chartreuse-200 on my page, so that the look is consistent and without distracting incidental variation in hue.

[0] When it comes to CSS—of course, design tokens reside on another layer of abstraction, not tied to any particular implementation.



Agree, you tap into the rigidness of a semantic color and type hierarchy, while allowing utility classes for specifics of a platform/environment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: