Compare commits
1 Commits
main
...
afa9a2f008
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afa9a2f008 |
@@ -388,12 +388,14 @@ const createTodoFile = async () => {
|
|||||||
|
|
||||||
<TransitionGroup name="todo" tag="ul" class="todo-list">
|
<TransitionGroup name="todo" tag="ul" class="todo-list">
|
||||||
<li v-for="entry in filteredEntries" :key="entry.index">
|
<li v-for="entry in filteredEntries" :key="entry.index">
|
||||||
|
<div class="todo-li-inner">
|
||||||
<todo-txt-item
|
<todo-txt-item
|
||||||
:task="entry.line"
|
:task="entry.line"
|
||||||
:can-edit="canPush"
|
:can-edit="canPush"
|
||||||
@update="(t) => updateTask(entry.index, t)"
|
@update="(t) => updateTask(entry.index, t)"
|
||||||
@delete="deleteTask(entry.index)"
|
@delete="deleteTask(entry.index)"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</TransitionGroup>
|
</TransitionGroup>
|
||||||
|
|
||||||
@@ -431,35 +433,35 @@ const createTodoFile = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
// Use grid-template-rows 1fr → 0fr so the row's height (and therefore
|
||||||
|
// the surrounding gap) collapses smoothly during leave instead of
|
||||||
|
// snapping closed when the DOM node is removed.
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.todo-li-inner {
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.todo-enter-active,
|
.todo-enter-active,
|
||||||
.todo-leave-active {
|
.todo-leave-active {
|
||||||
transition:
|
transition:
|
||||||
opacity 180ms ease,
|
opacity 180ms ease,
|
||||||
transform 220ms ease;
|
transform 220ms ease,
|
||||||
}
|
grid-template-rows 220ms ease;
|
||||||
|
|
||||||
.todo-enter-from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateX(-12px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.todo-enter-from,
|
||||||
.todo-leave-to {
|
.todo-leave-to {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(12px);
|
transform: translateX(-12px);
|
||||||
}
|
grid-template-rows: 0fr;
|
||||||
|
|
||||||
// Take the leaving item out of layout flow so the rest of the list
|
|
||||||
// slides up smoothly via .todo-move instead of jumping.
|
|
||||||
.todo-leave-active {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.todo-move {
|
.todo-move {
|
||||||
|
|||||||
Reference in New Issue
Block a user