pdf.js/external/builder
Jonas Jenwald d1f13a6af3 Use the regular preprocess-function for the CSS files as well
An old shortcoming of the `preprocessCSS`-function is its complete lack of support for our "normal" defines, which makes it very difficult to have build-specific CSS rules. Recently we've started using specially crafted comments to remove CSS rules from the MOZCENTRAL build, but (ab)using the `preprocessCSS`-function in this way really doesn't feel great.
However, it turns out to be surprisingly simple to instead use the "regular" `preprocess`-function for the CSS files as well. The only special-handling that's still necessary is the helper-function for dealing with CSS-imports, but apart from that everything seems to just work.

One reason, as far as I can tell, for having a separate `preprocessCSS`-function was likely that we originally used *lots* of vendor-prefixed CSS rules in our CSS files. With improvements over the years, especially thanks to Autoprefixer and PostCSS, we've been able to remove *almost* all non-standard CSS rules and the need for special-casing the CSS parsing has mostly vanished.

*Please note:* As part of testing this patch I've diffed the output of `gulp generic`, `gulp mozcentral`, and `gulp chromium` against the `master`-branch to check that there was no obvious breakage.
2022-05-07 22:45:52 +02:00
..
fixtures Use the regular preprocess-function for the CSS files as well 2022-05-07 22:45:52 +02:00
fixtures_esprima Fix duplicated function name in the Esprima fixtures 2018-08-25 16:23:20 +02:00
builder.js Use the regular preprocess-function for the CSS files as well 2022-05-07 22:45:52 +02:00
preprocessor2.js Add support for modern ECMAScript class features 2021-10-22 22:01:17 +02:00
test-fixtures_esprima.js Replace *most* cases of var with let/const in the external/builder/ folder 2021-03-13 17:47:58 +01:00
test-fixtures.js Account for changes in eslint-plugin-import version 2.23.0 2021-05-16 11:50:55 +02:00