Closed kucrut closed 2 years ago
so i'm understanding correctly, you're saying var( --foo )
breaks because of the space in the var? or you're original pool of properties have spaces in them?
i added a test in a draft PR that i think outlines the use case you're inquiring about, can you verify that's testing the right thing? the test does fail, so hopefully it's aligned with this report.
you're saying
var( --foo )
breaks because of the space in the var?
That is correct, yes. I can also verify that the draft PR is addressing it. Thank you!
hmm, from my testing it appears to be postcss that doesnt like the spaces. my test doesnt even get the CSS variable passed to it when it has spaces.
the problem appears upstream from this plugin!.. aka, I can't get the test to pass because it the plugin isnt passed the variable that uses spaces.
open to insights/feedback here, but as of right now, i dont think jit props can resolve this?
@argyleink I took a stab at this and issued a PR: https://github.com/GoogleChromeLabs/postcss-jit-props/pull/6
released and fixed in 1.0.2 👍🏻 thanks for the help!
Hello!
I'm a fan of putting a space after the opening and before the closing function parens (for multiple reasons), and it seems like this plugin is not compatible with that type of coding style because it's using (too) specific sub-string to match when collecting the properties, ie
var(--
.Perhaps something like this would make it more forgiving?
Disclaimer: My regex-fu is questionable 😁