Skip to content

v3.5.0

Compare
Choose a tag to compare
@bhough bhough released this 20 Mar 10:33

Introducing polished.js v3.5.0!

We're super stoked to announce that polished.js v3.5.0 is officially out! It is available via your package manager of choice. This will be the final non-patch release before v4.

npm install polished
yarn add polished

Release Highlights

New Modules

  • cssVar: We've introduced a new module to handle fetching CSS Variable values. We chose to make this a standalone module as opposed to integrating it into all modules to keep module size down.

Improvements

  • readableColor: You can now turn on strict mode for custom provided return colors. This will ensure that they still meet AA contrasting standards. Otherwise, they will return black or white as normal. This mode is off by default in v3.5. (Thanks @mrmckeb).

Bug Fixes

  • mix, tint, shade: Fixed a bug where mix was improperly weighting alpha channels to the second provided color instead of the first. This fix also impacts tint and shade which implement mix.

Contributors

  • Build has been updated to use Rollup 2.
  • Moved CI to GitHub Actions.
  • We now test the build in macOS, Ubuntu, and Windows to ensure all contributors are covered for compatibility.

Future Deprecations

  • Deprecation: stripUnit: The optional unit return will be deprecated in v4. Previously, this was implemented to replace getValueAndUnit. However, we've decided to keep the extra module and simplify stripUnit
  • Deprecation: readableColor: strict mode will be enabled by default in v4, it is currently disabled by default.