Closed julien-deramond closed 1 year ago
Hi. Thanks for the issue with many details.
What do you think if we will not print warning if rule also contains print-color-adjust
? 9b670b4
Based on the use cases I'm aware of, that should do it yeah.
Released in 10.4.8
I've seen that other issues were filled out regarding
print-color-adjust
/color-adjust
but I haven't found an answer to this problem. Feel free to close it if you think this can be considered as duplicate.The next steps are done with the same environment:
Autoprefixer 10.4.7
Let's consider the following example:
Empty
browserslist
Nothing changes in the CSS file.
browserslist
from BootstrapAt Bootstrap, our
browserslist
is the following:In this case,
color-adjust
and-webkit-print-color-adjust
are added.browserslist
from Bootstrap without Firefox rulesIf we remove the Firefox rules from
browserslist
:Only
-webkit-print-color-adjust
is added.Autoprefixer 10.4.6 and 10.4.5
If I repeat the process with our complete
browserslist
and different recent versions of autoprefixer:-webkit-print-color-adjust
and-moz-print-color-adjust
are added-webkit-print-color-adjust
andcolor-adjust
are addedProblem
Based on those tests, we know that only 10.4.7 adds
color-adjust
depending on the versions of Firefox inbrowserslist
(color-adjust
seems to be added when Firefox > 97 rule is here).Now let's follow this use case:
test.css
that contains:Launch
npx postcss *.css --use autoprefixer
and copy the content in ourtest.css
that now contains:Re-launch
npx postcss *.css --use autoprefixer
A warning message appears
⚠ Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated. [autoprefixer]
.IDK if this is a bug or something in my usage that's not correct but it's a problem somehow that in one hand autoprefixer adds
color-adjust
based on the content ofbrowserslist
and on the other hand (when launched agains its own results) consider the result of its own modification as deprecated.