Trying to keep the UX design tokens type checked to ensure the each token in theme variation is overridden and uses proper value types. JSON version or figma does not allow to keep such checks. In C++ or Java you can define the interface and initialize the abstract fields in implementation. TypeScript has a bit similar approach of interface and object of its type.
TS and Java are given an API to access those programmatically and generate as token JSON as HTML docs for those. TS is part of UI devs stack ...On another hand, modern CSS allows to create the tokens hierarchy as nested classes. And DX is definitely more UI devx friendly. The integrity can be checked as by IDE as by utilities along with other checks like ADA colors compliance.
Design Tokens Figma plugin has a great DX and UI with remote JSON integration but does not have an integrity checks.
For with much wisdom comes much sorrow...
#DesignToken #WebDesign #WebDev
No comments:
Post a Comment