Long url()s that appear in background-image properties can cause RTLCSS to stall out. It's not clear to me if this is an infinite loop or just an extremely long-running performance hole, but either way it takes too long to be practical. This has come up in real stylesheets that have several-megabyte SVGs embedded in them.
To reproduce:
$ npm i postcss-cli rtlcss
$ (printf 'div {background-image: url("'; printf 'abcdefghij%.0s' {1..100000}; printf '")}\n') > test.css
$ npx postcss-cli test.css -u rtlcss > out.css
Tested on postcss-cli 11.0.1 and rtlcss 4.3.0.
Long
url()s that appear inbackground-imageproperties can cause RTLCSS to stall out. It's not clear to me if this is an infinite loop or just an extremely long-running performance hole, but either way it takes too long to be practical. This has come up in real stylesheets that have several-megabyte SVGs embedded in them.To reproduce:
Tested on postcss-cli 11.0.1 and rtlcss 4.3.0.