gavinmcfarland / flex-gap-polyfill

A PostCSS plugin to emulate flex gap using margins
https://gavinmcfarland.github.io/flex-gap-polyfill/
Creative Commons Zero v1.0 Universal
143 stars 6 forks source link

postcss-values-parser can't parse IE filter values, so need some way to pass through ignoreUnknownWords option #90

Open jayandor opened 3 months ago

jayandor commented 3 months ago

If you write a CSS rule that looks like the following:

.thing {
  height: 100px;
  filter: alpha(opacity=80);
}

Or like this:

.thing {
  height: 100px;
  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
}

then postcss-values-parser gets caught on the values with the equal sign and fails. The obvious answer is just don't use these outdated values, but unfortunately I don't have an option as they're included in vital dependencies on my project.

I see that postcss-values-parser has an ignoreUnknownWords option for the parse() method, but I can't see any way in this module to pass it through. It would be great if either you could expose that option, or if you already know of some other way to get around the parsing issue.

gavinmcfarland commented 3 months ago

Good spot. Let me look at this weekend a d vet back to you.