v3.5.0
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 returnblack
orwhite
as normal. This mode is off by default in v3.5. (Thanks @mrmckeb).
Bug Fixes
mix
,tint
,shade
: Fixed a bug wheremix
was improperly weighting alpha channels to the second provided color instead of the first. This fix also impactstint
andshade
which implementmix
.
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 replacegetValueAndUnit
. However, we've decided to keep the extra module and simplifystripUnit
- Deprecation:
readableColor
: strict mode will be enabled by default in v4, it is currently disabled by default.