fix(deps): update dependency polished to v3 #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^2.3.3
->^3.0.0
Release Notes
styled-components/polished
v3.0.0
Compare Source
Introducing polished.js v3!
We're super stoked to announce that polished.js v3 is officially out! It is available via your package manager of choice:
npm install polished
yarn add polished
Release Highlights
New Modules
linearGradient
: We've introduced a new module to handle generating linear gradients.linearGradient
accepts an array of color stops, and optional directions and fallback to generate a linear gradient with a single color background fallback.math
: We've introduced a new module to handle doing calculations on CSS values.math
accepts a formula as a string and currently supports addition, subtraction, multiplication, division, square root, powers, factorial, min, max, and modification of order of operations parentheses. This can also be extended to incorporate other mathematical functions.hslToColorString
: Converts a HslColor or HslaColor object to a color string. (Thanks @sandiiarov)rgbToColorString
: Converts a RgbColor or RgbaColor object to a color string. (Thanks @sandiiarov)Improvements
error.md
in production. This reduces the overall bundle size and will set us up for our much more thorough error system coming in v4.transparent
keyword instead of erroring out. How each module handles this is slightly different, but you wll always get a valid color ortransparent
back when passingtransparent
to a color module.toColorString
now properly usehslToColorString
andrgbToColorString
where appropriate. This speeds up color modules that were previously leveragingtoColorString
to convert colors between formats. (Thanks @sandiiarov)modularScale
Improvement:modularScale
now also acceptsrem
values for its base, where previously it only worked withem
.readableColor
Improvement:readableColor
now offers the option to set the color(s) it returns for light or dark colors. Otherwise, it will work the way it always has, either returningwhite
orblack
based on the passed colors luminosity.stripUnit
Improvement:stripUnit
now offers the option to return the value and unit as an array, replacing the functionality ofgetValueAndUnit
. Without this option, it will continue to return just the stripped value.Future Breaking Changes
getValueAndUnit
:getValueAndUnit
has been marked for deprecation and will be removed in v4. This in someways duplicated functionality available instripUnit
. Instead of having two similar modules,stripUnit
has been improved to optionally return the stripped unit as part of an array.Breaking Changes
selection
: As indicated in the v2 release notes,selection
has been deprecated. All css-in-js libraries handle this selector without additional prefixing from polished.placeholder
: As indicated in the v2 release notes,placeholder
has been deprecated. All css-in-js libraries handle this selector without additional prefixing from polished.Coming In v4
As usual, we will be taking a bit of a break from major work for a couple months, but we are already planning out v4. This release will largely focus on library-wide impact, and likely won't include any new functionality. Here is the current state of the roadmap:
babel-plugin-polished
- This plugin has been around since the early days of polished.js, but we've never taken official ownership of it. We will be pulling it forward in v4, updating it, and incorporating it into our testing and docs.getValueAndUnit
- v4 will see this module fully deprecated.Renovate configuration
📅 Schedule: "before 8am on Monday" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.