Skip to content

Commit

Permalink
perf: optimize the extra padding in lists (cotes2020#703)
Browse files Browse the repository at this point in the history
Resolves cotes2020#702
  • Loading branch information
joshjohanning authored and shihtiy-tw committed Nov 26, 2022
1 parent a25d4f4 commit 4e02f91
Showing 1 changed file with 19 additions and 28 deletions.
47 changes: 19 additions & 28 deletions _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ h5 {
font-size: 1.1rem;
}

ol,
ul {
ol,
ul {
margin-bottom: 1rem;
}
}

a {
@extend %link-color;
}
Expand Down Expand Up @@ -468,6 +460,25 @@ img[data-src] {

}

> ol,
> ul {
$start-padding: 1.25rem;

padding-inline-start: $start-padding;
margin: 1.25rem 0;

li {
margin: 0.5rem 0;
padding-left: 0.4rem;
}

ol,
ul {
padding-inline-start: $start-padding;
margin: 0.75rem 0;
}
}

ul {
/* attribute 'hide-bullet' was added by liquid */
.task-list-item[hide-bullet] {
Expand All @@ -492,26 +503,6 @@ img[data-src] {

} /* ul */

> ol,
> ul {
padding-left: 2rem;

li {
ol,
ul { /* sub list */
padding-left: 2rem;
margin-top: 0.3rem;
}
}

}

> ol {
li {
padding-left: 0.25em;
}
}

dl > dd {
margin-left: 1rem;
}
Expand Down

0 comments on commit 4e02f91

Please sign in to comment.