Closed ludofischer closed 3 years ago
.travis.yml
should be updated.
I would like to add an integration test with other plugins on realistic CSS, to check that processing terminates without errors. But I am unsure what plugins and sample CSS to pick. Maybe autoprefixer?
I think this pull request should not be merged in this state, there's a chance of infinite loops apprearing. I've added a test that produces an infinite loop: adding a plugin that changes whitespace inside the calc()
property. I guess the 'right' solution would be to skip writing the value if we detect the parsed value AST are equivalent? Or just use Once()
:-)?
@ludofischer Let's use Once
@Semigradsky Can you help and do major release due https://github.com/cssnano/cssnano/pull/975#issuecomment-752523677?
I've noticed https://github.com/cssnano/cssnano/pull/954 assumes there's a version of this with the PostCSS 8 API, but I could not find it either a release, pull request or branch, so here it it.
I've used the visitor API thinking it should be safe from infinite loops, as once the
calc()
declarations are gone, thetransform()
function will exit immediately.