优化任务样式

This commit is contained in:
mjsoftware 2024-12-11 17:03:27 +08:00
parent 6f83db1578
commit 7685a25ee1
2 changed files with 8 additions and 23 deletions

View File

@ -285,22 +285,22 @@ ul[data-type=taskList] {
opacity: 0; opacity: 0;
& + span { & + span {
height: 1rem;
width: 1rem; width: 1rem;
color: var(--theme); height: 1rem;
margin-top: 50%; line-height: 1rem;
display: inline-block; display: inline-block;
position: relative; position: relative;
} }
& + span::before { & + span::before {
content: '✖'; content: '✖';
width: 1rem; width: 0.8rem;
height: 1rem; height: 0.8rem;
background: var(--dark-d); padding: 0.1rem;
color: var(--light-a);
text-align: center; text-align: center;
line-height: 1rem; line-height: 1rem;
background: var(--dark-d);
color: var(--light-a);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -308,15 +308,8 @@ ul[data-type=taskList] {
&:checked + span::before { &:checked + span::before {
content: '✔'; content: '✔';
width: 1rem;
height: 1rem;
background: var(--theme); background: var(--theme);
color: var(--light-a); color: var(--light-a);
text-align: center;
line-height: 1rem;
display: flex;
align-items: center;
justify-content: center;
} }
} }
@ -324,20 +317,12 @@ ul[data-type=taskList] {
& + span::before { & + span::before {
border-radius: var(--radius-inner); border-radius: var(--radius-inner);
} }
&:checked + span::before {
border-radius: var(--radius-inner);
}
} }
& > input[type="radio"] { & > input[type="radio"] {
& + span::before { & + span::before {
border-radius: 100%; border-radius: 100%;
} }
&:checked + span::before {
border-radius: 100%;
}
} }
} }
} }

File diff suppressed because one or more lines are too long