Skip to content

Animate border-radius in % rather than pixels #165

Open
@lukeHT

Description

@lukeHT

lax.js version
2.0.3

Describe the bug
I'd like to use % for 'border-radius' value, but each time I try to do something with that it crashes. I tried to use both cssUnit and cssFn, but with no luck. There's no error, no anything, just the code is not applied.

Code

"border-radius": [
    [0, "screenHeight"],
    [50, 0],
    {
        easing: 'easeInOutQuint',
        cssUnit: '%',
    }
]
"border-radius": [
    [0, "screenHeight"],
    [50, 0],
    {
        easing: 'easeInOutQuint',
        cssFn: (val) => {
            return `${val}%`;
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions