Nuxt/examples/styled-vue/pages/index.vue

36 lines
541 B
Vue
Raw Normal View History

2019-01-08 16:32:51 +00:00
<template>
<div>
<h1>styled-vue</h1>
<a href="https://github.com/egoist/styled-vue" class="github">
Check it out on GitHub.
</a>
2019-01-08 16:32:51 +00:00
</div>
</template>
<script>
import { css } from 'styled-vue'
export default {
style: css`
h1 {
color: red;
font-size: ${vm => vm.fontSize}px;
}
.github {
color: blue;
animation: blink 1s linear infinite;
}
@keyframes blink {
50% {
opacity: 0;
}
}
`,
data () {
2019-01-08 16:32:51 +00:00
return {
fontSize: 60
}
}
}
</script>