I am moving Vue 2 source over to Vue 3 (beta), and came across this:
<template>
<section id="this"> <!-- how to eliminate this? -->
<div>
YOU ARE AT HOME 🏯
</div>
<h2>Hi <span>{{ uid }}</span></h2>
<!-- List the projects we have access to -->
<div id="grid-container-projects">
<ProjectTile :project="null" />
<ProjectTile v-for="p in projectsSorted" :key="p.key" :project="p" />
</div>
</section>
</template>
<style scoped>
#this {
text-align: center;
}
...
The details don't matter. Applying the text-align: center to the #this node is what I'd like to achieve, but without the #this node.
Is this possible, or reasonable? :)
I tried the following:
<template> <-- Vue 3 (beta) -->
<div>
YOU ARE AT HOME 🏯
</div>
...
</template>
<style scoped>
* {
text-align: center
}
...
This does the wished layout, but causes a stack overflow in the browser. That may of course be just a Vue 3 betaism. (3.0.0-beta.4)
How would you proceed? Leave the section as is, or get rid of it, somehow?