All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
StyleRegistry
now optionally accepts transformFn
const styleRegistry = new StyleRegistry(style => style.replace(/\s/g, ''));
styleRegistry.registerStyles('body { color: red; }')
console.log(styleRegistry.getCriticalCSS()) //-> body{color: red;}
// ...
Components don't throw any errors now.
withStyles
- throws an error when styles are not passed or when value's type is not stringStyleRegistry.prototype.registerStyles
- throws an error when styles are not passed or when value's type is not stringStyleRegistry.prototype.getCriticalCSS
- returns string joined with''
(empty string) instead of'\n'
(metacharacter of new line)
- CriticalCSSProvider
- withStyles
- StyleRegistry