-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 4.0.0 Beta Release #543
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update dependencies and fix new flow error in triangle.test.js
Fully deprecate returnUnit functionality and refactor return.
Make strict mode default when passing custom colors.
Enable bugfix:true in build and target explicit browser list
Default is now to look for a local font of the same family-name before downloading. Can be turned off by passing null to localFonts. BREAKING CHANGE: localFont will now be populated by default and may have unexpected behavior.
important helper for targeting specific rules in module returns for adding `!important`-level specificity.
triangle now returns properties in a way that allows inherit to work by declaring an individual side for the triangle color.
Allow the user to pass a default value to cssVar for when a variable is not found.
…max (#511) * chore(library): update dependencies Update dependencies and fix new flow error in triangle.test.js * refactor(stripunit): fully deprecate returnUnit Fully deprecate returnUnit functionality and refactor return. * refactor(readablecolor): make strict mode default Make strict mode default when passing custom colors. * build(babel): enable bugfix: true Enable bugfix:true in build and target explicit browser list * build(lint-staged): remove superfulous git add * build(lerna): lerna init * feat(normalize): upgrade to normalize 8.0.1 * build(docs): removed documentation.js auto generation * feat(fontface): now defaults to looking for local font first Default is now to look for a local font of the same family-name before downloading. Can be turned off by passing null to localFonts. BREAKING CHANGE: localFont will now be populated by default and may have unexpected behavior. * feat(important): important helper for module rule specificity important helper for targeting specific rules in module returns for adding `!important`-level specificity. * chore(important): update to not mutate original parameter * chore(important): add to index.js * fix(triangle): triangle now properly supports inherit triangle now returns properties in a way that allows inherit to work by declaring an individual side for the triangle color. * feat(cssvar): allow a default value for cssVar Allow the user to pass a default value to cssVar for when a variable is not found. * fix(between): added error case when to/from unit is different than min/max Added an error case when the unit for to/fromSize is different than min/maxScreen. This was causing bad calculations based on the differing scales. BREAKING CHANGE: If you were using a mix of unit and unitless measure or working with different units with similar scales (em/rem) you will now get an error where you may have been getting a seemingly valid calculation. fix #445
…use latest versions
Codecov Report
@@ Coverage Diff @@
## main #543 +/- ##
===========================================
+ Coverage 99.87% 100.00% +0.12%
===========================================
Files 83 88 +5
Lines 832 831 -1
Branches 317 305 -12
===========================================
Hits 831 831
+ Misses 1 0 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
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.easeIn
,easeOut
,easeInOut
: Will replacetimingFunctions
to allow for smaller modules for specific use cases instead of the larger, more general original implementation. ([Feature Request] Alias timing functions with 'ease' and allow percentage based easing #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
. (fluidRange & between don't return the proper calculation when from/toSize don't have the same units as min/maxScreen. #445)triangle
Improvement: once again properly works withinherit
by setting individual properties when inherit is used. (Triangle enhancements breakinherit
as a border color #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. (Improve return type ofstripUnit
#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. (Improve return type ofstripUnit
#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 turnedoff by passing
null
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
.prettierrc
and.prettierignore
to better control formatting in development environments.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.