Skip to content

Conversation

@thisduck
Copy link
Contributor

This PR adds flexbox based classes as supported.

@rigor789
Copy link
Member

Nice!
Is it ready to merge down to the tw2 branch?

@thisduck
Copy link
Contributor Author

@rigor789 Yes! I've been using this branch in an app for work.

I also fixed the main setting in package.json from when I added the animation options. So now it works properly when integrating via postcss.
I didn't get a chance to test out the animation at that point. So this PR has fixes for that.
Unfortunately not all animations work animate-bounce is the only one that works nicely. I think it might be because of a bug in Nativescript, but not 100% sure.

@rigor789 rigor789 merged commit 503f6d9 into NativeScript:feat/tailwind2 Jan 22, 2021
@rigor789
Copy link
Member

Great! It's likely a bug in NS - can investigate that later, not a huge deal at this point I'd say!

@thisduck
Copy link
Contributor Author

@rigor789 Just for completeness, for something like spinning. Tailwind has:

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

This works fine in the browser. But in NS, it doesn't work unless the from keyframe is added as well. When iteration is infinite, animate-bounce works fine, but spin only spins twice (or so) and stops.

rigor789 added a commit that referenced this pull request Apr 5, 2021
* feat: postcss8 & tailwind2

* feat: add animation to supported properties

* feat: expand animations for NS. (#67)

* feat: support flexbox classes (#72)

* (feat): Adding flexbox classes.

* (refactor): Combine plugins for export.

* (refactor): include postcss files.

* (refactor): include dependencies.

* Represent animation duration as seconds.

* chore: clean up repo

* chore: build & pin postcss

* chore: bump tailwind

Co-authored-by: Adnan Ali <adnan.ali@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants