New inlineStyle helper
Closed this issue · 4 comments
For some properties that tend to update quickly in an animation, I get the feeling you shouldn’t be using glamor. Such as a CSS transform. However, some glamor features like autoprefixing would be great to have in such a scenario. Could glamor
add a helper function named inlineStyle
or similar that directly applies the styles to JSX nodes instead of adding them to a CSS stylesheet? This could be very helpful for animations.
Or expose the autoprefixing tools, that would be cool too 😊
Maybe something like: style={autoprefix({ ...styles })}
import autoprefix from 'glamor/lib/autoprefix'
should work
Yep 👍. It’s a named export though so:
import { autoprefix } from 'glamor/lib/autoprefix'
Any inclination to make it public 😊
not really... I might switch it out some time later. I probably won't change the path of this file though, so feel free to use