Make CSS easier and more maintainable by using JavaScript
Improved
https://github.com/blakeembrey/free-style/compare/v5.0.0...v5.0.1
Changed
Improvements
Added
compile
API for pre-compiling styles to add to multiple sheets.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
Changed
null
and undefined
and they will be filtered out as if they weren't setChanged
register*
methods b506c8b
registerStyle
going forward, simplifies the API interface and removes even more bytes in production!free-style
), the commit above shows how it backward compatibility was maintained in 3.x
- you'll just need to implement it yourself nowfree-style
is down to 1.7kB https://bundlephobia.com/[email protected]
Fixed
{ 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' }
unexpectedlyFixed
\0
from internal hash stringsFixed
dist.es5
directory to NPM files, left out of the previous release 😅Added
free-style/dist.es5
Added
registerStyle
to handle every previous method in one function (e.g. registerHashRule
, registerRule
and registerCss
)
&
(e.g. @keyframes &
), and adding a new flag $global: true
Changed