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

Vendor-keyframes get useless vendor-properties #229

Closed
igl opened this issue Nov 18, 2013 · 5 comments
Closed

Vendor-keyframes get useless vendor-properties #229

igl opened this issue Nov 18, 2013 · 5 comments
Labels

Comments

@igl
Copy link

igl commented Nov 18, 2013

A simple animation:

@keyframes myAnim
    0%
        transform rotate(0)
    ...

...generates keyframes with tons of useless properties

@-moz-keyframes myAnim {
    0% {
        -webkit-transform: rotate(0);
        -moz-transform: rotate(0);
        -o-transform: rotate(0);
        -ms-transform: rotate(0);
        transform: rotate(0);
    }
    ...

@-moz-keyframes should only have -moz-transform as property. etc.

@notslang
Copy link
Collaborator

Good catch... I still need to reproduce this once I get back home, but that looks like something that will be an easy fix.

@Calvein
Copy link

Calvein commented Nov 20, 2013

The keyframes prefixes are actually set with Stylus directly (http://learnboost.github.io/stylus/docs/keyframes.html), but yes, that's a bummer, and it creates keyframes for -ms- and -o- which never need the prefixes (event if the doc show only -webkit- and -moz-) and -moz- is pretty useless now since it was supported only 10 version ago (http://caniuse.com/#search=css3%20animation).

@tannerlinsley
Copy link

We should get this fixed. This would greatly impact the output size for nzAnimate http://github.com/nozzle/nzAnimate. Is this a stylus bug or a nib bug?

@igl
Copy link
Author

igl commented Dec 29, 2015

Here is a fix:

vendors = 'official'
@keyframes myAnim
    0%
        transform rotate(0)

This should stop stylus from creating vendor prefixes and leave it up to nib.
See: http://stylus-lang.com/docs/keyframes.html#expansion

Maybe nib could include that fix? Could it hurt?

@igl
Copy link
Author

igl commented Feb 29, 2016

I closed this with a workaround.
Could this be done by nib? @slang800

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

No branches or pull requests

4 participants