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
1166 introduce color modifiers #1498
Conversation
Commit SHA:6efbd1bd9bedb3600341f659afc40c08ca2a5459 Test coverage results 🧪
|
Commit SHA:0919394a797a67aa3fcd9ac29347fb2b41745cb9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more things i encountered:
- we're currently saving the
value
field as astring
in JSON. can we save it as anumber
instead? - can you add something to the tooltip of color tokens that use a modifier? just beneath the value:
lighten(0.5) / LCH
so{operation}({value}) / {space})
or for mix:mix(#ffffff, 0.5) / LCH
.
src/utils/is/isSingleColorToken.ts
Outdated
import { TokenTypes } from '@/constants/TokenTypes'; | ||
import { SingleColorToken, SingleToken } from '@/types/tokens'; | ||
|
||
export function isSingleColorToken(token: SingleToken | any): token is SingleColorToken { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call this isColorToken instead. Color tokens can only be single.
@swordEdge One last thing: Can you make sure users can enter both |
I found one more edge case: If a user already had something else in their To reproduce:
I'd expect that same $extensions property to still be there. We do not want to delete that for the user, we just want to append. CleanShot.2023-01-10.at.23.42.46.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Co-authored-by: Jan Six <six7@github.com> Co-authored-by: Jan Six <six.jan@gmail.com> Co-authored-by: SorsOps <80043879+SorsOps@users.noreply.github.com>
No description provided.