New features
Dead code elimination (#169)
The Styled Component API now prepends a pure
pragma to ensure bundlers know it's safe to get rid of when it hasn't been used! You can find the test code for it here which is then passed through size-limit
to ensure it's the size we expect.
Bug fixes
Template literal interpolations
These interpolations now are correctly extracted when in a group, and multiple groups. CSS that broke before looked like:
<div
css={`
transform: translate3d(${x}, ${y}, ${z});
`}
/>
Fear not! It should work as expected now. If you see anything interesting create an issue.
De-duplicated interpolations
Previously if the same interpolation was used multiple times the inline style prop would have it duplicated.
Css prop class name
When a css prop was passed a class name it wouldn't conditionally apply it - so it would end up appearing as undefined
when it shouldn't!