WebUI: Replace html-minifier with postcss+plugin for CSS minification.
1) Remove html-minifier from third_party/node/package.json.
2) Replace with postcss (main tool) and postcss-minify (postcss plugin)
3) Update html_to_wrapper() and css_to_wrapper() GN rules to invoke
the new tool.
4) Fix a few newly surfaced CSS syntax errors that were previously
uncaught, and now surface as build errors.
5) Update tests to include cases where CSS nesting and container
queries are used, as well as $i18n{} placeholders to ensure the
new minifier handles them correctly, unlike the previous one.
With #1 and #2 above node_modules.tar.gz slightly decreases from 9.3MB
to 9.1MB.
The new minifier unblocks using newer CSS features, previously blocked
on html-minifier not parsing them correctly, or forcing client code to
use "clean-css ignore" special comments to work around html-minifier.
Bug: 40943411
Change-Id: I32357c18d94ebe6fe1be0c84a7f21d5e92dff5ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6594216
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1468997}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.