Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.animation() mixin #11221

Closed
zlatanvasovic opened this issue Oct 24, 2013 · 5 comments · Fixed by #11244
Closed

.animation() mixin #11221

zlatanvasovic opened this issue Oct 24, 2013 · 5 comments · Fixed by #11244
Milestone

Comments

@zlatanvasovic
Copy link
Contributor

It would be nice to have .animation(...) mixin for animations, like for progress bars.

@ElijahFowler
Copy link

You can add this yourself if you want:

.animation (@name, @duration: 300ms, @delay: 0, @ease: ease) {
    -webkit-animation: @name @duration @delay @ease;
       -moz-animation: @name @duration @delay @ease;
        -ms-animation: @name @duration @delay @ease;
}

Or better yet use Autoprefixer with your current preprossor, or download Prepros and use the Autoprefixer option when you compile it.

@zlatanvasovic
Copy link
Contributor Author

I said this because of there are a lot transition and transform mixins, can
an animation mixin be there?

For example, look at progress-bars.less. Progress bars use animations.

2013/10/25 Elijah Fowler notifications@github.com

You can add this yourself if you want:

.animation (@name, @duration: 300ms, @delay: 0, @ease: ease) {
-webkit-animation: @name @duration @delay @ease;
-moz-animation: @name @duration @delay @ease;
-ms-animation: @name @duration @delay @ease;
}

Or better yet use Autoprefixer https://github.com/ai/autoprefixer with
your current preprossor, or download Preproshttp://alphapixels.com/prepros/and use the Autoprefixer option when you compile it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11221#issuecomment-27125433
.

Zlatan Vasović - ZDroid

@zlatanvasovic
Copy link
Contributor Author

@ElijahFowler Example code:

// Call animation for the active one
.progress.active .progress-bar {
  -webkit-animation: progress-bar-stripes 2s linear infinite;
     -moz-animation: progress-bar-stripes 2s linear infinite;
      -ms-animation: progress-bar-stripes 2s linear infinite;
       -o-animation: progress-bar-stripes 2s linear infinite;
          animation: progress-bar-stripes 2s linear infinite;
}

@mdo Will the pull request help with this? I can send a pr with .animation() addition.

@mdo
Copy link
Member

mdo commented Oct 26, 2013

@zdroid Yeah, let's do it. I'd prefer a super short mixin though, like our .box-shadow() one:

.animation (@animation) {
    -webkit-animation: @animation;
       -moz-animation: @animation;
        -ms-animation: @animation;
}

Keeps it super open, unless folks have something that's more advantageous without being overly verbose.

@zlatanvasovic
Copy link
Contributor Author

I'll. Thanks for reply.

2013/10/26 Mark Otto notifications@github.com

@zdroid https://github.com/ZDroid Yeah, let's do it. I'd prefer a super
short mixin though, like our .box-shadow() one:

.animation (@animation) {
-webkit-animation: @animation;
-moz-animation: @animation;
-ms-animation: @animation;}

Keeps it super open, unless folks have something that's more advantageous
without being overly verbose.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11221#issuecomment-27144539
.

Zlatan Vasović - ZDroid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants