mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
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. |
||
---|---|---|
.. | ||
confusing-comment-expected.js | ||
confusing-comment.js | ||
elif-expected.js | ||
elif.js | ||
else-expected.js | ||
else.js | ||
error-expected.js | ||
error-false-expected.js | ||
error-false.js | ||
error.js | ||
expand-expected.html | ||
expand.html | ||
if-empty-expected.js | ||
if-empty.js | ||
if-false-elif-false-else-expected.js | ||
if-false-elif-false-else.js | ||
if-false-elif-true-else-expected.js | ||
if-false-elif-true-else.js | ||
if-false-else-expected.js | ||
if-false-else.js | ||
if-nested-expected.css | ||
if-nested-expected.js | ||
if-nested.css | ||
if-nested.js | ||
if-true-elif-false-else-expected.js | ||
if-true-elif-false-else.js | ||
if-true-else-expected.js | ||
if-true-else.js | ||
if-unclosed-expected.js | ||
if-unclosed.js | ||
include-expected.html | ||
include-non-existent-expected.html | ||
include-non-existent.html | ||
include.html | ||
js-comment-expected.js | ||
js-comment.js | ||
undefined-define-expected.js | ||
undefined-define.js | ||
unsupported-ifdef-expected.js | ||
unsupported-ifdef.js |