Closed yisibl closed 2 years ago
Imo that doesn't feel like something that's the job of autoprefixer. Trying to second guess the behaviour developers want sounds like the job of a specific postcss plugin rather than this tool.
Edit this was based on the assumption you meant changing between long and short hands apologies if I've misunderstood.
I think @yisibl asks to add -webkit-print-color-adjust
for print-color-adjust
. Am I right?
I think @yisibl asks to add
-webkit-print-color-adjust
forprint-color-adjust
.
Yes!
print-color-adjust
was added to caniuse-lite
https://github.com/browserslist/caniuse-lite/commit/7228ee1cc76fb0f6c82c303dd781a4e80bb407b8
Now we need to wait caniuse-db
to trigger new release of caniuse-lite
. Then we will be able to use it in Autoprefixer.
Fixed 51b991c
print-color-adjust
now generates -webkit-print-color-adjust
color-adjust
works too, but generates a warningThe fix was released in 10.4.6
@ai This update causes autoprefixer to generate -moz-print-color-adjust
for old versions of FF — however this property does not exist. It should instead output color-adjust
for old versions of FF which didn't add support for print-color-adjust until FF 97 which was released in early February this year.
I verified that -moz-print-color-adjust
is indeed not a valid property name in newer and older versions of FF:
Adding color-adjust
could later trigger Autoprefixer to print a warning? Can we ignore Firefox property?
FF ESR needs color-adjust
, we need to support it.
Fixed 8fe5b66
FF fix was released in 10.4.7
Why is the warning there for color-adjust
to force print-color-adjust
? Most implementations I've seen are still using color-adjust
so many projects are now getting messages about being deprecated. But because its an external dependency, you don't really want to fix that yourself. But it does show up in a lot of pipelines.
For example, my Angular project now shows me 5 messages about this property in 2 different dependencies. And since I can't override autoprefixer settings, there is now a big pile of text in my browser console before I get to my own project.
I get that you want people to use the new property, but I don't think its time to already show deprecation messages on the color-adjust
since that will remain working for a while.
Why is the warning there for color-adjust to force print-color-adjust?
Because color-adjust
was deprecated.
For example, my Angular project now shows me 5 messages about this property in 2 different dependencies
Open PR in these projects.
And since I can't override autoprefixer settings
You can write custom PostCSS plugin to remove unnecessary warnings from result.warning
. But I suggest spending this type on fixing the problem in dependencies.
I get that you want people to use the new property, but I don't think its time to already show deprecation messages on the color-adjust since that will remain working for a while.
It is not the first warning in Autoprefixer about deprecated syntax. https://github.com/postcss/autoprefixer/blob/main/lib/processor.js#L115-L326=
Spec: https://www.w3.org/TR/css-color-adjust-1/#print-color-adjust Caniuse: https://caniuse.com/mdn-css_properties_print-color-adjust