Skip to content

Serialization issue with nested parenthesis and a variable #306

Description

@luixo

What happened?

Hello,
I try to use Uniwind with importing a web library that utilizes Tailwind heavily.
There is a tailwind pattern that was not properly serialized: calc(-1.2s + (0.1s * var(--foo))) (it's an animation delay).
The return template is

`-1.2000000476837158s + ( ${0.10000000149011612s" * this[`--foo`]")} `

I guess it's expected to be

`-1.2000000476837158s + ( 0.10000000149011612s * ${this[`--foo`]})} `

Steps to Reproduce

  1. Add animation-delay: calc(-1.2s + (0.1s * var(--foo))) to your CSS file
  2. Run project

Expected result: no error
Actual result: Failed to serialize javascript object

Snack or Repository Link

Uniwind version

1.2.2

React Native Version

0.81.5

Platforms

iOS

Expo

Yes

Additional information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions