Update dependency polished to v3 #17
Open
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.0.3->^3.0.0Release Notes
styled-components/polished
v3.2.0Compare Source
trianglenow supports intermediate directions (i.e. 'topLeft'). In most cases, it will now alsoreturn a smaller object than prior by combining colors into a single 'borderColor' line. (#399)
triangle no longer relies onborderColorordirectionalProperty`, and therefore has a smaller bundle size.trianglewhere passing a unitless number to triangle defaulted to a pixel value. It will instead return the unitless value.v3.1.0Compare Source
fontFacenow can provide optional format hints for each file src using theformatHintconfiguration option. (#416)fontFacenow supports a base64 encoded dataURI as the value forfontFilePath. Currently, only supports a single base64 value. Can also optionally useformatHintiffileFormatsis passed. (#416)v3.0.4Compare Source
v3.0.3Compare Source
sideEffects: falseto the package.jsondevDependenciesREADME.MDwith note aboutmoduleResolution: nodev3.0.2Compare Source
v3.0.1Compare Source
mathwould not work in IE11 (due to lack of support forObject.values). Thanks @goldsziggy!s,ms,deg,gd,rad,grad, &turninmathfunctions.v3.0.0Compare 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 polishedyarn add polishedRelease Highlights
New Modules
linearGradient: We've introduced a new module to handle generating linear gradients.linearGradientaccepts 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.mathaccepts 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.mdin production. This reduces the overall bundle size and will set us up for our much more thorough error system coming in v4.transparentkeyword instead of erroring out. How each module handles this is slightly different, but you wll always get a valid color ortransparentback when passingtransparentto a color module.toColorStringnow properly usehslToColorStringandrgbToColorStringwhere appropriate. This speeds up color modules that were previously leveragingtoColorStringto convert colors between formats. (Thanks @sandiiarov)modularScaleImprovement:modularScalenow also acceptsremvalues for its base, where previously it only worked withem.readableColorImprovement:readableColornow 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 returningwhiteorblackbased on the passed colors luminosity.stripUnitImprovement:stripUnitnow 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:getValueAndUnithas been marked for deprecation and will be removed in v4. This in someways duplicated functionality available instripUnit. Instead of having two similar modules,stripUnithas been improved to optionally return the stripped unit as part of an array.Breaking Changes
selection: As indicated in the v2 release notes,selectionhas been deprecated. All css-in-js libraries handle this selector without additional prefixing from polished.placeholder: As indicated in the v2 release notes,placeholderhas 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: At any time (no schedule defined).
🚦 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.