cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

[jss-vendor-prefixer] Edge doesn't support -ms- prefix for keyframes #695

Closed Evalon closed 6 years ago

Evalon commented 6 years ago

Microsoft Edge 41.16299.334.0 doesn't support -ms- prefix for keyframes. So logic to add a prefix to keyframes in any situation doesn't work anymore and leads to not worked animations. But to be precise I did not find a changelog or something for Edge to be sure that was intentional.

kof commented 6 years ago

yes, lets fix this

AleshaOleg commented 6 years ago

@Evalon according to caniuse data - https://caniuse.com/#search=keyframes Keyframes don't need a prefix. Isn't it?

Evalon commented 6 years ago

You right. For IE and Edge that's true, but for some old browsers it's still needed.

AleshaOleg commented 6 years ago

@Evalon we do not support, IE < 10 as I remember

AleshaOleg commented 6 years ago

@Evalon Can I close this issue?

Evalon commented 6 years ago

@ubergrape Even if IE < 10 is not supported, but plugin logic adds prefix even for new browsers. And for IE and Edge is -ms-. That follows to not worked keyframes in Edge.

AleshaOleg commented 6 years ago

@Evalon there is a full support of keyframes for all of Edge version and IE >= 10. What's a problem? Do you have any examples of non-working keyframes in Edge?

https://developer.mozilla.org/en-US/docs/Web/CSS/%40keyframes

Evalon commented 6 years ago

@ubergrape Example: https://codepen.io/anon/pen/GdmRyo

Evalon commented 6 years ago

@ubergrape I can create a pull request if you want. We just need to check if css-vendor return -ms- then we don't add it to keyframes. One of the possible solutions I think.

AleshaOleg commented 6 years ago

@Evalon it's not working even in latest Chrome. Change your code to:

@keyframes someName {
  from {background-color: red;}
  to {background-color: blue;}
}

Everything will work fine.

Evalon commented 6 years ago

@ubergrape That's true and that's where is plugin went wrong. It's added -ms- prefix.

AleshaOleg commented 6 years ago

@Evalon ok, got it. Checking.

AleshaOleg commented 6 years ago

@Evalon take a look at this. https://codesandbox.io/s/lxl8mwj1l7

Tested on Microsoft Edge 41.16299.371.0

photo_2018-05-01_21-04-34

https://www.dropbox.com/s/2w8cckokbh2lmn7/Microsoft%20Edge%205_1_2018%209_07_20%20PM.mp4?dl=0

Evalon commented 6 years ago

@ubergrape You use jss-preset-default that doesn't have the latest version of jss-vendor-prefixer in its turn it doesn't have latest css-vendor with the fix for Edge so prefix is empty. Try this (uses latest jss-vendor-prefixer): https://codesandbox.io/s/1vkv3v9724

AleshaOleg commented 6 years ago

https://github.com/cssinjs/jss-vendor-prefixer/pull/12

AleshaOleg commented 6 years ago

Fixed in 8.0.1. cc @Evalon. Thanks to you!

azarual commented 5 years ago

i have a keyframes that doesn't work on edge even though it's so simple @keyframes backgroundAfter{ 0%{width:100%;} 100%{width:340%;} } you can see it on my website www.home-pharma.fr can some one help me to solve it

AleshaOleg commented 5 years ago

@azarual thanks for reporting. Can confirm. @kof @HenriBeck animations throw keyframes are not working at all in JSS@10. Can somebody check this? Seems prefixing by css-vendor working fine.

kof commented 5 years ago

@AleshaOleg can you create a separate issue with reproduction pls?

AleshaOleg commented 5 years ago

@kof https://github.com/cssinjs/jss/issues/1120

AleshaOleg commented 5 years ago

@azarual please check this answer - https://github.com/cssinjs/jss/issues/1120#issuecomment-500742090