Skip to content

Releases: styled-components/polished

v2.0.1

22 Aug 15:25
Compare
Choose a tag to compare

2.0.1 (2018-08-22)

Bug Fixes

  • parseToHSL: parseToHSL can now handle float values for hue (d1d1f40), closes #343

v2.0.0

22 Aug 05:30
82d4362
Compare
Choose a tag to compare

This is a major release that introduces new modules, improvements to existing modules, bug fixes, improved TypeScript and Flow Support, and some deprecations.

Breaking Changes

We introduced one necessary breaking change in this release. In the future, we will warn a full major version ahead of time, but this one necessitated an immediate fix. (Un)luckily, it was never working properly in the first place.

  • mix color module now requires a ratio in order to work. It originally tried to default to .5 but this broke in most cases.

Deprecations

These items have been marked for deprecation in v3 of polished.

  • placeholder mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.
  • selection mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.

These items have been deprecated immediately as the change doesn't introduce any breaking changes. However, you will want to update your code accordingly.

  • normalize no longer accepts excludeOpinionated as a parameter, as opinionated rules have been removed in the latest versions of normalize.css.

New Modules

This release addresses our most popular feature requests as voted on by users. If something you were hoping for didn't make it, you can make your voice heard by 👍a module request in our issues.

Mixins

  • between mixin added to return a CSS calc formula for linear interpolation of a property between two values.
  • cover mixin added to return CSS to fully cover an area similar to background-image: cover.
  • fluidRange mixin added to returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize linearly.

Shorthands

  • border shorthand added to return shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron.

Helpers

  • getValueAndUnit helper added returns a given CSS value and its unit as elements of an array.

New Features

We have made a variety of improvements to existing modules as well.

Mixins

  • fontFace now supports font-display, font-variation-settings, and font-feature-settings.
  • triangle now supports any unit of measure instead of just px. (Thanks @lifeiscontent)
  • normalize has been upgraded to use normalize.css 8.0.

Color Modules

  • All color modules now support hex color values with alpha values (commonly referred to as 8-Digit hex colors).
  • All color modules now support string values for all parameters.
  • mix fixed an issue where mix would not curry properly.

Shorthands

  • transitions now supports applying the same transition to multiple properties in one call.

Bug Fixes

Mixins

  • ellipsis - fixed a bug to avoid potential white-space issues with display: inline-block.
  • normalize - fixed an issue where vendor prefixed values were not properly camel-cased.
  • retinaImage- fixed a bug that was causing background-image to be set to undefined (instead of not set at all) when a background image is not passed.

Flow

  • mix now properly passes flow tests in all cases, including when curried.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their Flow type definitions. (Thanks @vhfmag)
  • All Modules - fixed various issues with typings including improperly declared optional parameters, too loose array definitions, and inadequate object property strictness.
  • All custom types are now exported separately for use elsewhere instead of being embedded with specific modules.

TypeScript (Thanks @ForbesLindesay)

  • TypeScript build now works properly in Windows
  • Added additional TypeScript tests for all modules.
  • TypeScript definitions properly generate regardless of module export policy.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their TypeScript definitions. (Thanks @vhfmag)

Documentation

  • Docs have been upgraded to the latest version of documentation.js and generation should no longer randomly break for contributors.
  • triangle documentation now properly displays.
  • toColorString documentation now properly displays.
  • Variety of clarifications and typo fixes.

v1.9.3

28 Jun 01:28
Compare
Choose a tag to compare

1.9.3 (2018-06-28)

Bug Fixes

  • parseToRGB: Not covered invalid input (#323) (dc2e76f)

v1.9.2

05 Feb 10:08
Compare
Choose a tag to compare

1.9.2 (2018-02-05)

Bug Fixes

  • build: Centralized babel config to prevent accidental mismatches (#293) (ee912ff)

v1.9.1

04 Feb 19:39
5dc4f4e
Compare
Choose a tag to compare

1.9.1 (2018-02-04)

Bug Fixes

  • package: Add version to package.json for release. (#291) (5dc4f4e)
  • semantic-release: Fixes travis config for semantic-release (#290) (669389e)

v1.9.0

08 Nov 20:03
871252a
Compare
Choose a tag to compare

1.9.0 (2017-11-08)

Features

  • hideVisually: hideVisually docs and release (#273) (871252a)

v1.8.2

06 Nov 22:16
Compare
Choose a tag to compare

1.8.2 (2017-11-06)

Performance Improvements

  • tooling: Use loose mode for the babel transpilation (#263) (fe7639f)

v1.8.1

16 Oct 04:26
Compare
Choose a tag to compare

1.8.1 (2017-10-16)

Bug Fixes

  • Library: permit zero for directionalProperty, borderRadius (#259) (7dc4117)

v1.8.0

08 Oct 23:53
Compare
Choose a tag to compare

1.8.0 (2017-10-08)

Features

  • shorthands: Shorthand now fully accept integers (#255) (be40836)

Performance Improvements

  • deps: Removed annotations from the source, annotating automatically with a babel plugin (#253) (62f7def)

v1.7.0

31 Aug 05:06
Compare
Choose a tag to compare

1.7.0 (2017-08-31)

Features

  • getLuminance: Add getLuminance function (#163) (a72699a)