Fixing the color-adjust shorthand is currently deprecated warning in Autoprefixer

Front End Development

As much as I love front-end development, the ecosystem can sometimes inflict unnecessary pain. Given the front-end ecosystem relies on very few packages for a lot of modern development, when something changes and packages that rely on those don’t update: it’s a disaster.

One such issue is Autoprefixer.

You most likely arrived here searching Google for the error message: autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

I have encountered this issue twice in the last few months. The first was Bootstrap (the issue has since been fixed in Bootstrap 5.2). And the most recent is MDB UI Kit which is material design for Bootstrap.

Many of the solutions you will find to this problem will tell you to downgrade the Autoprefixer package to version 10.4.5. Either saving the exact version or adding a resolution entry into your package.json. This is because the change was introduced in version 10.4.6 of Autoprefixer.

The issue itself is rather trivial. It’s a deprecated CSS shorthand property being used.

I didn’t want to downgrade Autoprefixer.

In my situation, I fixed the issue by forking the MDB UI Kit repository and submitting a pull request. If you’re a developer and you run into these kinds of issues, a PR to fix them would be welcomed by any active repository.

You can downgrade your package, but the best fix is to make the change to the package yourself in a fork on GitHub. While you wait for the maintainer to merge and release, you can tell Npm or Yarn to use your fork as the source to get around the warning.

I tried TailwindCSS for the first time

After avoiding Tailwind for such a long time, I finally decided to sit down and see what the hype was all about and use it with Aurelia 2. There are …

Unpkgd Is Down (Again)

After an outage seven days ago, unpkgd.com, a widely used CDN for NPM packages, is again down. This time, the outage is more severe. At the time of …

Crafting Recursive Prompts with Plop

When scaffolding new projects or features, repetitive tasks like file creation and boilerplate code can waste valuable time. That’s where Plop …