-
Notifications
You must be signed in to change notification settings - Fork 0
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
Design Tokens - Color #20
Comments
Open QuestionsI've put a reasonable amount of thought into this over the past year or so and most of the above comes from my Obsidian document, but I think the "component level" is the least fleshed out part of this and deserves some extra thought, especially regarding hover states, etc. How many tokens do we build into the "component level" styles? At what point are we better served not handling that within a design system and instead within app code? These tokens are good for static stuff, but how should we handle interactive states like How much (if at all) should we rely on Because the theme level is getting swapped out based on accessibility settings, does it make sense to actually include the theme name in the token? Leaning on no actually! |
Discussion from chat with @emma-sg / Henry's opinion: Yeah, we should probably rely on These tools should probably have their own level of tokens (of just values) applied to get uniform hover state lightens and such? I also don't think it makes sense to put the theme name in the second level tokens, instead having groups of different themes with the same named tokens within. The entire group gets switched out with the theme. |
We have all the color primitives in! Next step is the next level up which we may want to be unified between the site and the app and we may not... More thinking required. |
Proposal
Required reading: Truly Semantic by Donnie D'Amato TL;DR:
purpose-priority-property
Color
A three-tiered system with primitives (scale), theme (semantic), and component (semantic) level tokens
color-red-050
,color-blue-600
,color-green-900
(implemented in https://github.com/webrecorder/hickory/blob/main/tokens/color.json)dark-primary-fill
,light-danger-border
,tritanopia-success-fill
purpose
slot in the name defines the themepriority
slot already aligns well with how we define our variables in Browsertrix withdanger
,primary
,warning
, etc!button-primary-fill
,input-error-border
,switch-disabled-fill
The text was updated successfully, but these errors were encountered: