linaria icon indicating copy to clipboard operation
linaria copied to clipboard

Bug with use calc()

Open iamchanii opened this issue 5 years ago • 5 comments

Environment

Description

I use calc() function in my code. but missing parentheses for the calc() function.

2019-06-14 22-58-58 2019-06-14 23_00_02

this is compiled style code: image

Reproducible Demo

https://github.com/iamchanii/reproduce-linaria-issue-439

iamchanii avatar Jun 14 '19 14:06 iamchanii

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: image image

iamchanii avatar Jun 16 '19 03:06 iamchanii

and I can't label this issue to Bug. if someone can edit this issue's label, update please. thanks.

iamchanii avatar Jun 16 '19 03:06 iamchanii

I experience the exact same issue. Has it been ever fixed?

ver1nty avatar Jan 21 '21 12:01 ver1nty

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

Anber avatar Jan 21 '21 12:01 Anber

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.

ver1nty avatar Jan 28 '21 08:01 ver1nty