Free Style Versions Save

Make CSS easier and more maintainable by using JavaScript

v5.0.1

3 months ago

Improved

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

https://github.com/blakeembrey/free-style/compare/v5.0.0...v5.0.1

v5.0.0

3 months ago

Changed

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.

https://github.com/blakeembrey/free-style/compare/v4.1.0...v5.0.0

v4.1.0

3 years ago

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

v4.0.0

4 years ago

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]

v3.2.4

4 years ago

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

v3.2.3

4 years ago

Fixed

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

v3.2.2

4 years ago

Fixed

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

v3.2.1

4 years ago

Added

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

v3.2.0

4 years ago

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

v3.1.0

4 years ago

Changed

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