This repository has been archived by the owner on Jun 12, 2020. It is now read-only.
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.4.4
Release Notes
styled-components/polished
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
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: 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 tick the rebase/retry checkbox below.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.