Releases: blakeembrey/free-style
Releases · blakeembrey/free-style
Automatically strip `debug` in production
A bunch of small changes to reduce overall bundle size, which ultimately impacted backward compatibility.
Changed
- Remove
IS_UNIQUE
andDISPLAY_NAME
exports in favor of$unique
and$displayName
keys - Remove
debug
support in favor ofprocess.env.NODE_ENV
- This enables code stripping in production for Webpack and other bundlers and resulted in a 0.6kB bundle size reduction
- Remove
hash
function customization- As far as I know no one has used it in production and it increases scope of the package (let me know if you are!)
DISPLAY_NAME style tags
Added
- Support
DISPLAY_NAME
on style objects - Ignore any keys starting with an
_
Reduce object creations during stylize
Changed
- Reduce one object creation per nested level of styles during stylization to internal object representation
Styles that fire together wire together
Added
- Keep styles that are registered at the same time together instead of de-duping
- This should result in a more consistent cache order (based on first insertion instead of last), no re-ordering and no de-duping of partially registered styles
Expose `Cache#values`
Added
- Expose a function to get the list of values in the current cache ordered as it would be in the sheet output
CSS Numeric Properties
Added
- Add more CSS numeric properties to whitelist
Fix Overloaded Property Ordering
Fixed
- When a property has > 10 overloads, Chrome has an undefined sorting order for matching elements (good breakdown in #66)
Escape Display Name
Changed
- Escape the display name in output CSS for special character support in class names
Minor Bump
Improved
- Custom string concatenation is faster than
Array#join
for the perf tests - Update
hyphenate
regexp matching to do less work
Speed-Up
Improved
- Internally manage styles via an array of strings instead of computing
getStyles()
on demand - Switch to
Object.create(null)
for cache maps