linaria
linaria copied to clipboard
Bug with use calc()
Environment
- MacOS 10.14.5(18F203)
- Chrome 74.0.3729.169 (64-bit)
- [email protected]
Description
I use calc()
function in my code. but missing parentheses for the calc() function.
this is compiled style code:
Reproducible Demo
https://github.com/iamchanii/reproduce-linaria-issue-439
I made a repository what is reproduce this issue. check below repository's src/App.tsx: https://github.com/iamchanii/reproduce-linaria-issue-439
Screenshot:
and I can't label this issue to Bug. if someone can edit this issue's label, update please. thanks.
I experience the exact same issue. Has it been ever fixed?
It looks like a problem in Stylis since we don't parse and transform css itself. I'll check it and upgrade Stylis if there is a new version with a fix. As a temporary solution, you can override default preprocessor https://github.com/callstack/linaria/blob/master/docs/BUNDLERS_INTEGRATION.md#options
I did a workaround where the result of the calculation was passed down to the Linaria as a variable. Thanks for the heads up though! I will look into that.