ktsn / vue-template-loader

Vue.js 2.0 template loader for webpack
MIT License
266 stars 26 forks source link

Are keyframes tagged? #42

Closed CKGrafico closed 6 years ago

CKGrafico commented 6 years ago

Input:

.app {
    &-test {
        animation: test 1s;
        opacity: 0;

        @keyframes test {
            0% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }
    }
}

Output:

.app-test[data-v-44d870c8] {
  animation: test 1s;
  opacity: 0; }

@keyframes test {
  0%[data-v-44d870c8] {
    opacity: 0; }
  100%[data-v-44d870c8] {
    opacity: 1; } }

Could this be a bug of your loader? Or maybe we are doing something wrong.

CKGrafico commented 6 years ago

Related with: https://github.com/ktsn/vue-template-loader/blob/master/lib/modules/add-scoped-id.js

on line 47 https://github.com/ktsn/vue-template-loader/blob/master/lib/modules/add-scoped-id.js#L47 I've changed this line for if (target && !target.value.includes('%')) { but I'm sure you know a better solution

CKGrafico commented 6 years ago

Hello?

ktsn commented 6 years ago

@CKGrafico Sorry for leaving this in a long time. This has been fixed in v0.4.0 https://github.com/ktsn/vue-template-loader/releases/tag/v0.4.0

CKGrafico commented 6 years ago

Thanks!!