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

style scoped模式下编译keyframes出错 #1807

Open
lanmaomm opened this issue Mar 14, 2021 · 3 comments
Open

style scoped模式下编译keyframes出错 #1807

lanmaomm opened this issue Mar 14, 2021 · 3 comments

Comments

@lanmaomm
Copy link

Version

16.1.2

Reproduction link

https://github.com/lanmaomm/test

Steps to reproduce

yarn install
yarn serve
查看css编译结果

What is expected?

.play[data-v-7ba5bd90] {
display: inline-block;
width: 11px;
height: 14px;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
-webkit-animation: playing-7ba5bd90 0.9s linear infinite;
animation: playing-7ba5bd90 0.9s linear infinite;
transition-delay: 300ms;
}
@-webkit-keyframes playing-7ba5bd90 {
0% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
32% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
33% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
66% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
67% {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
99% {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
100% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
}
@Keyframes playing-7ba5bd90 {
0% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
32% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
33% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
66% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
67% {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
99% {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
100% {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
}

What is actually happening?

.play[data-v-7ba5bd90] {
display: inline-block;
width: 11px;
height: 14px;
background-size: 100%;
background-position: center;
background-repeat: no-repeat;
-webkit-animation: playing-7ba5bd90 0.9s linear infinite;
animation: playing-7ba5bd90 0.9s linear infinite;
transition-delay: 300ms;
}
@-webkit-keyframes playing-7ba5bd90 {
0%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
32%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
33%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
66%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
67%[data-v-7ba5bd90] {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
99%[data-v-7ba5bd90] {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
100%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
}
@Keyframes playing-7ba5bd90 {
0%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
32%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
33%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
66%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/1608790978371accc6073ef~0x0.png');
}
67%[data-v-7ba5bd90] {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
99%[data-v-7ba5bd90] {
background-image: url('https://sf6-ttcdn-tos.pstatp.com/img/edux-data/160879100063357a8579e65~0x0.png');
}
100%[data-v-7ba5bd90] {
background-image: url('https://sf3-ttcdn-tos.pstatp.com/img/edux-data/160879095347490c166341e~0x0.png');
}
}


https://github.com/vuejs/vue-loader/blob/next/src/stylePostLoader.ts#L2 是不是16.x版本使用@vue/compiler-sfc处理style导致了这个问题?

@yyyanghj
Copy link

see vuejs/core#3308

@llllllllllx
Copy link

暂时解决方案可以将 @vue/compiler-sfc 退回至3.0.0版本

npm i -D @vue/compiler-sfc@3.0.0

@lanmaomm
Copy link
Author

暂时解决方案可以将 @vue/compiler-sfc 退回至3.0.0版本

npm i -D @vue/compiler-sfc@3.0.0

好的,感谢🙏

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

No branches or pull requests

4 participants