Last active
June 29, 2021 03:30
-
-
Save kcoder666/6b69212e5d00d9e9de5ac4e7cdb60498 to your computer and use it in GitHub Desktop.
Compare Vue CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="card"> | |
<div class="card__header"> | |
{{title}} | |
</div> | |
<div class="card__body"> | |
<p>{{description}}</p> | |
</div> | |
<div class="card__footer"> | |
{{date}} | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
title: String, | |
description: String, | |
date: String, | |
} | |
} | |
</script> | |
<style lang="postcss" scoped> | |
.card { | |
@apply flex items-start justify-between; | |
width: 400px; | |
&__header { | |
@apply font-bold italic text-6xl; | |
} | |
&__body { | |
@apply text-lg; | |
} | |
&__footer { | |
@apply text-sm text-gray-400; | |
} | |
} | |
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="flex items-start justify-between" :style="{width: '400px'}"> | |
<div class="font-bold italic text-6xl"> | |
{{title}} | |
</div> | |
<div class="text-lg"> | |
<p>{{description}}</p> | |
</div> | |
<div class="text-sm text-gray-400"> | |
{{date}} | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
title: String, | |
description: String, | |
date: String, | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment