-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Add support for interpolations #78
base: master
Are you sure you want to change the base?
Conversation
@TrySound @alexander-akait should I write more tests for this? |
Any chance of getting this merged? Can I help with something more? |
This parser only for CSS, supporting non standard CSS is out of scope, sorry |
Don’t see why this shouldn’t be considered as option? postcss-values-parser supports this as option, but this plugin is more widely used as value parser so other tools could benefit from this (e.g. linters as I mentioned in original post). Maybe you could consider adding support for custom parsers? |
/cc @TrySound |
I'm not against this if there is a real use case. |
I’ve referenced issue in Stylelint Sass plugin. I would think interpolations are something like extension of CSS functions, where they can contain every other CSS property which this plugin parses. They’re exactly like JavaScript template literals expression interpolations. By default, this plugin wouldn’t parse them, but if you introduce concept of interpolation prefix, they would get properly parsed and allow to handle much more cases in linters. Also, they’re not only available for Sass, Less also supports them. |
@TrySound @alexander-akait is there something else that needs to be done before this is merged and released? |
@TrySound @alexander-akait can I somehow help with this? |
@TrySound I see the changes have been approved by you. Is it possible to get this merged and published in new version? |
@TrySound any progress on this? It would be really helpful to have this merged since there are some tools which rely on this functionality. |
Hello there! I've been using this code for a small hack project of mine. I've found that Also the parser function signature type hasn't been updated with the new optional option object. Hope that you find this information helpful! |
@gdorsi yeah, you’re right, this should also be interpolation. Do you have implementation with fixed code? |
d05ee14
to
d6c3d91
Compare
Hello @niksy! I haven't fixed the issue by myself but with the latest changes that you made everything works fine. I've tested this code over a large codebase and I haven't encountered any other issues. Thanks! |
Initial support for interpolations. This will add support for parsing more stuff and allow better usage in Sass linters such as Stylelint with Sass plugin.