question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Release 5.2.0 does not have color-adjust deprecation fix

See original GitHub issue

Prerequisites

Describe the issue

As you can see, a PR was merged which removes the color-adjust property inside of the _form-check.scss file for the rule .form-check-input here.

However, I import the compiled CSS files in my projects because I am using Autoprefixer and PostCSS. I import CSS like this:

import 'bootstrap/dist/css/bootstrap.css';

As you can see in the compiled CSS file, color-adjust is still there: https://github.com/twbs/bootstrap/blob/main/dist/css/bootstrap.css#L2274

Furthermore, looking in the SCSS directory inside of my node_modules directory is showing that the color-adjust property has been removed from the scss file also. But, it’s in the compiled CSS file.

So, either something has gone astray during the build process, or a tool is adding color-adjust. As a result, in my application that uses Autoprefixer 10.4.7, I am getting the warning: autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated. which is tripping up my continuous integration builds as warnings are considered errors in production release environments.

I looked through the releases for 5.2 beta and 5.2 and could see no fixes for this issue mentioned in the notes.

Reduced test cases

Numerous cases have already been outlined in previously closed issues:

What operating system(s) are you seeing the problem on?

Windows, macOS, Linux

What browser(s) are you seeing the problem on?

No response

What version of Bootstrap are you using?

5.2.0

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
julien-deramondcommented, Jul 29, 2022

Good news, it’s been fixed in autoprefixer 10.4.8. Dependency version will be updated in Bootstrap. In your projects, you probably can force it to use the 10.4.8 so that the warning message disappears while waiting for our next release.

1reaction
julien-deramondcommented, Jul 23, 2022

Some extra-information about this issue. With Autoprefixer 10.4.7, there are some cases where color-adjust: exact; is added.

It can be tested directly in https://autoprefixer.github.io/.

As an example:

.example {
    print-color-adjust: exact;
}
  • With the basic rule proposed by the website for browserlist, color-adjust: exact is not added.
  • With the content of our .browserlistrc (last 2 major versions, not dead, Chrome >= 60, Firefox >= 60, Firefox ESR, iOS >= 12, Safari >= 12, not Explorer <= 11), color-adjust: exact is added.
  • If we remove the rules regarding Firefox from our .browserlistrc (last 2 major versions, not dead, Chrome >= 60, iOS >= 12, Safari >= 12, not Explorer <= 11), color-adjust: exact is not added.

If we change autoprefixer version in our package.json without changing our .browserlistrc:

  • 10.4.5: nothing is added
  • 10.4.6: -webkit-print-color-adjust: exact; and -moz-print-color-adjust: exact; are added
  • 10.4.7: -webkit-print-color-adjust: exact; and color-adjust: exact; are added

We can see a warning message in our proper build when we run css-rtl. It makes run a second time PostCSS + Autoprefixer. That must be the same issue if a user run PostCSS + Autoprefixer on something based on the CSS file we deliver and that contains color-adjust: exact;.

I still doesn’t understand why in one hand color-adjust: exact is added to support Firefox < 97 and on the other hand, a file already containing a color-adjust: exact to support Firefox < 97 generates a warning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react bootstrap - ReactJs - Compiled with warning
As I'm typing this, the latest bootstrap 5.2.0 version is ... The root cause here is that bootstrap generates CSS with deprecated tags....
Read more >
utoprefixer: replace color-adjust to print-color-adjust. the color ...
This issue is because of Autoprefixer v10.4.6 + color-adjust deprecation and it's replaced with print-color-adjust. It's currently fixed by Bootstrap ...
Read more >
Warning (6:28344) autoprefixer: Replace color-adjust to print ...
The color-adjust shorthand is currently deprecated. ... I got a solution by using 5.2.0-beta1 version of bootstrap and importing scss files ...
Read more >
Bootstrap v4.6.2
6.2, one of our last releases for the v4. It's a bit of a maintenance patch featuring bug fixes, dependency updates, and some...
Read more >
bootstrap - NPM Package Versions - Socket - Socket.dev
Version : 5.1.3 was published by xhmikosr. ... color CSS variable for buttons to fix a visual regression .btn-link no longer has a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found