Files
test-repo/tests/css/url/url.css
T
Christopher Chedeau eec3e82f48 Fix absolute path in custom CSS url() calls (#9966)
At Facebook we have some custom pre-processor `-fb-url(/abs/path/)` that gets messed up as `-fb-url(/ abs/path)`  with the current version of prettier.

The parser has hardcoded logic to only parse as path things that use `url()` but not `-fb-url()` and it parses it as `division /` and `abs/path/`. Because we put a space after division, the bug is introduced.

I don't really know the impact of changing the parser, but on the printer side, it is straightforward to not add a space after `/` if it's the first element in a group. I can't think of any reason why you could write `(/ something` in CSS so I think it's a safe change.
2020-12-28 20:22:25 -03:00

5 lines
82 B
CSS

div {
background: url(/images/bg.png);
background: -fb-url(/images/bg.png);
}