refactor(client): use css modules
This commit is contained in:
parent
99bdb11d24
commit
c41879c542
10 changed files with 139 additions and 147 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :class="$style.root" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }">
|
||||
<span class="text" :class="{ up }">
|
||||
<span :class="[$style.text, { [$style.up]: up }]">
|
||||
<MkReactionIcon class="icon" :reaction="reaction"/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -43,30 +43,28 @@ onMounted(() => {
|
|||
position: fixed;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
&:global {
|
||||
> .text {
|
||||
display: block;
|
||||
height: 1em;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
color: var(--accent);
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
transform: translateY(-30px);
|
||||
transition: transform 1s cubic-bezier(0,.5,0,1), opacity 1s cubic-bezier(.5,0,1,.5);
|
||||
will-change: opacity, transform;
|
||||
.text {
|
||||
display: block;
|
||||
height: 1em;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
color: var(--accent);
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
transform: translateY(-30px);
|
||||
transition: transform 1s cubic-bezier(0,.5,0,1), opacity 1s cubic-bezier(.5,0,1,.5);
|
||||
will-change: opacity, transform;
|
||||
|
||||
&.up {
|
||||
opacity: 0;
|
||||
transform: translateY(-50px) rotateZ(v-bind(angle));
|
||||
}
|
||||
}
|
||||
&.up {
|
||||
opacity: 0;
|
||||
transform: translateY(-50px) rotateZ(v-bind(angle));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue