csstools / postcss-preset-env

Convert modern CSS into something browsers understand
https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
Creative Commons Zero v1.0 Universal
2.22k stars 90 forks source link

linear-gradient causes infinite loop #233

Closed mischnic closed 2 years ago

mischnic commented 2 years ago

Input code:

.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
}

.postcssrc.json

{
    "plugins": {
        "postcss-preset-env": true
    }
}

Running postcss input.css (using https://www.npmjs.com/package/postcss-cli) runs into an infinite loop and at some point the process crashes with OOM.

romainmenke commented 2 years ago

Thank you for reporting this.

Can you share the version of postcss-double-position-gradients from your lock file?

mischnic commented 2 years ago
postcss-double-position-gradients@^3.0.1:
  version "3.0.2"

I've pushed a complete reproduction to https://github.com/mischnic/parcel-issue-7441

romainmenke commented 2 years ago

We were able to replicate and fix the issue. Will be releasing this as soon as possible.

Antonio-Laguna commented 2 years ago

Thank you all again, this has been released as 3.0.3!