-
Notifications
You must be signed in to change notification settings - Fork 30
Retain whitespace before color(). Fix for #26. #27
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
Conversation
Merged in the branch that used postcss-value-parser. Minor Issue: We call .toString() even if no actual color functions were found. This would only occur if there was a "color(" in the value that was not actually a color function, such as "hover-color(". |
@@ -17,7 +17,7 @@ module.exports = postcss.plugin("postcss-color-function", function() { | |||
} | |||
|
|||
decl.value = helpers.try(function transformColorValue() { |
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.
This try block and helper seems irrelevant now.
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.
color may throw an error.
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.
It would be cool to catch and warn separately.
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.
But in the next pr I think.
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.
There is a test for throwing a readable error that passes. I assume it passes because colorFn.convert() is the one that throws the error.
There had been a throw error on a mismatched bracket, but that seems irrelevant with postcss-value-parser.
Are you good to merge then? Version number needs a bump. |
@studiosciences can you squash your commit (especially the lasts)? |
@MoOx I haven't squashed before, but I'll see what I can do. I'll leave any version changing to you. |
Replaced balanced-match with post-css-value-parser
Squashing complete. It appears as one commit in my branch, but the Pull Request lists six. Not sure how to fix that or if anything needs to be fixed. |
There is one commit, just refresh the page :D |
Weird. I saw the squashed commit as an additional commit. Looks right now. |
When you push a commit, github update your open PR, but if you force push, do not remove previous commit until your reload. Pretty buggy UX. |
Will merge and release tomorrow, I have to go :) |
Anything more I could do to wrap this up? |
Oh sorry, I forgot. Let me handle this this evening. |
Retain whitespace before color(). Fix for #26.
Released as 2.0.1, thanks! |
Replace balance-matched with postcss-value-parser to fix issue whitespace removal issue #26.