threepointone / glamor

inline css for react et al
MIT License
3.66k stars 199 forks source link

variable name in the generated css #184

Open jbelfodil opened 7 years ago

jbelfodil commented 7 years ago

Hello,

I have a weird issue :

const foo = 4
const rule = css`
    transform: scaleX(${foo})
`;
//.css-1sne24e,[data-css-1sne24e]{-webkit-transform:scaleX(foo);transform:scaleX(foo);}
const foo = 4
const rule = css`
    transform: scale(${foo},0)
`;
//.css-1sne24e,[data-css-1sne24e]{-webkit-transform:scale(4,0);transform:scale(4,0);}

Any advices ??

Thx :)

threepointone commented 7 years ago

appears to be a bug with the literal notation. recommend you use the object notation to avoid this bug for now. will keep this open till the bug is fixed.