Skip to content

Releases: blakeembrey/free-style

ES2015 Set and Map

18 Jan 20:31
eb921ab
Compare
Choose a tag to compare

Improved

  • ES2015 set/map usage, removes a few bytes 3fe91cc

v5.0.0...v5.0.1

ESM only

18 Jan 19:40
b649d92
Compare
Choose a tag to compare

Changed

  • This package is now ESM only! Do not upgrade if you aren't using ESM or a compatible bundler.
  • Style properties are no longer sorted (fixes #105).

Improvements

  • Shrunk the package 0.1kb (7% smaller).
  • Performance improved in large style benchmarks by ~5%.

Added

  • Added a compile API for pre-compiling styles to add to multiple sheets.
  • Added support for a custom prefix to create() so all styles can be namespaced in a single sheet.

v4.1.0...v5.0.0

Allow null and undefined in `PropertyValue`

24 Jan 18:51
Compare
Choose a tag to compare

Changed

  • Allow null and undefined in PropertyValue f6b33f9
    • Primarily means that an array of values can now contain null and undefined and they will be filtered out as if they weren't set

Remove `register*` Methods

02 May 05:03
Compare
Choose a tag to compare

Changed

  • Remove old register* methods b506c8b
    • Everything can be done using a singular registerStyle going forward, simplifies the API interface and removes even more bytes in production!
    • If you need to provide backward-compatible interfaces (e.g. you're a library wrapping free-style), the commit above shows how it backward compatibility was maintained in 3.x - you'll just need to implement it yourself now
    • The entire bundle of free-style is down to 1.7kB https://bundlephobia.com/[email protected]

Fix Nested Selector Hashing

29 Apr 07:12
Compare
Choose a tag to compare

Fixed

  • Fix nested selectors returning the same hash when no other styles are present
    • E.g. { color: 'red' } and { '&:first-child': { color: 'red' } } should return different hashes, otherwise it'll create some nasty edge cases for the class name getting set to { color: 'red' } unexpectedly

Remove \0 From Strings

25 Apr 04:40
Compare
Choose a tag to compare

Fixed

  • Remove \0 from internal hash strings
  • Use the internally generated hash for shorter IDs for conflict resolution

Publish ES5 Distribution

08 Apr 04:40
Compare
Choose a tag to compare

Fixed

  • Add new dist.es5 directory to NPM files, left out of the previous release 😅

Add ES5 Distribution

08 Apr 04:34
Compare
Choose a tag to compare

Added

  • Create an ES5 distribution available at free-style/dist.es5

Register Style For Everything

05 Apr 01:52
Compare
Choose a tag to compare

Added

  • Allow registerStyle to handle every previous method in one function (e.g. registerHashRule, registerRule and registerCss)
    • This works by interpolating rules with & (e.g. @keyframes &), and adding a new flag $global: true

Even Smaller Build

05 Mar 01:42
Compare
Choose a tag to compare

Changed

  • Move to ES2015 (saves 0.3kb)
  • Cosmetic code changes to shave a few extra bytes