Skip to content

keyframes 未正确处理 #207

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

Closed
yukisora2013 opened this issue Mar 31, 2018 · 3 comments
Closed

keyframes 未正确处理 #207

yukisora2013 opened this issue Mar 31, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@yukisora2013
Copy link

keyframes 未正确处理

mpvue: 1.0.6
mpvue-template-compiler: 1.0.6
mpvue-loader: 1.0.8
postcss-mpvue-wxss: 1.0.0

编译之后 animation 里的 keyframes-name 没有 -data-v-63af05ea 后缀。

此外,微信不支持有 vendor prefix 的 keyframes,应该在 postcss 去掉。

问题复现步骤:

  1. 新建一个简单的 keyframes
.action {
  animation: 1s the-key-frames;
}
@keyframes the-key-frames {
  from {
    left: 0px;
  }
  to {
    left: 100px;
  }
}
  1. 编译

期望的表现:

.action.data-v-63af05ea {
  animation: 1s the-key-frames-data-v-63af05ea;
}
@keyframes the-key-frames-data-v-63af05ea {
from {
    left: 0;
}
to {
    left: 200rpx;
}
}

观察到的表现:

.action.data-v-63af05ea {
  animation: 1s the-key-frames;
}
@keyframes the-key-frames-data-v-63af05ea {
from {
    left: 0;
}
to {
    left: 200rpx;
}
}
@anchengjian
Copy link
Member

暂时先去掉 style 的 scoped 进行开发吧。
感觉这儿可能有其他bug,the-key-frames 按道理应该不会加 -data-v-63af05ea 补全

@anchengjian anchengjian added the bug Something isn't working label Apr 2, 2018
@exoticknight
Copy link

exoticknight commented Jun 12, 2018

大概可以参考一下 vue 的实现。
vuejs/vue-loader#731
@anchengjian 从上面来看,vue-loader 中是加上的,但是只是在一个 scoped tag 中去找

@exoticknight
Copy link

原来的 vue-loader 的解决方案问题,只取了第一个 value,新版已经修复
PR:mpvue/mpvue-loader#28
@anchengjian @moenewpoi

@aOrz aOrz closed this as completed Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants