-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Partial PR of blendmode value #193
Conversation
Hey, thank you. Before going into details, are all the blend modes supported in css or is there need for conversion? |
Pull Request Test Coverage Report for Build 2583296171
💛 - Coveralls |
These are all the supported ones in web
|
At this point im just trying to get it to appear in the output 😅 |
@lukasoppermann spent some time getting this working, its now correctly outputting fill blend modes. |
Hey @mattpilott sorry for the long wait. It would be great if you could add some tests, to cover this new addition. |
Yes, it correctly outputs the blending mode in the json |
Awesome, can you please add some test? I will check it again and once this is all done merge it. 🙏 |
@@ -136,7 +136,8 @@ const typographyValueTransformer = ({ name, values }) => ({ | |||
|
|||
const colorValueTransformer = ({ fill }): StandardTokenDataInterface => ({ | |||
type: 'color' as StandardTokenTypes, | |||
value: rgbaObjectToHex8(fill.value) | |||
value: rgbaObjectToHex8(fill.value), | |||
blendMode: fill.blendMode.toLowerCase() |
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.
Here we need to replace line 140 with this:
blendMode: fill.blendMode?.toLowerCase() || 'normal'
Otherwise we get errors when no blendmode is set which is especially happening in gradients I think.
src/extractor/extractColors.ts
Outdated
@@ -59,7 +60,8 @@ const extractFills = (paint): fillValuesType | gradientValuesType => { | |||
return { | |||
fill: { | |||
value: convertPaintToRgba(paint), | |||
type: 'color' as PropertyType | |||
type: 'color' as PropertyType, | |||
blendMode: paint.blendMode.toLowerCase() |
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.
Sorry, I missed this. Same needs to be done here paint.blendMode?.toLowerCase() || 'normal'
Hey, I missed one, added a comment. You should be able to see the issues when you run Thank you. |
Hey @mattpilott I hope it works out. I just noticed, please remove the updates to the dist folder from the PR as well. Thank you. |
I've made a start on a PR, added the key and types but unsure what else i need to do to see the key in the JSON. I have had a hunt around but currently stuck so thought i'd submit what i have so far