Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix: fix toc css bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Aug 19, 2019
1 parent d7d27e0 commit 1dc227f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions assets/css/_page/_post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,31 @@
}

.post-toc-mobile {
padding: 10px;
padding: 10px 0;

details {
summary {
display: block;
outline: none;
cursor: pointer;
display: flex;
justify-content: space-between;
font-size: 1.2em;
font-weight: bold;
line-height: 2em;
padding: 0 10px;
background: $code-background-color;
.post-toc-title {
display: block;
display: flex;
justify-content: space-between;
font-size: 1.2em;
font-weight: bold;
line-height: 2em;
padding: 0 10px;
background: $code-background-color;

&::-webkit-details-marker {
display: none;
}
i.details {
line-height: 2em;
}

i.details {
line-height: 2em;
.dark-theme & {
background: $code-background-color-dark;
}
}

.dark-theme & {
background: $code-background-color-dark;
&::-webkit-details-marker {
display: none;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion layouts/posts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2 class="post-toc-title">{{ T "toc" }}</h2>
</div>
<div class="post-toc-mobile" id="post-toc-mobile">
<details>
<summary class="post-toc-title">{{ T "toc" }}<i class="details icon fas fa-angle-down"></i></summary>
<summary><div class="post-toc-title">{{ T "toc" }}<i class="details icon fas fa-angle-down"></i></div></summary>
<div class="post-toc-content">
{{ $toc := .TableOfContents }}
{{ $toc = replaceRE `id="TableOfContents"` `id="TableOfContentsMobile"` $toc }}
Expand Down

0 comments on commit 1dc227f

Please sign in to comment.