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

Filter transition is not working in Chrome/Opera #366

Closed
raskam opened this issue Dec 10, 2014 · 23 comments
Closed

Filter transition is not working in Chrome/Opera #366

raskam opened this issue Dec 10, 2014 · 23 comments
Labels

Comments

@raskam
Copy link

raskam commented Dec 10, 2014

transition: filter ease-in-out 1s;

is converted to

transition: -webkit-filter ease-in-out 1s, filter ease-in-out 1s;
transition: filter ease-in-out 1s;

and it seems that the second transition overwrites the first one with -webkit prefix which is needed for Chrome and Opera to work properly.

Example with generated autoprefixer CSS (transition not working):
http://jsfiddle.net/q9fjt04f/

Example with second transtion removed (transition working):
http://jsfiddle.net/6fxfhuu9/

Tested on Chrome 39 + Opera 26.

@ai ai added the bug label Dec 10, 2014
@ai
Copy link
Member

ai commented Dec 10, 2014

Yeap. We need special hack for this case. As quick hack you can write:

transition: -webkit-filter ease-in-out 1s, filter ease-in-out 1s;

I try to fix it on next week.

@ai ai added the 5.0 label Dec 30, 2014
@ai ai added 5.1 and removed 5.0 labels Jan 12, 2015
@ai
Copy link
Member

ai commented Jan 24, 2015

Fixed ai/autoprefixer-core@c3ad975

@ai ai closed this as completed Jan 24, 2015
@ai
Copy link
Member

ai commented Jan 30, 2015

Released today in 5.1

@dwightjack
Copy link

Hi,

i'm having an issue with transition and filter as well.

My stack is:

  • SCSS with libsass
  • grunt autoprefixer 2.2.0 with autoprefixer core 5.1.3
  • task browsers option set at ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1', 'ie 9']

SCSS source:

filter: blur(100px);
transition: filter 2s ease;

CSS output:

  -webkit-filter: blur(100px);
          filter: blur(100px);
  -webkit-transition: -webkit-filter 2s ease, filter 2s ease;
          transition: filter 2s ease;

Am i missing something?

@ai
Copy link
Member

ai commented Feb 3, 2015

Seems like some old webkit becoome more popular and returned to selection.

@dwightjack
Copy link

Thanks for the reply,

so how do i have to tweak the browser support to get the right output?

transition: -webkit-filter 2s ease, filter 2s ease;

@ai
Copy link
Member

ai commented Feb 3, 2015

This is a hot fix. Later I try to find some better solution.

@arcanis
Copy link

arcanis commented Feb 4, 2015

Would it be an acceptable solution to put the -webkit-transition below the unprefixed one in the autoprefixer output?

        transition: filter .3s;
-webkit-transition: -webkit-filter .3s;

@ai
Copy link
Member

ai commented Feb 4, 2015

Nope, because it broke Autoprefixer clean.

var prefixed = autoprefixer.process(origin).css;
var clean     = autoprefixer({ browsers: [] }).process(prefixed).css;
clean == prefixed;

It important for text editor plugins for example. People in text editor can call Autoprefixer twice on same CSS.

@arcanis
Copy link

arcanis commented Feb 4, 2015

Hm, and using -webkit-filter everywhere filter is used?

-webkit-transition: -webkit-filter .3s;
        transition: filter .3s, -webkit-filter .3s;

The issue is that it breaks transition-* properties, since they don't use the same parameter list anymore : /

@cvn
Copy link
Contributor

cvn commented Jun 18, 2015

I'm still seeing this issue. http://codepen.io/cvn/pen/oXGYBO

I'll use the workaround for now.

@zanona
Copy link

zanona commented Aug 27, 2015

Perhaps the issue should be re-opened? The only way to get it working is to use the workaround, but I believe the bug still exists?

@ai ai reopened this Aug 27, 2015
@ai
Copy link
Member

ai commented Aug 27, 2015

@zanona what browser exactly you use and what input send to Autoprefixer?

@zanona
Copy link

zanona commented Aug 27, 2015

Hey @ai, I am using Safari 8.08 with a similar input as @miroslavraska.

.element {
    transition: filter .3s;
    transition: -webkit-filter .3s, filter .3s; /*work-around*/
}

I hope this helps.

@ai ai added 6.0 bug and removed bug 5.1 labels Aug 28, 2015
@ai
Copy link
Member

ai commented Sep 1, 2015

Fixed ai/autoprefixer-core@50ea7bb

@ai ai closed this as completed Sep 1, 2015
@yisibl
Copy link
Member

yisibl commented Sep 8, 2015

We must be support other properties:

input:

.foo {
    transition: filter 2s, backdrop-filter .36s;
}

output:

.foo {
-webkit-transition: -webkit-filter 2s, -webkit-backdrop-filter .36s, filter 2s, backdrop-filter .36s;
        transition: -webkit-filter 2s, -webkit-backdrop-filter .36s, filter 2s, backdrop-filter .36s;
}

@ai ai reopened this Sep 8, 2015
@ai ai removed the 6.0 label Sep 8, 2015
@yisibl
Copy link
Member

yisibl commented Sep 8, 2015

@ai I think there are more similar properties.

@ai
Copy link
Member

ai commented Sep 8, 2015

@yisibl yeap, I think we should use -webkit-filter for every properties.

@yisibl
Copy link
Member

yisibl commented Sep 8, 2015

Use: safari >= 6

input:

.foo{
  transition: transform 1s;
}

output:

.foo {
  -webkit-transition: transform 1s;
          transition: transform 1s;
}

right?

@ai
Copy link
Member

ai commented Sep 8, 2015

Right :)

@yisibl
Copy link
Member

yisibl commented Sep 8, 2015

http://jsbin.com/gawijotoqu/edit?html,css,output This is not work in old WebKit.

@ai
Copy link
Member

ai commented Oct 11, 2015

I add transition support for backdrop-filter 9ba1f47

@ai
Copy link
Member

ai commented Oct 11, 2015

I close it, because we have #511

@ai ai closed this as completed Oct 11, 2015
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

7 participants