Releases: styled-components/polished
v3.7.0 LTS
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)- npm - addressed an issue where .yarn cache was bloating published package size, along with some other ignore optimization. (#553 Thanks @scttcper)
Contributor Improvements
- prettier: We've implemented
.prettierrc
and.prettierignore
to better control formatting in development environments. - Build Speed: Build speed has been improved by removing extraneous linting scripts.
v4.1.0
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
- We are now leveraging Scarf to track package analytics. You can opt-out of this functionality by following these instructions
v4.0.5
v4.0.4
v4.0.3
v4.0.2
Introducing polished.js v4!
Introducing polished.js v4!
We're super stoked to announce that polished.js v4 is officially live! It is available via your package manager of choice:
npm install polished
yarn add polished
Release Highlights
New Modules
- New Module:
important
: Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules. - New Modules:
easeIn
,easeOut
,easeInOut
: Will replacetimingFunctions
to allow for smaller modules for specific use cases instead of the larger, more general original implementation. (#402)
Improvements & Bug Fixes
between
Improvement: now properly throws an error when mixed units are used for from/toSize and min/maxScreen. This also fixes the same bug influidRange
. (#445)triangle
Improvement: once again properly works withinherit
by setting individual properties when inherit is used. (#430)stripUnit
Improvement: now only does what it says on the tin: strips a unit from a provided CSS value. Typings are now appropriately set. (#451)getValueAndUnit
Improvement: canceled deprecation of this and it now does what it says on the tin: returns the value and unit as an array. Typings are now appropriately set. (#451)ellipsis
Improvement: now accepts alines
parameter to truncate multi-line text.
Future Deprecations
timingFunctions
: This will be deprecated in v5 in favor ofeaseIn
,easeOut
,easeInOut
.
Breaking Changes
fontFace
: default is now to look for a local font of the same family-name before downloading. Can be turned
off by passingnull
to localFonts. Previously, iflocalFonts
was not passed explcitily, it would never check.cssVar
: deprecatedpassThrough
in favor of being able to pass adefaultValue
to better mimic CSS variable functionality.math
: square root, factorial, and exponent have been moved to a separate symbol preset found atmath/presets/exponentialSymbols/
. This can be passed a second parameter tomath
to restore this functionality.readableColor
: now defaultsstrict
totrue
be default.
Contributor Improvements
- Testing: We've moved away from snapshot testing to explicit expects. This should make understanding if your tests are truly passing much easier.
- prettier: We've implemented
.prettierrc
and.prettierignore
to better control formatting in development environments. - Build Speed: Build speed has been improved my removing extraneous linting scripts.
Coming In v5
v5 will be focused completely on size, speed, and documentation. The biggest change will be the move to submodules. Polished has grown into a large library of helpers, mixins, and color functions. We find ourselves limiting functionality in order to keep bundle size down. By moving to submodules we will be able to expand functionality without worrying about the size of the library and provide small bundle impacts for projects that don't implement tree-shaking. As part of this we will finally be revamping the docs to provide dedicated sections for each module with better usage examples.
polished@v4.0.0-beta.2
fix(index.js): add easings to index.js for docs site build
Introducing polished.js v4 beta!
Introducing polished.js v4 beta!
We're super stoked to announce that polished.js v4 is officially in beta! It is available via your package manager of choice:
npm install polished@next
yarn add polished@next
Release Highlights
New Modules
- New Module:
important
: Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules. - New Modules:
easeIn
,easeOut
,easeInOut
: Will replacetimingFunctions
to allow for smaller modules for specific use cases instead of the larger, more general original implementation. (#402)
Improvements & Bug Fixes
between
Improvement: now properly throws an error when mixed units are used for from/toSize and min/maxScreen. This also fixes the same bug influidRange
. (#445)triangle
Improvement: once again properly works withinherit
by setting individual properties when inherit is used. (#430)stripUnit
Improvement: now only does what it says on the tin: strips a unit from a provided CSS value. Typings are now appropriately set. (#451)getValueAndUnit
Improvement: canceled deprecation of this and it now does what it says on the tin: returns the value and unit as an array. Typings are now appropriately set. (#451)ellipsis
Improvement: now accepts alines
parameter to truncate multi-line text.
Future Deprecations
timingFunctions
: This will be deprecated in v5 in favor ofeaseIn
,easeOut
,easeInOut
.
Breaking Changes
fontFace
: default is now to look for a local font of the same family-name before downloading. Can be turned
off by passingnull
to localFonts. Previously, iflocalFonts
was not passed explcitily, it would never check.cssVar
: deprecatedpassThrough
in favor of being able to pass adefaultValue
to better mimic CSS variable functionality.math
: square root, factorial, and exponent have been moved to a separate symbol preset found atmath/presets/exponentialSymbols/
. This can be passed a second parameter tomath
to restore this functionality.readableColor
: now defaultsstrict
totrue
be default.
Contributor Improvements
- Testing: We've moved away from snapshot testing to explicit expects. This should make understanding if your tests are truly passing much easier.
- prettier: We've implemented
.prettierrc
and.prettierignore
to better control formatting in development environments. - Build Speed: Build speed has been improved my removing extraneous linting scripts.
Beta Period
We are releasing this as a beta to allow the community to test the changes, and make any last-minute accommodations for the breaking changes. In the past, our biggest challenge with any new release has been typings. We are hoping this beta will allow those issues to be addressed before a full release. We expect this beta period to last around 2 weeks.
Coming In v5
v5 will be focused completely on size, speed, and documentation. The biggest change will be the move to submodules. Polished has grown into a large library of helpers, mixins, and color functions. We find ourselves limiting functionality in order to keep bundle size down. By moving to submodules we will be able to expand functionality without worrying about the size of the library and provide small bundle impacts for projects that don't implement tree-shaking. As part of this we will finally be revamping the docs to provide dedicated sections for each module with better usage examples.