Skip to content

Commit

Permalink
feat: 优化列表间距
Browse files Browse the repository at this point in the history
  • Loading branch information
Keldos-Li committed Oct 9, 2023
1 parent 0f2b510 commit 1dc020b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/scss/blockquote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ blockquote {
margin-left: 0;
}

blockquote p:first-child {
padding-top: 1ch;
}
// blockquote p:first-child {
// padding-top: 1ch;
// }

blockquote p:last-child {
padding-bottom: 1ch;
}
// blockquote p:last-child {
// padding-bottom: 1ch;
// }

blockquote blockquote {
border-left: 4px solid hsl(0, 0%, 70%);
Expand Down
22 changes: 16 additions & 6 deletions src/scss/list.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* 无序列表 */
ul {
#write ul {
list-style: disc;
ul {
/*list-style: circle;*/
Expand All @@ -13,7 +13,7 @@ ul {
}

/* 有序列表 */
ol {
#write ol {
list-style: decimal;
ol {
counter-reset: liist;
Expand Down Expand Up @@ -52,13 +52,23 @@ ol {
}
}

li {
position: relative;
}
ol, ul {
#write ol,
#write ul {
padding-inline-start: 2em;
}

#write {
li {
position: relative;
}
li+li,
ul+ol>li,
ol+ul>li,
li>ul>li,
li>ol>li {
margin-top: -0.8em; // 让列表项之间的间距更紧凑
}
}
/* task列表 */
.md-task-list-item>input{
margin-top: 0.42em;
Expand Down

0 comments on commit 1dc020b

Please sign in to comment.