xsjcTony/unocss-preset-animations

Support percentage mode

Closed this issue · 3 comments

Clear and concise description of the problem

For now, the preset doesnot support. I have to change it to 48/100
slide-out-to-top-[48%]

Suggested solution

animate-name-xxx-[xx%]

Alternative

No response

Additional context

No response

Validations

  • Read the documentation of using the package
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate

Thanks for the report.
The [] syntax is removed intentionally, you can view the reason here: https://unocss-preset-animations.aelita.me/animations/
I'll try to look into whether I can add support for % syntax, e.g. slide-out-to-top-48% when I get some time.

I've had a look at my implementation, it already supports percentage format, just without the bracket.
Playground
But that's indeed a missing test case, thanks for reporting anyway.
I'll add that into the docs as well

I've updated the documentation, feel free to raise a new issue if you need something else.