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.0
->4.2.2
Release Notes
styled-components/polished
v4.2.2
Compare Source
Bug Fixes
v4.2.1
Compare Source
Bug Fixes
hls(a)
- now properly parses percentages for opacity.rgb(a)
- now properly parses percentages for opacity.v4.2.0
Compare Source
Improvements
rgb
- now accepts optional opacity value.hsl
- now accepts optional opacity value.v4.1.4
Compare Source
Bug Fixes
v4.1.3
Compare Source
Bug Fixes
v4.1.2
Compare Source
Bug Fixes
v4.1.1
Compare Source
Bug Fixes
v4.1.0
Compare Source
Introducing polished.js v4.1.0!
We're super stoked to announce that polished.js v4.1.0 is officially out! It is available via your package manager of choice. This will be the final non-patch release before v5.
npm install polished
yarn add polished
Release Highlights
New Module
remToPx
: We've introduced a new module to handle converting torem
values topx
values. (#376)Analytics
v4.0.5
Compare Source
Documentation
readableColor
- Update docs and function signature to be clearer about the use of each parameter.v4.0.4
Compare Source
Bug Fixes
v4.0.3
Compare Source
Bug Fix
v4.0.2
Bug Fix
ellipsis
: Fixes an issue where thewebkit
prefix was not properly applied with the multiline option. (Thanks @drakang4 - #546)v3.7.2
: LTSCompare Source
Bug Fixes
v3.7.1
: LTSCompare Source
Bug Fixes
v3.7.0
: LTSCompare Source
Introducing polished.js v3.7.0 LTS!
We're excited to release v3.7.0, polished's first Long Term Support (LTS) branch. We will continue to back-port critical bug and security fixes to this branch until the release of v5, at which point v4 will become the new LTS branch. This release also officially deprecates polished v2.x.x.
npm install polished@lts
yarn add polished@lts
Release Highlights
Improvements & Bug Fixes
between
: now properly throws an error when mixed units are used for from/toSize and min/maxScreen. This also fixes the same bug influidRange
. (#445)readableColor
- Update docs and function signature to be clearer about the use of each parameter.transparentize
- addressed an issue where we weren't handling cases where floats were greater than 2 decimals. (#548)triangle
Improvement: once again properly works withinherit
by setting individual properties when inherit is used. (#430)Contributor Improvements
.prettierrc
and.prettierignore
to better control formatting in development environments.v3.6.7
Compare Source
Bug Fix
linearGradient
: Properly handles rgba values as the first color stop value and consistently formats all rgba calues in color stops.v3.6.6
Compare Source
master
tomain
as default branchv3.6.5
Compare Source
Bug Fix
cssVar
: Properly handles the exception where the document object is not available in non-browser environments (#518). This simply throws a proper error. It does not enablecssVar
to work server-side.v3.6.4
Compare Source
Bug Fix
rgbToString
: Fixes an issue where passing a rgba color with 0 alpha was incorrectly returning a hex value (#515)v3.6.3
Compare Source
Bug Fix
normalize
: Updates to normalize.css 8.0.1 to fix a regression to fix a regression withmain
not being set todisplay: block
.v3.6.2
Compare Source
Bug Fix
esmodules: true
from theesm
build to fix an issue with ES5 support.v3.6.1
Compare Source
Bug Fix
jsnext:main
bundle reference that was not pointing to an ES5 compatible build.v3.6.0
Compare Source
Build Enhancements
commonjs
bundle and make it the newmain
bundle.bugfixes: true
.uglify
withterser
on minified standalone build.v3.5.2
Compare Source
Bug Fixes
cssVar
: fixed issue where CSS variables set my stylesheets were returning with a leading space and breaking other polished modules when passed the return value. (#493)v3.5.1
Compare Source
Bug Fixes
between
,modularScale
,triangle
: fixed issue where these modules were calling deprecated functionality instripUnit
and creating unnecessary console noise (and subsequent performance problems).v3.5.0
Compare Source
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
Future Deprecations
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
readableColor
: strict mode will be enabled by default in v4, it is currently disabled by default.v3.4.4
Compare Source
Bug Fixes
v3.4.3
Compare Source
Bug Fixes
clip-path
fromhideVisually
(43c69c6) - Thanks @ughitsaaronEnhancements
v3.4.2
Compare Source
hsl(a)
- Fixed a bug preventing the use of decimal values.v3.4.1
Compare Source
between
(and thereforefluidRange
) now supports unitless values for fromSize and toSize.v3.4.0
Compare Source
getContrast
) for getting the contrast score between two colors.meetsContrastGuidelines
) for checking which contrast guidelines have been met between two colors.Thanks @souporserious!
v3.3.2
Compare Source
v3.3.1
Compare Source
Bug Fixes
v3.3.0
Compare Source
modularScale
now supports all base values regardless of unit, including unitless values. (fixes #429)parseToRGB
is now case-insensitive (thanks @Andarist)v3.2.1
Compare Source
Bug Fixes
v3.2.0
Compare Source
triangle
now 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 on
borderColoror
directionalProperty`, and therefore has a smaller bundle size.triangle
where passing a unitless number to triangle defaulted to a pixel value. It will instead return the unitless value.v3.1.0
Compare Source
fontFace
now can provide optional format hints for each file src using theformatHint
configuration option. (#416)fontFace
now supports a base64 encoded dataURI as the value forfontFilePath
. Currently, only supports a single base64 value. Can also optionally useformatHint
iffileFormats
is passed. (#416)v3.0.4
Compare Source
v3.0.3
Compare Source
sideEffects: false
to the package.jsondevDependencies
README.MD
with note aboutmoduleResolution: node
v3.0.2
Compare Source
v3.0.1
Compare Source
math
would not work in IE11 (due to lack of support forObject.values
). Thanks @goldsziggy!s
,ms
,deg
,gd
,rad
,grad
, &turn
inmath
functions.v3.0.0
: polished.js v3 is out!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.v2.3.3
Compare Source
Bug Fixes
v2.3.2
Compare Source
Bug Fixes
v2.3.1
Compare Source
Bug Fixes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.