• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

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

Front End Development · July 21, 2022

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.

Dwayne

Leave a Reply Cancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular

  • I Joined Truth Social Using a VPN and Editing Some HTML to Bypass the Phone Verification
  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Thoughts on the Flipper Zero
  • Waiting for an Element to Exist With JavaScript
  • How To Paginate An Array In Javascript
  • How To Mock uuid In Jest
  • How To Decompile And Compile Android APK's On A Mac Using Apktool
  • How To Get Last 4 Digits of A Credit Card Number in Javascript
  • Wild Natural Deodorant Review

Recent Comments

  • CJ on Microsoft Modern Wireless Headset Review
  • Dwayne on Microsoft Modern Wireless Headset Review
  • CJ on Microsoft Modern Wireless Headset Review
  • john on Microsoft Modern Wireless Headset Review
  • Dwayne on Why You Should Be Using globalThis Instead of Window In Your Javascript Code

Copyright © 2023 · Dwayne Charrington · Log in

wpDiscuz